summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/inc/vcl/fixed.hxx2
-rw-r--r--vcl/source/control/fixed.cxx21
2 files changed, 22 insertions, 1 deletions
diff --git a/vcl/inc/vcl/fixed.hxx b/vcl/inc/vcl/fixed.hxx
index 94d70dc399de..c36b63d73ec9 100644
--- a/vcl/inc/vcl/fixed.hxx
+++ b/vcl/inc/vcl/fixed.hxx
@@ -186,7 +186,7 @@ public:
sal_Bool SetModeImage( const Image& rImage );
const Image& GetModeImage( ) const;
-;
+ virtual bool set_property(const rtl::OString &rKey, const rtl::OString &rValue);
};
#endif // _SV_FIXED_HXX
diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx
index 982e3ec3d53c..f8e8b3ddc6de 100644
--- a/vcl/source/control/fixed.cxx
+++ b/vcl/source/control/fixed.cxx
@@ -24,8 +24,10 @@
#include "vcl/dialog.hxx"
#include "vcl/event.hxx"
#include "vcl/fixed.hxx"
+#include "vcl/svapp.hxx"
#include <comphelper/string.hxx>
#include "controldata.hxx"
+#include "impimagetree.hxx"
#include "window.h"
// =======================================================================
@@ -1193,4 +1195,23 @@ const Image& FixedImage::GetModeImage( ) const
return maImage;
}
+bool FixedImage::set_property(const rtl::OString &rKey, const rtl::OString &rValue)
+{
+ if (rKey == "pixbuf")
+ {
+ static ImplImageTreeSingletonRef aImageTree;
+ OUString sCurrentSymbolsStyle =
+ Application::GetSettings().GetStyleSettings().GetCurrentSymbolsStyleName();
+ const OUString sFileName(OStringToOUString(rValue, RTL_TEXTENCODING_UTF8));
+ BitmapEx aBitmap;
+ bool bSuccess = aImageTree->loadImage(sFileName, sCurrentSymbolsStyle, aBitmap, true);
+ SAL_WARN_IF(!bSuccess, "vcl.layout", "Unable to load " << sFileName
+ << " from theme " << sCurrentSymbolsStyle);
+ SetImage(Image(aBitmap));
+ }
+ else
+ return Control::set_property(rKey, rValue);
+ return true;
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */