diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2011-05-31 20:55:53 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2011-05-31 20:55:53 +0200 |
commit | 99dd0380012e76ff2c871425d7c58c2e64b8973f (patch) | |
tree | 56c0a8b66e89b0ccb942d57518b5f1dd1d43cf7a /svtools/source/misc/imagemgr.cxx | |
parent | 6e20f6a854c7f006a0b80caa7d6c7bab7da49aaf (diff) |
vcl::DeleteOnDeinit for static BitmapEx objects
they should not outlive VCL cleanup (need X connection, etc.)
Diffstat (limited to 'svtools/source/misc/imagemgr.cxx')
-rw-r--r-- | svtools/source/misc/imagemgr.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svtools/source/misc/imagemgr.cxx b/svtools/source/misc/imagemgr.cxx index 8a56a3005e1b..e6c5ecb1f934 100644 --- a/svtools/source/misc/imagemgr.cxx +++ b/svtools/source/misc/imagemgr.cxx @@ -54,7 +54,7 @@ #include <svtools/imagemgr.hrc> #include <svtools/svtdata.hxx> #include <osl/mutex.hxx> -#include <boost/scoped_ptr.hpp> +#include <vcl/lazydelete.hxx> // globals ******************************************************************* @@ -509,8 +509,8 @@ static Image GetImageFromList_Impl( sal_uInt16 nImageId, sal_Bool bBig ) ImageList* pList = NULL; - static boost::scoped_ptr<ImageList> xSmallImageList; - static boost::scoped_ptr<ImageList> xBigImageList; + static vcl::DeleteOnDeinit< ImageList > xSmallImageList( NULL ); + static vcl::DeleteOnDeinit< ImageList > xBigImageList( NULL ); static sal_uLong nStyle = Application::GetSettings().GetStyleSettings().GetSymbolsStyle(); // If the style has been changed, throw away our cache of the older images @@ -523,13 +523,13 @@ static Image GetImageFromList_Impl( sal_uInt16 nImageId, sal_Bool bBig ) if ( bBig ) { - if ( !xBigImageList ) + if ( !xBigImageList.get() ) xBigImageList.reset(new ImageList(SvtResId(RID_SVTOOLS_IMAGELIST_BIG))); pList = xBigImageList.get(); } else { - if ( !xSmallImageList ) + if ( !xSmallImageList.get() ) xSmallImageList.reset(new ImageList(SvtResId(RID_SVTOOLS_IMAGELIST_SMALL))); pList = xSmallImageList.get(); } |