From 0de3b2634cdf52371b8b7bbe74368cf5fa61bff9 Mon Sep 17 00:00:00 2001
From: Jens-Heiner Rechtien
Date: Thu, 20 Nov 2008 15:13:11 +0000
Subject: CWS-TOOLING: integrate CWS buildid301_DEV300
---
desktop/source/app/app.cxx | 24 ++++++++++++++++++++-
framework/source/services/autorecovery.cxx | 13 +++++++-----
sfx2/source/appl/appserv.cxx | 34 +++++++++++++++++++++++++++++-
sfx2/source/dialog/about.cxx | 18 ++++++----------
sfx2/source/doc/docfile.cxx | 6 +++---
svx/source/svxlink/linkmgr.cxx | 2 ++
6 files changed, 75 insertions(+), 22 deletions(-)
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index d05762de73..cdd65446e9 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -541,6 +541,16 @@ void Desktop::DeInit()
BOOL Desktop::QueryExit()
{
+ try
+ {
+ RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
+ utl::ConfigManager::GetConfigManager()->StoreConfigItems();
+ RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
+ }
+ catch ( RuntimeException& )
+ {
+ }
+
const sal_Char SUSPEND_QUICKSTARTVETO[] = "SuspendQuickstartVeto";
Reference< ::com::sun::star::frame::XDesktop >
@@ -563,7 +573,19 @@ BOOL Desktop::QueryExit()
Any a;
a <<= (sal_Bool)sal_False;
xPropertySet->setPropertyValue( OUSTRING(RTL_CONSTASCII_USTRINGPARAM( SUSPEND_QUICKSTARTVETO )), a );
- } else {
+ }
+ else
+ {
+ try
+ {
+ // it is no problem to call DisableOfficeIPCThread() more than once
+ // it also looks to be threadsafe
+ OfficeIPCThread::DisableOfficeIPCThread();
+ }
+ catch ( RuntimeException& )
+ {
+ }
+
if (m_pLockfile != NULL) m_pLockfile->clean();
}
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index 9aa997d501..f6841a7e0f 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -2968,6 +2968,14 @@ void AutoRecovery::implts_doSessionSave(const DispatchParams& aParams)
{
LOG_RECOVERY("AutoRecovery::implts_doSessionSave()")
+ // try to make sure next time office will be started user wont be
+ // notified about any other might be running office instance
+ // remove ".lock" file from disc !
+ // it is done as a first action for session save since Gnome sessions
+ // do not provide enough time for shutdown, and the dialog looks to be
+ // confusing for the user
+ AutoRecovery::st_impl_removeLockFile();
+
// Be sure to know all open documents realy .-)
implts_verifyCacheAgainstDesktopDocumentList();
@@ -3010,11 +3018,6 @@ void AutoRecovery::implts_doSessionSave(const DispatchParams& aParams)
// flush config cached back to disc.
impl_flushALLConfigChanges();
-
- // try to make sure next time office will be started user wont be
- // notified about any other might be running office instance
- // remove ".lock" file from disc !
- AutoRecovery::st_impl_removeLockFile();
}
//-----------------------------------------------
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
diff --git a/svx/source/svxlink/linkmgr.cxx b/svx/source/svxlink/linkmgr.cxx
index 3cdb9eb9eb..5d96e0cfc4 100644
--- a/svx/source/svxlink/linkmgr.cxx
+++ b/svx/source/svxlink/linkmgr.cxx
@@ -351,6 +351,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
SfxStringItem aTarget( SID_TARGETNAME, String::CreateFromAscii("_blank") );
SfxStringItem aReferer( SID_REFERER, sReferer );
SfxUInt16Item aUpdate( SID_UPDATEDOCMODE, nUpdateMode );
+ SfxBoolItem aReadOnly(SID_DOC_READONLY, TRUE);
// #i14200# (DDE-link crashes wordprocessor)
SfxAllItemSet aArgs( SFX_APP()->GetPool() );
@@ -360,6 +361,7 @@ BOOL SvxInternalLink::Connect( sfx2::SvBaseLink* pLink )
aArgs.Put(aMinimized);
aArgs.Put(aName);
aArgs.Put(aUpdate);
+ aArgs.Put(aReadOnly);
pFndShell = SfxObjectShell::CreateAndLoadObject( aArgs );
}
}
--
cgit v1.2.3