diff options
author | Artur Dorda <artur.dorda+libo@gmail.com> | 2012-07-03 16:10:31 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-12 03:10:14 +0200 |
commit | 0857b88d97d2de5041218a072044438f32f31fc3 (patch) | |
tree | d6c3fb644f7b4f67d3c51a21af542f3f2c73186b /drawinglayer | |
parent | 3b18024e5447a5bcce291aa9442d53cc79eeda1d (diff) |
Added properties NumberOfLineSegments & {
Change-Id: I04e6db01c14344b1f7a71b587b7437fd87e72d99
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx | 2 | ||||
-rw-r--r-- | drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 27 |
2 files changed, 29 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx index f328a94fd747..99b4f34dd645 100644 --- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx +++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx @@ -53,6 +53,8 @@ public: void dumpBrightnessAsAttribute(double aBrightness); void dumpDepthAsElement(com::sun::star::drawing::EnhancedCustomShapeParameterPair aDepth); void dumpDiffusionAsAttribute(double aDiffusion); + void dumpNumberOfLineSegmentsAsAttribute(sal_Int32 aNumberOfLineSegments); + void dumpLightFaceAsAttribute(sal_Bool bLightFace); private: xmlTextWriterPtr xmlWriter; diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index aee479e04706..8bf533faa25d 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -62,6 +62,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference if(anotherAny >>= aDiffusion) dumpDiffusionAsAttribute(aDiffusion); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("NumberOfLineSegments"); + sal_Int32 aNumberOfLineSegments; + if(anotherAny >>= aNumberOfLineSegments) + dumpNumberOfLineSegmentsAsAttribute(aNumberOfLineSegments); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("LightFace"); + sal_Bool bLightFace; + if(anotherAny >>= bLightFace) + dumpLightFaceAsAttribute(bLightFace); + } } void EnhancedShapeDumper::dumpExtrusionAsAttribute(sal_Bool bExtrusion) { @@ -115,3 +127,18 @@ void EnhancedShapeDumper::dumpDiffusionAsAttribute(double aDiffusion) { xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("diffusion"), "%f", aDiffusion); } + +void EnhancedShapeDumper::dumpNumberOfLineSegmentsAsAttribute(sal_Int32 aNumberOfLineSegments) +{ + xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("numberOfLineSegments"), "%" SAL_PRIdINT32, aNumberOfLineSegments); +} + +void EnhancedShapeDumper::dumpLightFaceAsAttribute(sal_Bool bLightFace) +{ + if(bLightFace) + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lightFace"), "%s", "true"); + else + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("lightFace"), "%s", "false"); +} + + |