diff options
author | Artur Dorda <artur.dorda+libo@gmail.com> | 2012-07-03 20:52:32 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-12 03:10:15 +0200 |
commit | 6c245e0687c4ff9f7b4e6240282a11ca600d2e32 (patch) | |
tree | b0f8a08b0e84d7688c503a5d93b71a0acdf71195 /drawinglayer | |
parent | 5324d0d3086f1d528c69164b74dc6a7672fe0c97 (diff) |
Added properties FirstLightDirection & SecondLightDirection
Change-Id: I7236ac0df42765e351b75a75fa2fa66422a72277
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx | 2 | ||||
-rw-r--r-- | drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 26 |
2 files changed, 28 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx index 2265a523ff76..bc2e713f2c5d 100644 --- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx +++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx @@ -61,6 +61,8 @@ public: void dumpSecondLightHarshAsAttribute(sal_Bool bSecondLightHarsh); void dumpFirstLightLevelAsAttribute(double aFirstLightLevel); void dumpSecondLightLevelAsAttribute(double aSecondLightLevel); + void dumpFirstLightDirectionAsElement(com::sun::star::drawing::Direction3D aFirstLightDirection); + void dumpSecondLightDirectionAsElement(com::sun::star::drawing::Direction3D aSecondLightDirection); private: xmlTextWriterPtr xmlWriter; diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index 5cfb0358b16d..a4eafb6f1447 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -98,6 +98,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference if(anotherAny >>= aSecondLightLevel) dumpSecondLightLevelAsAttribute(aSecondLightLevel); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("FirstLightDirection"); + drawing::Direction3D aFirstLightDirection; + if(anotherAny >>= aFirstLightDirection) + dumpFirstLightDirectionAsElement(aFirstLightDirection); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("SecondLightDirection"); + drawing::Direction3D aSecondLightDirection; + if(anotherAny >>= aSecondLightDirection) + dumpSecondLightDirectionAsElement(aSecondLightDirection); + } } void EnhancedShapeDumper::dumpExtrusionAsAttribute(sal_Bool bExtrusion) { @@ -198,4 +210,18 @@ void EnhancedShapeDumper::dumpDirection3D(drawing::Direction3D aDirection3D) xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("directionZ"), "%f", aDirection3D.DirectionZ); } +void EnhancedShapeDumper::dumpFirstLightDirectionAsElement(drawing::Direction3D aFirstLightDirection) +{ + xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FirstLightDirection" )); + dumpDirection3D(aFirstLightDirection); + xmlTextWriterEndElement( xmlWriter ); +} + +void EnhancedShapeDumper::dumpSecondLightDirectionAsElement(drawing::Direction3D aSecondLightDirection) +{ + xmlTextWriterStartElement(xmlWriter, BAD_CAST( "SecondLightDirection" )); + dumpDirection3D(aSecondLightDirection); + xmlTextWriterEndElement( xmlWriter ); +} + |