summaryrefslogtreecommitdiff
path: root/vcl/source/graphic/UnoGraphicDescriptor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/graphic/UnoGraphicDescriptor.cxx')
-rw-r--r--vcl/source/graphic/UnoGraphicDescriptor.cxx24
1 files changed, 22 insertions, 2 deletions
diff --git a/vcl/source/graphic/UnoGraphicDescriptor.cxx b/vcl/source/graphic/UnoGraphicDescriptor.cxx
index 49e1c01769cd..6f4a37af2c17 100644
--- a/vcl/source/graphic/UnoGraphicDescriptor.cxx
+++ b/vcl/source/graphic/UnoGraphicDescriptor.cxx
@@ -34,7 +34,6 @@
#include <vcl/svapp.hxx>
#include <memory>
-
enum class UnoGraphicProperty
{
GraphicType = 1
@@ -45,6 +44,8 @@ enum class UnoGraphicProperty
, Transparent = 6
, Alpha = 7
, Animated = 8
+ , Linked = 9
+ , OriginURL = 10
};
@@ -241,6 +242,9 @@ rtl::Reference<::comphelper::PropertySetInfo> GraphicDescriptor::createPropertyS
{ OUString( "Transparent" ), static_cast< sal_Int32 >( UnoGraphicProperty::Transparent ), cppu::UnoType< sal_Bool >::get(), beans::PropertyAttribute::READONLY, 0 },
{ OUString( "Alpha" ), static_cast< sal_Int32 >( UnoGraphicProperty::Alpha ), cppu::UnoType< sal_Bool >::get(), beans::PropertyAttribute::READONLY, 0 },
{ OUString( "Animated" ), static_cast< sal_Int32 >( UnoGraphicProperty::Animated ), cppu::UnoType< sal_Bool >::get(), beans::PropertyAttribute::READONLY, 0 },
+ { OUString("Linked"), sal_Int32(UnoGraphicProperty::Linked), cppu::UnoType<sal_Bool>::get(), beans::PropertyAttribute::READONLY, 0 },
+ { OUString("OriginURL"), sal_Int32(UnoGraphicProperty::OriginURL), cppu::UnoType<OUString>::get(), beans::PropertyAttribute::READONLY, 0 },
+
{ OUString(), 0, css::uno::Type(), 0, 0 }
};
@@ -327,7 +331,7 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
{
if( mpGraphic->GetType() == GraphicType::Bitmap )
{
- const Size aSizePix( mpGraphic->GetBitmapEx().GetSizePixel() );
+ const Size aSizePix( mpGraphic->GetSizePixel() );
aAWTSize = awt::Size( aSizePix.Width(), aSizePix.Height() );
}
}
@@ -393,6 +397,22 @@ void GraphicDescriptor::_getPropertyValues( const comphelper::PropertyMapEntry**
*pValues <<= mpGraphic && mpGraphic->IsAnimated();
}
break;
+
+ case UnoGraphicProperty::Linked:
+ {
+ *pValues <<= mpGraphic && !mpGraphic->getOriginURL().isEmpty();
+ }
+ break;
+
+ case UnoGraphicProperty::OriginURL:
+ {
+ OUString aOriginURL;
+ if (mpGraphic)
+ aOriginURL = mpGraphic->getOriginURL();
+
+ *pValues <<= aOriginURL;
+ }
+ break;
}
++ppEntries;