From 3501827a4fecd0ca174715a5688ddaf10ad33cdf Mon Sep 17 00:00:00 2001 From: Artur Dorda Date: Tue, 3 Jul 2012 21:10:05 +0200 Subject: Added properties Specularity & ProjectionMode Change-Id: I9e614c571f8d8db1cf00d3251cc4b09ff1dde278 --- drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 32 ++++++++++++++++++++++ 1 file changed, 32 insertions(+) (limited to 'drawinglayer/source/dumper') diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index 85c57876c857..5b9b5acd3da6 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -146,6 +146,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference if(anotherAny >>= aSkew) dumpSkewAsElement(aSkew); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("Specularity"); + double aSpecularity; + if(anotherAny >>= aSpecularity) + dumpSpecularityAsAttribute(aSpecularity); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("ProjectionMode"); + drawing::ProjectionMode eProjectionMode; + if(anotherAny >>= eProjectionMode) + dumpProjectionModeAsAttribute(eProjectionMode); + } } void EnhancedShapeDumper::dumpExtrusionAsAttribute(sal_Bool bExtrusion) { @@ -315,4 +327,24 @@ void EnhancedShapeDumper::dumpSkewAsElement(drawing::EnhancedCustomShapeParamete xmlTextWriterEndElement( xmlWriter ); } +void EnhancedShapeDumper::dumpSpecularityAsAttribute(double aSpecularity) +{ + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("specularity"), "%f", aSpecularity); +} + +void EnhancedShapeDumper::dumpProjectionModeAsAttribute(drawing::ProjectionMode eProjectionMode) +{ + switch(eProjectionMode) + { + case drawing::ProjectionMode_PARALLEL: + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("projectionMode"), "%s", "PARALLEL"); + break; + case drawing::ProjectionMode_PERSPECTIVE: + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("projectionMode"), "%s", "PERSPECTIVE"); + break; + default: + break; + } +} + -- cgit