summaryrefslogtreecommitdiff
path: root/framework/source/uiconfiguration
diff options
context:
space:
mode:
authorJoachim Tremouroux <joachim.tremouroux@gmail.com>2010-12-09 19:15:19 +0000
committerMichael Meeks <michael.meeks@novell.com>2010-12-09 19:17:04 +0000
commit70a6ef3b7576cbdf7e74a2ffbb84629b4a5ac477 (patch)
treec8e56989b98051d7f09a364b12a240d83721f895 /framework/source/uiconfiguration
parentc2df791b70c6063af421163be8fe00a5a2143e0c (diff)
finish cleanup of missing icon handling code
Diffstat (limited to 'framework/source/uiconfiguration')
-rw-r--r--framework/source/uiconfiguration/imagemanagerimpl.cxx12
1 files changed, 11 insertions, 1 deletions
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index 24330148eb32..f2d3e2f97ac2 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -63,6 +63,8 @@
#include <rtl/logfile.hxx>
#include "svtools/miscopt.hxx"
+#include "vcl/imagerepository.hxx"
+
//_________________________________________________________________________________________________________________
// namespaces
//_________________________________________________________________________________________________________________
@@ -361,7 +363,15 @@ GlobalImageList::~GlobalImageList()
Image GlobalImageList::getImageFromCommandURL( sal_Int16 nImageType, const rtl::OUString& rCommandURL )
{
osl::MutexGuard guard( getGlobalImageListMutex() );
- return CmdImageList::getImageFromCommandURL( nImageType, rCommandURL );
+ Image aImage = CmdImageList::getImageFromCommandURL( nImageType, rCommandURL );
+ if (!aImage)
+ {
+ BitmapEx rBitmap;
+ bool res = ::vcl::ImageRepository::loadDefaultImage(rBitmap);
+ if (res)
+ aImage = Image(rBitmap);
+ }
+ return aImage;
}
bool GlobalImageList::hasImage( sal_Int16 nImageType, const rtl::OUString& rCommandURL )