diff options
author | Artur Dorda <artur.dorda+libo@gmail.com> | 2012-07-03 16:04:32 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-12 03:10:14 +0200 |
commit | 3b18024e5447a5bcce291aa9442d53cc79eeda1d (patch) | |
tree | 3bd48f69960221dea6b8d07e69f8d84ea3debc65 /drawinglayer | |
parent | 3b97877219087a0d47f55bf5b7a080e3ed0df8f6 (diff) |
Added properties Depth & Diffusion
Change-Id: If9aaf021bcdd0a43bbc32e08236f8bc39c7cda82
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx | 2 | ||||
-rw-r--r-- | drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 23 |
2 files changed, 25 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx index aecb856b42d6..f328a94fd747 100644 --- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx +++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx @@ -51,6 +51,8 @@ public: void dumpEnhancedCustomShapeExtrusionService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet); void dumpExtrusionAsAttribute(sal_Bool bExtrusion); void dumpBrightnessAsAttribute(double aBrightness); + void dumpDepthAsElement(com::sun::star::drawing::EnhancedCustomShapeParameterPair aDepth); + void dumpDiffusionAsAttribute(double aDiffusion); private: xmlTextWriterPtr xmlWriter; diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index 85bfd276f9e1..aee479e04706 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -50,6 +50,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference if(anotherAny >>= aBrightness) dumpBrightnessAsAttribute(aBrightness); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("Depth"); + drawing::EnhancedCustomShapeParameterPair aDepth; + if(anotherAny >>= aDepth) + dumpDepthAsElement(aDepth); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("Diffusion"); + double aDiffusion; + if(anotherAny >>= aDiffusion) + dumpDiffusionAsAttribute(aDiffusion); + } } void EnhancedShapeDumper::dumpExtrusionAsAttribute(sal_Bool bExtrusion) { @@ -92,3 +104,14 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeParameterPair(drawing::Enhanced } } +void EnhancedShapeDumper::dumpDepthAsElement(drawing::EnhancedCustomShapeParameterPair aDepth) +{ + xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Depth" )); + dumpEnhancedCustomShapeParameterPair(aDepth); + xmlTextWriterEndElement( xmlWriter ); +} + +void EnhancedShapeDumper::dumpDiffusionAsAttribute(double aDiffusion) +{ + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("diffusion"), "%f", aDiffusion); +} |