summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-07-03 20:52:32 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:15 +0200
commit6c245e0687c4ff9f7b4e6240282a11ca600d2e32 (patch)
treeb0f8a08b0e84d7688c503a5d93b71a0acdf71195 /drawinglayer
parent5324d0d3086f1d528c69164b74dc6a7672fe0c97 (diff)
Added properties FirstLightDirection & SecondLightDirection
Change-Id: I7236ac0df42765e351b75a75fa2fa66422a72277
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx2
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx26
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 );
+}
+