summaryrefslogtreecommitdiffstats
path: root/svtools
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-05-31 20:55:53 +0200
committerLuboš Luňák <l.lunak@suse.cz>2011-05-31 20:55:53 +0200
commit99dd0380012e76ff2c871425d7c58c2e64b8973f (patch)
tree56c0a8b66e89b0ccb942d57518b5f1dd1d43cf7a /svtools
parentimplement vcl::DeleteOnDeinit::reset() (diff)
downloadcore-99dd0380012e76ff2c871425d7c58c2e64b8973f.tar.gz
core-99dd0380012e76ff2c871425d7c58c2e64b8973f.zip
vcl::DeleteOnDeinit for static BitmapEx objects
they should not outlive VCL cleanup (need X connection, etc.)
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/misc/imagemgr.cxx10
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();
}