summaryrefslogtreecommitdiff
path: root/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-07-03 20:57:08 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:15 +0200
commitf104a3649608959b3b845dd3694aaf897e8808e6 (patch)
treeab0caed829ebf2c3ef5ddd0dc80c519c9bd3109e /drawinglayer/source/dumper/EnhancedShapeDumper.cxx
parent6c245e0687c4ff9f7b4e6240282a11ca600d2e32 (diff)
Added properties Metal & ShadeMode
Change-Id: I254a9089d78b97dde331812f77ad7977631b0d12
Diffstat (limited to 'drawinglayer/source/dumper/EnhancedShapeDumper.cxx')
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx41
1 files changed, 41 insertions, 0 deletions
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index a4eafb6f1447..527115fed3d2 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -110,6 +110,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference
if(anotherAny >>= aSecondLightDirection)
dumpSecondLightDirectionAsElement(aSecondLightDirection);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("Metal");
+ sal_Bool bMetal;
+ if(anotherAny >>= bMetal)
+ dumpMetalAsAttribute(bMetal);
+ }
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("ShadeMode");
+ drawing::ShadeMode eShadeMode;
+ if(anotherAny >>= eShadeMode)
+ dumpShadeModeAsAttribute(eShadeMode);
+ }
}
void EnhancedShapeDumper::dumpExtrusionAsAttribute(sal_Bool bExtrusion)
{
@@ -224,4 +236,33 @@ void EnhancedShapeDumper::dumpSecondLightDirectionAsElement(drawing::Direction3D
xmlTextWriterEndElement( xmlWriter );
}
+void EnhancedShapeDumper::dumpMetalAsAttribute(sal_Bool bMetal)
+{
+ if(bMetal)
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("metal"), "%s", "true");
+ else
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("metal"), "%s", "false");
+}
+
+void EnhancedShapeDumper::dumpShadeModeAsAttribute(drawing::ShadeMode eShadeMode)
+{
+ switch(eShadeMode)
+ {
+ case drawing::ShadeMode_FLAT:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadeMode"), "%s", "FLAT");
+ break;
+ case drawing::ShadeMode_PHONG:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadeMode"), "%s", "PHONG");
+ break;
+ case drawing::ShadeMode_SMOOTH:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadeMode"), "%s", "SMOOTH");
+ break;
+ case drawing::ShadeMode_DRAFT:
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("shadeMode"), "%s", "DRAFT");
+ break;
+ default:
+ break;
+ }
+}
+