From 05ed69dc4d201ea37e4c0ddefb45bceea243f023 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Fri, 3 Aug 2001 17:00:36 +0000 Subject: #87722# support new xml configuration for toolboxes,menus,statusbars,accelerators --- sfx2/source/control/dispatch.cxx | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 2176cf4175cb..674c3a38ccf0 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -2,9 +2,9 @@ * * $RCSfile: dispatch.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: mba $ $Date: 2001-06-21 15:36:57 $ + * last change: $Author: cd $ $Date: 2001-08-03 18:00:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -124,6 +124,7 @@ #include "tbxconf.hxx" #include "topfrm.hxx" #include "sfxuno.hxx" +#include "cfgmgr.hxx" //================================================================== DBG_NAME(SfxDispatcherFlush); @@ -1913,6 +1914,27 @@ sal_uInt32 SfxDispatcher::_Update_Impl( sal_Bool bUIActive, sal_Bool bIsMDIApp, rBar.aResId = ResId( 0,0 ); } + if ( bUIActive || bIsActive ) + { + SfxConfigManager* pMgr = pImp->pFrame->GetObjectShell()->GetConfigManager(); + SfxInterface* pIFace = pImp->pFrame->GetObjectShell()->GetInterface(); + USHORT nMask = SFX_VISIBILITY_CLIENT | SFX_VISIBILITY_STANDARD; + if ( !pMgr ) + { + pMgr = SFX_APP()->GetConfigManager_Impl(); + pIFace = SFX_APP()->GetInterface(); + nMask = SFX_VISIBILITY_SERVER | SFX_VISIBILITY_STANDARD; + + } + + for ( USHORT n=0; n<4; n++ ) + { + USHORT nType = n + RID_SFX_TOOLBOX_START + 10; + if ( pMgr->HasConfigItem( nType ) ) + pWorkWin->SetObjectBar_Impl( (SFX_OBJECTBAR_USERDEF1 + n) | nMask, nType, pIFace, (const String*) NULL ); + } + } + for ( nNo=0; pIFace && nNoGetChildWindowCount(); nNo++ ) { sal_uInt32 nId = pIFace->GetChildWindowId(nNo); -- cgit