From 549db19b4d85e2379028d06e089c1c5ffee2526e Mon Sep 17 00:00:00 2001 From: Artur Dorda Date: Tue, 3 Jul 2012 20:25:52 +0200 Subject: Added properties FirstLightLevel & SecondLightLevel Change-Id: Ia7ff7cd84c5b26d1a2f7898a271a800d9731b65f --- .../inc/drawinglayer/EnhancedShapeDumper.hxx | 2 ++ drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) (limited to 'drawinglayer') diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx index b11666fdf0cd..412c33764b9e 100644 --- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx +++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx @@ -57,6 +57,8 @@ public: void dumpLightFaceAsAttribute(sal_Bool bLightFace); void dumpFirstLightHarshAsAttribute(sal_Bool bFirstLightHarsh); void dumpSecondLightHarshAsAttribute(sal_Bool bSecondLightHarsh); + void dumpFirstLightLevelAsAttribute(double aFirstLightLevel); + void dumpSecondLightLevelAsAttribute(double aSecondLightLevel); private: xmlTextWriterPtr xmlWriter; diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index b12a34b5db68..15f65b986b54 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -86,6 +86,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference if(anotherAny >>= bSecondLightHarsh) dumpSecondLightHarshAsAttribute(bSecondLightHarsh); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("FirstLightLevel"); + double aFirstLightLevel; + if(anotherAny >>= aFirstLightLevel) + dumpFirstLightLevelAsAttribute(aFirstLightLevel); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("SecondLightLevel"); + double aSecondLightLevel; + if(anotherAny >>= aSecondLightLevel) + dumpSecondLightLevelAsAttribute(aSecondLightLevel); + } } void EnhancedShapeDumper::dumpExtrusionAsAttribute(sal_Bool bExtrusion) { @@ -169,4 +181,14 @@ void EnhancedShapeDumper::dumpSecondLightHarshAsAttribute(sal_Bool bSecondLightH xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("secondLightHarsh"), "%s", "false"); } +void EnhancedShapeDumper::dumpFirstLightLevelAsAttribute(double aFirstLightLevel) +{ + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("firstLightLevel"), "%f", aFirstLightLevel); +} + +void EnhancedShapeDumper::dumpSecondLightLevelAsAttribute(double aSecondLightLevel) +{ + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("secondLightLevel"), "%f", aSecondLightLevel); +} + -- cgit