about.cxx (a392ac37) | about.cxx (8bd5297c) |
---|---|
1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 58 unchanged lines hidden (view full) --- 67 aTxtSiz.Height() = aCalcSize.Height(); 68 rText.SetSizePixel( aTxtSiz ); 69 70 nY += aTxtSiz.Height(); 71} 72 73String InitDevVersionStr() 74{ | 1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance --- 58 unchanged lines hidden (view full) --- 67 aTxtSiz.Height() = aCalcSize.Height(); 68 rText.SetSizePixel( aTxtSiz ); 69 70 nY += aTxtSiz.Height(); 71} 72 73String InitDevVersionStr() 74{ |
75 const String sCWSSchema( String::CreateFromAscii( "[CWS:" ) ); 76 rtl::OUString sDefault; | 75 String sDefault; |
77 String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) ); 78 OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" ); | 76 String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) ); 77 OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" ); |
79 if ( sBuildId.Len() > 0 && sBuildId.Search( sCWSSchema ) == STRING_NOTFOUND ) 80 { 81 // no cws part in brand buildid -> try basis buildid 82 rtl::OUString sBasisBuildId( DEFINE_CONST_OUSTRING( 83 "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}" ) ); 84 rtl::Bootstrap::expandMacros( sBasisBuildId ); 85 sal_Int32 nIndex = sBasisBuildId.indexOf( sCWSSchema ); 86 if ( nIndex != -1 ) 87 sBuildId += String( sBasisBuildId.copy( nIndex ) ); 88 } | |
89 90 String sProductSource( utl::Bootstrap::getProductSource( sDefault ) ); 91 OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource in bootstrap file" ); 92 93 // the product source is something like "DEV300", where the 94 // build id is something like "300m12(Build:12345)". For better readability, 95 // strip the duplicate UPD ("300"). 96 if ( sProductSource.Len() ) --- 4 unchanged lines hidden (view full) --- 101 && ( sProductSource.Copy( sProductSource.Len() - 3 ) == sBuildId.Copy( 0, 3 ) ); 102 OSL_ENSURE( bMatchingUPD, "BUILDID and ProductSource do not match in their UPD" ); 103 if ( bMatchingUPD ) 104 sProductSource = sProductSource.Copy( 0, sProductSource.Len() - 3 ); 105 106 // prepend the product source 107 sBuildId.Insert( sProductSource, 0 ); 108 } | 78 79 String sProductSource( utl::Bootstrap::getProductSource( sDefault ) ); 80 OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource in bootstrap file" ); 81 82 // the product source is something like "DEV300", where the 83 // build id is something like "300m12(Build:12345)". For better readability, 84 // strip the duplicate UPD ("300"). 85 if ( sProductSource.Len() ) --- 4 unchanged lines hidden (view full) --- 90 && ( sProductSource.Copy( sProductSource.Len() - 3 ) == sBuildId.Copy( 0, 3 ) ); 91 OSL_ENSURE( bMatchingUPD, "BUILDID and ProductSource do not match in their UPD" ); 92 if ( bMatchingUPD ) 93 sProductSource = sProductSource.Copy( 0, sProductSource.Len() - 3 ); 94 95 // prepend the product source 96 sBuildId.Insert( sProductSource, 0 ); 97 } |
109 110 // --> PB 2008-10-30 #i94693# 111 // if the build ids of the basis or ure layer are different from the build id 112 // of the brand layer then show them 113 rtl::OUString aBasisProductBuildId( DEFINE_CONST_OUSTRING( 114 "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) ); 115 rtl::Bootstrap::expandMacros( aBasisProductBuildId ); 116 rtl::OUString aUREProductBuildId( DEFINE_CONST_OUSTRING( 117 "${$URE_BIN_DIR/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) ); 118 rtl::Bootstrap::expandMacros( aUREProductBuildId ); 119 if ( sBuildId.Search( String( aBasisProductBuildId ) ) == STRING_NOTFOUND 120 || sBuildId.Search( String( aUREProductBuildId ) ) == STRING_NOTFOUND ) 121 { 122 String sTemp( '-' ); 123 sTemp += String( aBasisProductBuildId ); 124 sTemp += '-'; 125 sTemp += String( aUREProductBuildId ); 126 sBuildId.Insert( sTemp, sBuildId.Search( ')' ) ); 127 } 128 // <-- 129 130 // the build id format is "milestone(build)[cwsname]". For readability, it would 131 // be nice to have some more spaces in there. 132 xub_StrLen nPos = 0; 133 if ( ( nPos = sBuildId.Search( sal_Unicode( '(' ) ) ) != STRING_NOTFOUND ) 134 sBuildId.Insert( sal_Unicode( ' ' ), nPos ); 135 if ( ( nPos = sBuildId.Search( sal_Unicode( '[' ) ) ) != STRING_NOTFOUND ) 136 sBuildId.Insert( sal_Unicode( ' ' ), nPos ); | 98 |
137 return sBuildId; 138} 139 140AboutDialog::AboutDialog( Window* pParent, const ResId& rId ) : 141 142 SfxModalDialog ( pParent, rId ), 143 144 aOKButton ( this, ResId( ABOUT_BTN_OK, *rId.GetResMgr() ) ), --- 28 unchanged lines hidden (view full) --- 173 // Transparenter Font 174 Font aFont = GetFont(); 175 aFont.SetTransparent( sal_True ); 176 SetFont( aFont ); 177 178 // if necessary more info 179 String sVersion = aVersionText.GetText(); 180 sVersion.SearchAndReplaceAscii( "$(VER)", Application::GetDisplayName() ); | 99 return sBuildId; 100} 101 102AboutDialog::AboutDialog( Window* pParent, const ResId& rId ) : 103 104 SfxModalDialog ( pParent, rId ), 105 106 aOKButton ( this, ResId( ABOUT_BTN_OK, *rId.GetResMgr() ) ), --- 28 unchanged lines hidden (view full) --- 135 // Transparenter Font 136 Font aFont = GetFont(); 137 aFont.SetTransparent( sal_True ); 138 SetFont( aFont ); 139 140 // if necessary more info 141 String sVersion = aVersionText.GetText(); 142 sVersion.SearchAndReplaceAscii( "$(VER)", Application::GetDisplayName() ); |
181 sVersion += '\n'; 182 sVersion += aDevVersionStr; | |
183 aVersionText.SetText( sVersion ); 184 185 // Initialisierung fuer Aufruf Entwickler 186 if ( aAccelStr.Len() && ByteString(U2S(aAccelStr)).IsAlphaAscii() ) 187 { 188 Accelerator *pAccel = 0, *pPrevAccel = 0, *pFirstAccel = 0; 189 aAccelStr.ToUpperAscii(); 190 --- 25 unchanged lines hidden (view full) --- 216 aCopyrightText.SetFont( aNewFont ); 217 218 aVersionText.SetBackground(); 219 aCopyrightText.SetBackground(); 220 221 Color aTextColor( rSettings.GetWindowTextColor() ); 222 aVersionText.SetControlForeground( aTextColor ); 223 aCopyrightText.SetControlForeground( aTextColor ); | 143 aVersionText.SetText( sVersion ); 144 145 // Initialisierung fuer Aufruf Entwickler 146 if ( aAccelStr.Len() && ByteString(U2S(aAccelStr)).IsAlphaAscii() ) 147 { 148 Accelerator *pAccel = 0, *pPrevAccel = 0, *pFirstAccel = 0; 149 aAccelStr.ToUpperAscii(); 150 --- 25 unchanged lines hidden (view full) --- 176 aCopyrightText.SetFont( aNewFont ); 177 178 aVersionText.SetBackground(); 179 aCopyrightText.SetBackground(); 180 181 Color aTextColor( rSettings.GetWindowTextColor() ); 182 aVersionText.SetControlForeground( aTextColor ); 183 aCopyrightText.SetControlForeground( aTextColor ); |
224 aBuildData.SetBackground( aWall ); | 184 aBuildData.SetBackground( ); |
225 226 Font aSmallFont = rSettings.GetInfoFont(); 227 Size aSmaller = aNewFont.GetSize(); 228 aSmaller.Width() = (long) (aSmaller.Width() * 0.75); 229 aSmaller.Height() = (long) (aSmaller.Height() * 0.75); 230 aNewFont.SetSize( aSmaller ); 231 aBuildData.SetFont( aNewFont ); | 185 186 Font aSmallFont = rSettings.GetInfoFont(); 187 Size aSmaller = aNewFont.GetSize(); 188 aSmaller.Width() = (long) (aSmaller.Width() * 0.75); 189 aSmaller.Height() = (long) (aSmaller.Height() * 0.75); 190 aNewFont.SetSize( aSmaller ); 191 aBuildData.SetFont( aNewFont ); |
232 aBuildData.SetBackground( aWall ); | 192 193 String sRevision( utl::Bootstrap::getRevisionInfo() ); 194 195 String aBuildString(aDevVersionStr); 196 aBuildString += (DEFINE_CONST_UNICODE(" - Rev. ")); 197 aBuildString += sRevision; 198 |
233#ifdef BUILD_VER_STRING 234#define _STRINGIFY(x) #x 235#define STRINGIFY(x) _STRINGIFY(x) | 199#ifdef BUILD_VER_STRING 200#define _STRINGIFY(x) #x 201#define STRINGIFY(x) _STRINGIFY(x) |
236 String aBuildString( DEFINE_CONST_UNICODE( STRINGIFY( BUILD_VER_STRING ) ) ); 237#else 238 String aBuildString; | 202 aBuildString += '\n'; 203 aBuildString += ( DEFINE_CONST_UNICODE( STRINGIFY( BUILD_VER_STRING ) ) ); |
239#endif 240 aBuildData.SetText( aBuildString ); 241 aBuildData.Show(); 242 243 // determine size and position of the dialog & elements 244 Size aAppLogoSiz = aAppLogo.GetSizePixel(); 245 Size aOutSiz = GetOutputSizePixel(); 246 aOutSiz.Width() = aAppLogoSiz.Width(); --- 182 unchanged lines hidden --- | 204#endif 205 aBuildData.SetText( aBuildString ); 206 aBuildData.Show(); 207 208 // determine size and position of the dialog & elements 209 Size aAppLogoSiz = aAppLogo.GetSizePixel(); 210 Size aOutSiz = GetOutputSizePixel(); 211 aOutSiz.Width() = aAppLogoSiz.Width(); --- 182 unchanged lines hidden --- |