From 72fc403a6f90a7b4db5956acf2a572856aee9f7b Mon Sep 17 00:00:00 2001 From: Artur Dorda Date: Wed, 4 Jul 2012 18:58:29 +0200 Subject: Added dumping of ExtrusionAllowed & ConcentricGradientFillAllowed properties Change-Id: I696c7bfc6f0f7e50d0f0ae84a9e96c6b2f1bd554 --- drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'drawinglayer/source/dumper') diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index a3a34791439a..40203097b680 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -865,6 +865,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< bea if(anotherAny >>= aGluePointType) dumpGluePointTypeAsAttribute(aGluePointType); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("ExtrusionAllowed"); + sal_Bool bExtrusionAllowed; + if(anotherAny >>= bExtrusionAllowed) + dumpExtrusionAllowedAsAttribute(bExtrusionAllowed); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("ConcentricGradientFillAllowed"); + sal_Bool bConcentricGradientFillAllowed; + if(anotherAny >>= bConcentricGradientFillAllowed) + dumpConcentricGradientFillAllowedAsAttribute(bConcentricGradientFillAllowed); + } } void EnhancedShapeDumper::dumpCoordinatesAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates) @@ -956,4 +968,20 @@ void EnhancedShapeDumper::dumpGluePointTypeAsAttribute(sal_Int32 aGluePointType) xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("gluePointType"), "%" SAL_PRIdINT32, aGluePointType); } +void EnhancedShapeDumper::dumpExtrusionAllowedAsAttribute(sal_Bool bExtrusionAllowed) +{ + if(bExtrusionAllowed) + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusionAllowed"), "%s", "true"); + else + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusionAllowed"), "%s", "false"); +} + +void EnhancedShapeDumper::dumpConcentricGradientFillAllowedAsAttribute(sal_Bool bConcentricGradientFillAllowed) +{ + if(bConcentricGradientFillAllowed) + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("concentricGradientFillAllowed"), "%s", "true"); + else + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("concentricGradientFillAllowed"), "%s", "false"); +} + -- cgit