diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-02-09 11:39:02 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-02-09 11:39:02 +0000 |
commit | 8a99338e6a39f25f56490a1941b3bbdc9508539c (patch) | |
tree | 8402790a1bb0e12e897209d838b08520287bcd98 /framework/source/uielement | |
parent | a69aca13ee5d94250001b534040cfe9f4880a0f0 (diff) |
don't show broken icon for missing menu entries, but do for toolbar entries
Diffstat (limited to 'framework/source/uielement')
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 02120e10afbe..5f5f18cfd7e0 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 |