[Libreoffice-commits] .: framework/source
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Feb 9 03:39:10 PST 2011
framework/source/uiconfiguration/imagemanagerimpl.cxx | 16 +---------------
framework/source/uielement/toolbarmanager.cxx | 12 ++++++++++--
2 files changed, 11 insertions(+), 17 deletions(-)
New commits:
commit 8ed3685cf4682097e1b00b8dc0c5db2206142245
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Feb 9 11:39:02 2011 +0000
don't show broken icon for missing menu entries, but do for toolbar entries
diff --git a/framework/source/uiconfiguration/imagemanagerimpl.cxx b/framework/source/uiconfiguration/imagemanagerimpl.cxx
index bca1f2d..4c978b5 100644
--- a/framework/source/uiconfiguration/imagemanagerimpl.cxx
+++ b/framework/source/uiconfiguration/imagemanagerimpl.cxx
@@ -63,12 +63,6 @@
#include <rtl/logfile.hxx>
#include "svtools/miscopt.hxx"
-#include "vcl/imagerepository.hxx"
-
-//_________________________________________________________________________________________________________________
-// namespaces
-//_________________________________________________________________________________________________________________
-
using ::rtl::OUString;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::XInterface;
@@ -363,15 +357,7 @@ GlobalImageList::~GlobalImageList()
Image GlobalImageList::getImageFromCommandURL( sal_Int16 nImageType, const rtl::OUString& rCommandURL )
{
osl::MutexGuard guard( getGlobalImageListMutex() );
- Image aImage = CmdImageList::getImageFromCommandURL( nImageType, rCommandURL );
- if (!aImage)
- {
- BitmapEx rBitmap;
- bool res = ::vcl::ImageRepository::loadDefaultImage(rBitmap);
- if (res)
- aImage = Image(rBitmap);
- }
- return aImage;
+ return CmdImageList::getImageFromCommandURL( nImageType, rCommandURL );
}
bool GlobalImageList::hasImage( sal_Int16 nImageType, const rtl::OUString& rCommandURL )
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 1efed61..fe94cc5 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -91,6 +91,7 @@
#include <unotools/cmdoptions.hxx>
#include <boost/bind.hpp>
#include <svtools/acceleratorexecute.hxx>
+#include <vcl/imagerepository.hxx>
//_________________________________________________________________________________________________________________
// namespaces
@@ -1558,11 +1559,18 @@ void ToolBarManager::RequestImages()
if ( !aImage )
{
aImage = Image( aModGraphicSeq[i] );
- // Try also to query for add-on images before giving up and use an
- // empty image.
+ // Try also to query for add-on images
if ( !aImage )
aImage = QueryAddonsImage( aCmdURLSeq[i], bBigImages );
+ // Give up and use a placeholder image.
+ if (!aImage)
+ {
+ BitmapEx aBitmap;
+ if (::vcl::ImageRepository::loadDefaultImage(aBitmap))
+ aImage = Image(aBitmap);
+ }
+
pIter->second.nImageInfo = 1; // mark image as module based
}
else
More information about the Libreoffice-commits
mailing list