summaryrefslogtreecommitdiff
path: root/drawinglayer/source/dumper
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-07-03 21:10:05 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:16 +0200
commit3501827a4fecd0ca174715a5688ddaf10ad33cdf (patch)
tree1d803e75d6cfcd4df14fb923bfe8b360ad6c10aa /drawinglayer/source/dumper
parent39becd1a50de51785de3428dc2a36aa257758081 (diff)
Added properties Specularity & ProjectionMode
Change-Id: I9e614c571f8d8db1cf00d3251cc4b09ff1dde278
Diffstat (limited to 'drawinglayer/source/dumper')
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx32
1 files changed, 32 insertions, 0 deletions
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;
+ }
+}
+