summaryrefslogtreecommitdiffstats
path: root/drawinglayer
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-07-03 16:04:32 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:14 +0200
commit3b18024e5447a5bcce291aa9442d53cc79eeda1d (patch)
tree3bd48f69960221dea6b8d07e69f8d84ea3debc65 /drawinglayer
parentAdded auxiliary method for dumping EnhancedCustomShapeParameterPair (diff)
downloadcore-3b18024e5447a5bcce291aa9442d53cc79eeda1d.tar.gz
core-3b18024e5447a5bcce291aa9442d53cc79eeda1d.zip
Added properties Depth & Diffusion
Change-Id: If9aaf021bcdd0a43bbc32e08236f8bc39c7cda82
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx2
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx23
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);
+}