diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2008-11-20 15:13:11 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2008-11-20 15:13:11 +0000 |
commit | 0de3b2634cdf52371b8b7bbe74368cf5fa61bff9 (patch) | |
tree | ac3af113505f477a4d231e764a092e64f6e34d03 /sfx2/source | |
parent | aaa1f41c6735f4e2d4da401a0ec2c8e85f5935e0 (diff) |
CWS-TOOLING: integrate CWS buildid301_DEV300
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 34 | ||||
-rw-r--r-- | sfx2/source/dialog/about.cxx | 18 | ||||
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 6 |
3 files changed, 42 insertions, 16 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 713253070f..cfa60d4e8c 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -439,9 +439,21 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) // - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - case SID_ABOUT: { - ::rtl::OUString sDefault; + const String sCWSSchema( String::CreateFromAscii( "[CWS:" ) ); + rtl::OUString sDefault; String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) ); OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" ); + if ( sBuildId.Len() > 0 && sBuildId.Search( sCWSSchema ) == STRING_NOTFOUND ) + { + // no cws part in brand buildid -> try basis buildid + rtl::OUString sBasisBuildId( DEFINE_CONST_OUSTRING( + "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":buildid}" ) ); + rtl::Bootstrap::expandMacros( sBasisBuildId ); + sal_Int32 nIndex = sBasisBuildId.indexOf( sCWSSchema ); + if ( nIndex != -1 ) + sBuildId += String( sBasisBuildId.copy( nIndex ) ); + } + String sProductSource( utl::Bootstrap::getProductSource( sDefault ) ); OSL_ENSURE( sProductSource.Len() > 0, "No ProductSource in bootstrap file" ); @@ -462,6 +474,26 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) sBuildId.Insert( sProductSource, 0 ); } + // --> PB 2008-10-30 #i94693# + /* if the build ids of the basis or ure layer are different from the build id + * of the brand layer then show them */ + rtl::OUString aBasisProductBuildId( DEFINE_CONST_OUSTRING( + "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) ); + rtl::Bootstrap::expandMacros( aBasisProductBuildId ); + rtl::OUString aUREProductBuildId( DEFINE_CONST_OUSTRING( + "${$URE_BIN_DIR/" SAL_CONFIGFILE("version") ":ProductBuildid}" ) ); + rtl::Bootstrap::expandMacros( aUREProductBuildId ); + if ( sBuildId.Search( String( aBasisProductBuildId ) ) == STRING_NOTFOUND + || sBuildId.Search( String( aUREProductBuildId ) ) == STRING_NOTFOUND ) + { + String sTemp( '-' ); + sTemp += String( aBasisProductBuildId ); + sTemp += '-'; + sTemp += String( aUREProductBuildId ); + sBuildId.Insert( sTemp, sBuildId.Search( ')' ) ); + } + // <-- + // the build id format is "milestone(build)[cwsname]". For readability, it would // be nice to have some more spaces in there. xub_StrLen nPos = 0; diff --git a/sfx2/source/dialog/about.cxx b/sfx2/source/dialog/about.cxx index c1f8dc493b..bae0b9c171 100644 --- a/sfx2/source/dialog/about.cxx +++ b/sfx2/source/dialog/about.cxx @@ -150,17 +150,20 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS while ( !bLoaded && ( nIndex >= 0 ) ); // fallback to "about.bmp" - if ( !bLoaded ) { + if ( !bLoaded ) + { bLoaded = impl_loadBitmap( rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program/edition" ), rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo ); } - if (!bLoaded) { + + if ( !bLoaded ) + { bLoaded = impl_loadBitmap( rtl::OUString::createFromAscii( "$BRAND_BASE_DIR/program" ), rtl::OUString::createFromAscii( "about.bmp" ), aAppLogo ); } - + // Transparenter Font Font aFont = GetFont(); aFont.SetTransparent( TRUE ); @@ -169,15 +172,6 @@ AboutDialog::AboutDialog( Window* pParent, const ResId& rId, const String& rVerS // if necessary more info String sVersion = aVersionText.GetText(); sVersion.SearchAndReplaceAscii( "$(VER)", Application::GetDisplayName() ); - ::rtl::OUString aDefault; - String sPatchLevel( utl::Bootstrap::getProductPatchLevel( aDefault ) ); - if ( sPatchLevel.Len() > 0 ) - { - sVersion.EraseTrailingChars(); - sVersion += ' '; - sVersion += sPatchLevel; - } - sVersion += '\n'; sVersion += rVerStr; aVersionText.SetText( sVersion ); diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 399f098155..620a935df5 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -1029,15 +1029,13 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading ) { // the special file locking should be used only for file URLs - SFX_ITEMSET_ARG( GetItemSet(), pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, sal_False); - // no locking is necessary on loading if the document is explicitly opened as copy SFX_ITEMSET_ARG( GetItemSet(), pTemplateItem, SfxBoolItem, SID_TEMPLATE, sal_False); bResult = ( bLoading && pTemplateItem && pTemplateItem->GetValue() ); try { - if ( !bResult && ( !pReadOnlyItem || !pReadOnlyItem->GetValue() ) ) + if ( !bResult && !IsReadOnly() ) { ::svt::DocumentLockFile aLockFile( aLogicName ); bResult = aLockFile.CreateOwnLockFile(); @@ -1134,6 +1132,8 @@ sal_Bool SfxMedium::LockOrigFileOnDemand( sal_Bool bLoading ) { // the error should be set in case it is storing process // or the document has been opened for editing explicitly + + SFX_ITEMSET_ARG( pSet, pReadOnlyItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); if ( !bLoading || pReadOnlyItem && !pReadOnlyItem->GetValue() ) SetError( ERRCODE_IO_ACCESSDENIED ); else |