Index: source/misc/imagemgr.cxx =================================================================== RCS file: /cvs/util/svtools/source/misc/imagemgr.cxx,v retrieving revision 1.49 diff -u -r1.49 imagemgr.cxx --- openoffice.org.orig/svtools/source/misc/imagemgr.cxx 18 Jul 2007 08:56:21 -0000 1.49 +++ openoffice.org/svtools/source/misc/imagemgr.cxx 11 Mar 2008 12:14:47 -0000 @@ -614,6 +614,17 @@ static ImageList* _pBigOfficeImgList = NULL; static ImageList* _pSmallHCOfficeImgList = NULL; static ImageList* _pBigHCOfficeImgList = NULL; + static ULONG nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle(); + + //If the style has been changed, throw away our cache of the older images + if (nStyle != Application::GetSettings().GetStyleSettings().GetSymbolsStyle()) + { + delete _pSmallOfficeImgList, _pSmallOfficeImgList = NULL; + delete _pBigOfficeImgList, _pBigOfficeImgList = NULL; + delete _pSmallHCOfficeImgList, _pSmallHCOfficeImgList = NULL; + delete _pBigHCOfficeImgList, _pBigHCOfficeImgList = NULL; + nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle(); + } // #i21242# MT: For B&W we need the HC Image and must transform. // bHiContrast is TRUE for all dark backgrounds, but we need HC Images for HC White also, @@ -682,6 +693,18 @@ static ImageList* _pBigImageList = NULL; static ImageList* _pSmallHCImageList = NULL; static ImageList* _pBigHCImageList = NULL; + static ULONG nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle(); + + //If the style has been changed, throw away our cache of the older images + if (nStyle != Application::GetSettings().GetStyleSettings().GetSymbolsStyle()) + { + delete _pSmallImageList, _pSmallImageList = NULL; + delete _pBigImageList, _pBigImageList = NULL; + delete _pSmallHCImageList, _pSmallHCImageList = NULL; + delete _pBigHCImageList, _pBigHCImageList = NULL; + nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle(); + } + if ( bBig ) { Index: inc/sfx2/mnuitem.hxx =================================================================== RCS file: /cvs/framework/sfx2/inc/sfx2/mnuitem.hxx,v retrieving revision 1.2 diff -u -r1.2 mnuitem.hxx --- openoffice.org.orig/sfx2/inc/sfx2/mnuitem.hxx 11 Apr 2007 21:23:52 -0000 1.2 +++ openoffice.org/sfx2/inc/sfx2/mnuitem.hxx 11 Mar 2008 13:05:47 -0000 @@ -172,6 +172,7 @@ { PopupMenu* pMenu; BOOL m_bWasHiContrastMode; + ULONG m_nSymbolsStyle; BOOL m_bShowMenuImages; protected: Index: inc/sfx2/tbxctrl.hxx =================================================================== RCS file: /cvs/framework/sfx2/inc/sfx2/tbxctrl.hxx,v retrieving revision 1.2 diff -u -r1.2 tbxctrl.hxx --- openoffice.org.orig/sfx2/inc/sfx2/tbxctrl.hxx 11 Apr 2007 21:31:02 -0000 1.2 +++ openoffice.org/sfx2/inc/sfx2/tbxctrl.hxx 11 Mar 2008 13:05:47 -0000 @@ -419,6 +419,7 @@ BOOL bBigImages; PopupMenu* pMenu; BOOL m_bWasHiContrastMode; + ULONG m_nSymbolsStyle; BOOL m_bShowMenuImages; }; Index: source/menu/mnuitem.cxx =================================================================== RCS file: /cvs/framework/sfx2/source/menu/mnuitem.cxx,v retrieving revision 1.20 diff -u -r1.20 mnuitem.cxx --- openoffice.org.orig/sfx2/source/menu/mnuitem.cxx 27 Jun 2007 23:31:17 -0000 1.20 +++ openoffice.org/sfx2/source/menu/mnuitem.cxx 11 Mar 2008 13:05:48 -0000 @@ -512,6 +512,7 @@ const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark(); m_bWasHiContrastMode = bIsHiContrastMode; + m_nSymbolsStyle = rSettings.GetSymbolsStyle(); m_bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); Reference aXMultiServiceFactory(::comphelper::getProcessServiceFactory()); @@ -538,11 +539,14 @@ BOOL bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark(); + BOOL nSymbolsStyle = rSettings.GetSymbolsStyle(); if (( bIsHiContrastMode != m_bWasHiContrastMode ) || - ( bShowMenuImages != m_bShowMenuImages ) ) + ( nSymbolsStyle != m_nSymbolsStyle ) || + ( bShowMenuImages != m_bShowMenuImages )) { m_bWasHiContrastMode = bIsHiContrastMode; + m_nSymbolsStyle = nSymbolsStyle; m_bShowMenuImages = bShowMenuImages; USHORT nCount = pActMenu->GetItemCount(); Index: source/toolbox/tbxitem.cxx =================================================================== RCS file: /cvs/framework/sfx2/source/toolbox/tbxitem.cxx,v retrieving revision 1.67 diff -u -r1.67 tbxitem.cxx --- openoffice.org.orig/sfx2/source/toolbox/tbxitem.cxx 6 Jul 2007 10:17:09 -0000 1.67 +++ openoffice.org/sfx2/source/toolbox/tbxitem.cxx 11 Mar 2008 13:05:49 -0000 @@ -1556,6 +1556,7 @@ // Determine the current background color of the menus const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_bWasHiContrastMode = rSettings.GetMenuColor().IsDark(); + m_nSymbolsStyle = rSettings.GetSymbolsStyle(); m_bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); SetImage( String() ); @@ -1831,12 +1832,15 @@ { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); BOOL bIsHiContrastMode = rSettings.GetMenuColor().IsDark(); + ULONG nSymbolsStyle = rSettings.GetSymbolsStyle(); BOOL bShowMenuImages = SvtMenuOptions().IsMenuIconsEnabled(); if (( bIsHiContrastMode != m_bWasHiContrastMode ) || - ( bShowMenuImages != m_bShowMenuImages ) ) + ( nSymbolsStyle != m_nSymbolsStyle ) || + ( bShowMenuImages != m_bShowMenuImages)) { m_bWasHiContrastMode = bIsHiContrastMode; + m_nSymbolsStyle = nSymbolsStyle; m_bShowMenuImages = bShowMenuImages; USHORT nCount = pActMenu->GetItemCount();