diff options
author | Mathias Bauer <mba@openoffice.org> | 2001-11-02 15:38:36 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2001-11-02 15:38:36 +0000 |
commit | 3fbb95b6a0c9ef09e22f70529c8c60c681c20534 (patch) | |
tree | 5e800716ca3b368ddf589d62de1b0cf1663b9d34 | |
parent | d7fafd456cbf3598bdeaaf25cbe2b9742f367c8b (diff) |
#93937#: don't store configuration if cfgmgr belongs to loaded document
-rw-r--r-- | sfx2/source/dialog/cfg.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sfx2/source/dialog/cfg.cxx b/sfx2/source/dialog/cfg.cxx index 6a26202c3dfd..52e610b432b5 100644 --- a/sfx2/source/dialog/cfg.cxx +++ b/sfx2/source/dialog/cfg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cfg.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: mba $ $Date: 2001-09-06 08:47:58 $ + * last change: $Author: mba $ $Date: 2001-11-02 16:38:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1178,13 +1178,16 @@ IMPL_LINK( SfxStatusBarConfigPage, Save, Button *, pButton ) BOOL bCreated = FALSE; SfxObjectShellRef xDoc; + BOOL bLoadedDocument = FALSE; SfxConfigManager* pCfgMgr = SFX_APP()->GetConfigManager_Impl(); if ( pCfgMgr->GetURL() != aCfgName ) { // it was not the global configuration manager // first check if URL points to a document already loaded xDoc = SFX_APP()->DocAlreadyLoaded( aCfgName, TRUE, TRUE ); - if ( !xDoc.Is() ) + if ( xDoc.Is() ) + bLoadedDocument = TRUE; + else // try to load a document from the URL xDoc = MakeObjectShellForOrganizer_Impl( aCfgName, TRUE ); if ( xDoc.Is() ) @@ -1210,7 +1213,8 @@ IMPL_LINK( SfxStatusBarConfigPage, Save, Button *, pButton ) SfxStatusBarManager* pStbMgr = new SfxStatusBarManager( this, *pMgr, pCfgMgr ); Apply( pStbMgr, FALSE ); pCfgMgr->StoreConfigItem( *pStbMgr ); - pCfgMgr->StoreConfiguration(); + if ( !bLoadedDocument ) + pCfgMgr->StoreConfiguration(); StatusBar* pBar = pStbMgr->GetStatusBar(); delete pStbMgr; |