diff options
Diffstat (limited to 'svx/source/unodraw/unoshap2.cxx')
-rw-r--r-- | svx/source/unodraw/unoshap2.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 6a726a7deca0..fbed04557448 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -38,6 +38,7 @@ #include <vcl/graphicfilter.hxx> #include <vcl/wmf.hxx> #include <vcl/cvtgrf.hxx> +#include <vcl/GraphicLoader.hxx> #include <svx/svdpool.hxx> @@ -1363,6 +1364,21 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte break; } + case OWN_ATTR_GRAPHIC_URL: + { + OUString aURL; + if (rValue >>= aURL) + { + Graphic aGraphic = vcl::graphic::loadFromURL(aURL); + if (aGraphic) + { + static_cast<SdrGrafObj*>(GetSdrObject())->SetGraphic(aGraphic); + bOk = true; + } + } + break; + } + case OWN_ATTR_VALUE_GRAPHIC: { Reference< graphic::XGraphic > xGraphic( rValue, uno::UNO_QUERY ); @@ -1531,6 +1547,12 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte break; } + case OWN_ATTR_GRAPHIC_URL: + { + throw uno::RuntimeException("Getting from this property is not unsupported"); + break; + } + case OWN_ATTR_VALUE_GRAPHIC: { Reference<graphic::XGraphic> xGraphic; |