summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2001-08-03 17:07:12 +0000
committerCarsten Driesner <cd@openoffice.org>2001-08-03 17:07:12 +0000
commit03679b4891f0f94a494732eb1204efe00ba7c33b (patch)
tree054a600c93bec09ece986d94cd2f0f68167d4439 /sfx2
parent05ed69dc4d201ea37e4c0ddefb45bceea243f023 (diff)
#87722# support new xml configuration for toolboxes,menus,statusbars,accelerators
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/acccfg.cxx8
-rw-r--r--sfx2/source/dialog/cfg.cxx16
2 files changed, 18 insertions, 6 deletions
diff --git a/sfx2/source/dialog/acccfg.cxx b/sfx2/source/dialog/acccfg.cxx
index cf122020e880..2f2082bf8b84 100644
--- a/sfx2/source/dialog/acccfg.cxx
+++ b/sfx2/source/dialog/acccfg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: acccfg.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: mba $ $Date: 2001-06-11 09:59:24 $
+ * last change: $Author: cd $ $Date: 2001-08-03 18:05:49 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -471,6 +471,7 @@ void SfxAcceleratorConfigPage::Apply( SfxAcceleratorManager* pAccMgr )
{
pAccMgr->UseDefault();
pAccMgr->SetDefault(TRUE);
+ pAccMgr->StoreConfig();
bModified = FALSE;
return;
}
@@ -528,6 +529,7 @@ void SfxAcceleratorConfigPage::Apply( SfxAcceleratorManager* pAccMgr )
for (i=0; i<aListOfIds.Count(); i++)
SFX_APP()->GetMacroConfig()->ReleaseSlotId(aListOfIds[i]);
+ pAccMgr->StoreConfig();
pAccMgr->Reconfigure();
}
@@ -641,7 +643,7 @@ IMPL_LINK( SfxAcceleratorConfigPage, Save, Button *, pButton )
// create new AcceleratorManager and apply changes
SfxAcceleratorManager* pAccMgr = new SfxAcceleratorManager( *pMgr, pCfgMgr );
Apply( pAccMgr );
- pAccMgr->SetModified( TRUE );
+ pAccMgr->SetDefault( FALSE );
pCfgMgr->StoreConfigItem( *pAccMgr );
if ( !bLoadedDocument )
pCfgMgr->StoreConfiguration();
diff --git a/sfx2/source/dialog/cfg.cxx b/sfx2/source/dialog/cfg.cxx
index 681ed5c61128..1f5125117846 100644
--- a/sfx2/source/dialog/cfg.cxx
+++ b/sfx2/source/dialog/cfg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cfg.cxx,v $
*
- * $Revision: 1.11 $
+ * $Revision: 1.12 $
*
- * last change: $Author: dv $ $Date: 2001-07-26 12:04:53 $
+ * last change: $Author: cd $ $Date: 2001-08-03 18:07:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1025,6 +1025,7 @@ void SfxStatusBarConfigPage::Apply( SfxStatusBarManager* pStbMgr )
{
pStbMgr->UseDefault();
pStbMgr->SetDefault(TRUE);
+ pStbMgr->StoreConfig();
return;
}
@@ -1040,6 +1041,7 @@ void SfxStatusBarConfigPage::Apply( SfxStatusBarManager* pStbMgr )
pStbMgr->AddItem(nId, nWidth);
}
}
+ pStbMgr->StoreConfig();
}
IMPL_LINK( SfxStatusBarConfigPage, Default, PushButton *, pPushButton )
@@ -1058,7 +1060,9 @@ IMPL_LINK( SfxStatusBarConfigPage, Default, PushButton *, pPushButton )
aEntriesBox.Invalidate();
pMgr = pOld;
+ StatusBar* pBar = pStbMgr->GetStatusBar();
delete pStbMgr;
+ delete pBar;
return 0;
}
@@ -1119,7 +1123,10 @@ IMPL_LINK( SfxStatusBarConfigPage, Load, Button *, pButton )
aEntriesBox.bModified = TRUE;
pMgr = pOld;
+ StatusBar* pBar = pStbMgr->GetStatusBar();
delete pStbMgr;
+ delete pBar;
+
if ( bCreated )
delete pCfgMgr;
else
@@ -1177,11 +1184,14 @@ IMPL_LINK( SfxStatusBarConfigPage, Save, Button *, pButton )
// create new StatusBarManager and apply changes
SfxStatusBarManager* pStbMgr = new SfxStatusBarManager( this, *pMgr, pCfgMgr );
Apply( pStbMgr );
- pStbMgr->SetModified( TRUE );
+ pStbMgr->SetDefault( FALSE );
pCfgMgr->StoreConfigItem( *pStbMgr );
pCfgMgr->StoreConfiguration();
+ StatusBar* pBar = pStbMgr->GetStatusBar();
delete pStbMgr;
+ delete pBar;
+
if ( bCreated )
delete pCfgMgr;
}