[Libreoffice-commits] .: framework/source

Michael Meeks mmeeks at kemper.freedesktop.org
Thu Dec 9 11:17:59 PST 2010


 framework/source/uiconfiguration/imagemanagerimpl.cxx |   12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

New commits:
commit 0ccd40120936ab4b9b1063fbeea5637ea9daa74c
Author: Joachim Tremouroux <joachim.tremouroux at gmail.com>
Date:   Thu Dec 9 19:15:19 2010 +0000

    finish cleanup of missing icon handling code

diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index fabf676..fb74b4b 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 )


More information about the Libreoffice-commits mailing list