--- framework/inc/services/layoutmanager.hxx 2005-06-01 15:59:12.289866000 +0200 +++ framework/inc/services/layoutmanager.hxx 2005-06-02 15:52:55.859938235 +0200 @@ -484,6 +484,7 @@ namespace framework void implts_toggleFloatingUIElementsVisibility( sal_Bool bActive ); sal_Bool implts_isEmbeddedLayoutManager() const; sal_Int16 implts_getCurrentSymbolsSize(); + sal_Int16 implts_getCurrentSymbolsStyle(); ::com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > implts_createToolkitWindow( const ::com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer >& rParent ); ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > implts_createElement( const rtl::OUString& aName ); rtl::OUString implts_generateGenericAddonToolbarTitle( sal_Int32 nNumber ) const; @@ -621,6 +622,7 @@ namespace framework AddonsOptions* m_pAddonOptions; SvtMiscOptions* m_pMiscOptions; sal_Int16 m_eSymbolsSize; + sal_Int16 m_eSymbolsStyle; Timer m_aAsyncLayoutTimer; ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer; // container for ALL Listener }; --- framework/inc/uiconfiguration/moduleimagemanager.hxx 2005-03-01 20:26:44.000000000 +0100 +++ framework/inc/uiconfiguration/moduleimagemanager.hxx 2005-05-20 16:57:35.288859803 +0200 @@ -200,6 +200,7 @@ namespace framework ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xServiceManager; ::std::vector< rtl::OUString > m_aImageNameVector; ::std::vector< rtl::OUString > m_aImageCommandNameVector; + sal_Int16 m_nSymbolsStyle; }; class GlobalImageList : public CmdImageList, public rtl::IReference --- framework/inc/uielement/menubarmanager.hxx 2005-03-29 17:48:16.000000000 +0200 +++ framework/inc/uielement/menubarmanager.hxx 2005-05-20 16:58:39.651758054 +0200 @@ -313,6 +313,7 @@ class MenuBarManager : public com::sun:: ::com::sun::star::uno::Reference< ::com::sun::star::ui::XAcceleratorConfiguration > m_xGlobalAcceleratorManager; // #110897# const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& mxServiceFactory; + sal_Int16 m_nSymbolsStyle; }; } // namespace --- framework/inc/uielement/toolbarmanager.hxx 2005-06-01 15:59:12.308863000 +0200 +++ framework/inc/uielement/toolbarmanager.hxx 2005-06-01 17:10:12.344063631 +0200 @@ -272,6 +272,7 @@ class ToolBarManager : public ::com::sun CommandToInfoMap m_aCommandMap; SubToolBarToSubToolBarControllerMap m_aSubToolBarControllerMap; Timer m_aAsyncUpdateControllersTimer; + sal_Int16 m_nSymbolsStyle; }; } --- framework/source/layoutmanager/layoutmanager.cxx 2005-06-01 15:59:12.314862000 +0200 +++ framework/source/layoutmanager/layoutmanager.cxx 2005-06-02 15:56:05.958148807 +0200 @@ -462,6 +462,7 @@ LayoutManager::LayoutManager( const Refe m_pMiscOptions->AddListener( LINK( this, LayoutManager, OptionsChanged ) ); Application::AddEventListener( LINK( this, LayoutManager, SettingsChanged ) ); m_eSymbolsSize = m_pMiscOptions->GetSymbolsSize(); + m_eSymbolsStyle = m_pMiscOptions->GetCurrentSymbolsStyle(); m_aAsyncLayoutTimer.SetTimeout( 50 ); m_aAsyncLayoutTimer.SetTimeoutHdl( LINK( this, LayoutManager, AsyncLayoutHdl ) ); @@ -5629,6 +5630,20 @@ sal_Int16 LayoutManager::implts_getCurre return eOptSymbolsSize; } +sal_Int16 LayoutManager::implts_getCurrentSymbolsStyle() +{ + sal_Int16 eOptSymbolsStyle( 0 ); + + { + ReadGuard aReadLock( m_aLock ); + vos::OGuard aGuard( Application::GetSolarMutex() ); + if ( m_pMiscOptions ) + eOptSymbolsStyle = m_pMiscOptions->GetCurrentSymbolsStyle(); + } + + return eOptSymbolsStyle; +} + IMPL_LINK( LayoutManager, MenuBarClose, MenuBar *, pMenu ) { ReadGuard aReadLock( m_aLock ); @@ -5649,17 +5664,19 @@ IMPL_LINK( LayoutManager, MenuBarClose, IMPL_LINK( LayoutManager, OptionsChanged, void*, pVoid ) { - sal_Int16 eOldSymbolsSize( 0 ); sal_Int16 eSymbolsSize( implts_getCurrentSymbolsSize() ); + sal_Int16 eSymbolsStyle( implts_getCurrentSymbolsStyle() ); ReadGuard aReadLock( m_aLock ); - eOldSymbolsSize = m_eSymbolsSize; + sal_Int16 eOldSymbolsSize = m_eSymbolsSize; + sal_Int16 eOldSymbolsStyle = m_eSymbolsStyle; aReadLock.unlock(); - if ( eSymbolsSize != eOldSymbolsSize ) + if ( eSymbolsSize != eOldSymbolsSize || eSymbolsStyle != eOldSymbolsStyle ) { WriteGuard aWriteLock( m_aLock ); m_eSymbolsSize = eSymbolsSize; + m_eSymbolsStyle = eSymbolsStyle; aWriteLock.unlock(); std::vector< Reference< XUpdatable > > aToolBarVector; --- framework/source/uiconfiguration/moduleimagemanager.cxx 2005-03-01 20:39:42.000000000 +0100 +++ framework/source/uiconfiguration/moduleimagemanager.cxx 2005-05-20 18:44:19.418232163 +0200 @@ -140,6 +140,10 @@ #include #endif +#ifndef INCLUDED_SVTOOLS_MISCOPT_HXX +#include "svtools/miscopt.hxx" +#endif + //_________________________________________________________________________________________________________________ // namespaces //_________________________________________________________________________________________________________________ @@ -230,7 +234,8 @@ static GlobalImageList* getGlobalImageLi CmdImageList::CmdImageList( const uno::Reference< XMultiServiceFactory >& rServiceManager, const rtl::OUString& aModuleIdentifier ) : m_aModuleIdentifier( aModuleIdentifier ), m_bVectorInit( sal_False ), - m_xServiceManager( rServiceManager ) + m_xServiceManager( rServiceManager ), + m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() ) { for ( sal_Int32 n=0; n < ImageType_COUNT; n++ ) m_pImageList[n] = 0; @@ -310,6 +315,16 @@ void CmdImageList::impl_fillCommandToIma ImageList* CmdImageList::impl_getImageList( sal_Int16 nImageType ) { + SvtMiscOptions aMiscOptions; + + sal_Int16 nSymbolsStyle = aMiscOptions.GetCurrentSymbolsStyle(); + if ( nSymbolsStyle != m_nSymbolsStyle ) + { + m_nSymbolsStyle = nSymbolsStyle; + for ( sal_Int32 n=0; n < ImageType_COUNT; n++ ) + delete m_pImageList[n], m_pImageList[n] = NULL; + } + if ( !m_pImageList[nImageType] ) { m_pImageList[nImageType] = new ImageList( m_aImageNameVector, --- framework/source/uielement/menubarmanager.cxx 2005-03-29 17:49:25.000000000 +0200 +++ framework/source/uielement/menubarmanager.cxx 2005-05-20 16:58:29.368531775 +0200 @@ -218,6 +218,10 @@ #include #endif +#ifndef INCLUDED_SVTOOLS_MISCOPT_HXX +#include "svtools/miscopt.hxx" +#endif + //_________________________________________________________________________________________________________________ // namespace //_________________________________________________________________________________________________________________ @@ -318,6 +322,7 @@ MenuBarManager::MenuBarManager( , m_bModuleIdentified( sal_False ) , m_bRetrieveImages( sal_False ) , m_bAcceleratorCfg( sal_False ) + , m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() ) { m_xPopupMenuControllerRegistration = Reference< ::com::sun::star::frame::XUIControllerRegistration >( getServiceFactory()->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.PopupMenuControllerFactory" ))), @@ -338,6 +343,7 @@ MenuBarManager::MenuBarManager( , m_bModuleIdentified( sal_False ) , m_bRetrieveImages( sal_False ) , m_bAcceleratorCfg( sal_False ) + , m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() ) { m_bActive = sal_False; m_bDeleteMenu = bDelete; @@ -425,6 +431,7 @@ MenuBarManager::MenuBarManager( , m_bModuleIdentified( sal_False ) , m_bRetrieveImages( sal_False ) , m_bAcceleratorCfg( sal_False ) + , m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() ) { m_bActive = sal_False; m_bDeleteMenu = bDelete; @@ -1102,15 +1109,18 @@ IMPL_LINK( MenuBarManager, Activate, Men // Check if some modes have changed so we have to update our menu images const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); sal_Bool bIsHiContrast = rSettings.GetMenuColor().IsDark(); + sal_Int16 nSymbolsStyle = SvtMiscOptions().GetCurrentSymbolsStyle(); if ( m_bRetrieveImages || m_bWasHiContrast != bIsHiContrast || - bShowMenuImages != m_bShowMenuImages ) + bShowMenuImages != m_bShowMenuImages || + nSymbolsStyle != m_nSymbolsStyle ) { // The mode changed so we have to replace all images m_bWasHiContrast = bIsHiContrast; m_bShowMenuImages = bShowMenuImages; m_bRetrieveImages = sal_False; + m_nSymbolsStyle = nSymbolsStyle; AddonsOptions aAddonOptions; for ( USHORT nPos = 0; nPos < pMenu->GetItemCount(); nPos++ ) --- framework/source/uielement/toolbarmanager.cxx 2005-06-01 15:59:12.340857000 +0200 +++ framework/source/uielement/toolbarmanager.cxx 2005-06-02 16:00:54.004464627 +0200 @@ -325,7 +325,8 @@ ToolBarManager::ToolBarManager( const Re m_bImageOrientationRegistered( sal_False ), m_bImageMirrored( sal_False ), m_bCanBeCustomized( sal_True ), - m_lImageRotation( 0 ) + m_lImageRotation( 0 ), + m_nSymbolsStyle( SvtMiscOptions().GetCurrentSymbolsStyle() ) { Window* pWindow = m_pToolBar; while ( pWindow && !pWindow->IsSystemWindow() ) @@ -414,13 +415,21 @@ void ToolBarManager::CheckAndUpdateImage m_bIsHiContrast = sal_False; } - bool bCurrentSymbolsSmall = !SvtMiscOptions().AreCurrentSymbolsLarge(); + SvtMiscOptions aMiscOptions; + bool bCurrentSymbolsSmall = !aMiscOptions.AreCurrentSymbolsLarge(); if ( m_bSmallSymbols != bCurrentSymbolsSmall ) { bRefreshImages = sal_True; m_bSmallSymbols = bCurrentSymbolsSmall; } + sal_Int16 nCurrentSymbolsStyle = aMiscOptions.GetCurrentSymbolsStyle(); + if ( m_nSymbolsStyle != nCurrentSymbolsStyle ) + { + bRefreshImages = sal_True; + m_nSymbolsStyle = nCurrentSymbolsStyle; + } + // Refresh images if requested if ( bRefreshImages ) RefreshImages();