diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2008-05-13 11:39:12 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2008-05-13 11:39:12 +0000 |
commit | 94d75d137f4666e0c9908aa757ea9cf92ebe3b3e (patch) | |
tree | 85dff6d4ec1f2f6f40941e82edd25fd0f46e9b54 /svtools/source/misc | |
parent | b923c5c3689d8984416e563bbc8fd26feb0785d5 (diff) |
INTEGRATION: CWS fwk86 (1.50.30); FILE MERGED
2008/04/30 15:29:47 pb 1.50.30.2: RESYNC: (1.50-1.51); FILE MERGED
2008/04/07 11:43:19 pb 1.50.30.1: fix: #i86924# reset image lists if symbols style has changed
Diffstat (limited to 'svtools/source/misc')
-rw-r--r-- | svtools/source/misc/imagemgr.cxx | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 654ba472a89b..314242063711 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: imagemgr.cxx,v $ - * $Revision: 1.51 $ + * $Revision: 1.52 $ * * This file is part of OpenOffice.org. * @@ -572,6 +572,17 @@ static Image GetOfficeImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHigh 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, @@ -640,6 +651,17 @@ static Image GetImageFromList_Impl( USHORT nImageId, BOOL bBig, BOOL bHighContra 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 ) { |