Kaydet (Commit) 3501827a authored tarafından Artur Dorda's avatar Artur Dorda Kaydeden (comit) Markus Mohrhard

Added properties Specularity & ProjectionMode

Change-Id: I9e614c571f8d8db1cf00d3251cc4b09ff1dde278
üst 39becd1a
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp> #include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
#include <com/sun/star/drawing/Direction3D.hpp> #include <com/sun/star/drawing/Direction3D.hpp>
#include <com/sun/star/drawing/ShadeMode.hpp> #include <com/sun/star/drawing/ShadeMode.hpp>
#include <com/sun/star/drawing/ProjectionMode.hpp>
#ifndef EnhancedShapeDumper_hxx #ifndef EnhancedShapeDumper_hxx
#define EnhancedShapeDumper_hxx #define EnhancedShapeDumper_hxx
...@@ -70,6 +71,8 @@ public: ...@@ -70,6 +71,8 @@ public:
void dumpRotationCenterAsElement(com::sun::star::drawing::Direction3D aRotationCenter); void dumpRotationCenterAsElement(com::sun::star::drawing::Direction3D aRotationCenter);
void dumpShininessAsAttribute(double aShininess); void dumpShininessAsAttribute(double aShininess);
void dumpSkewAsElement(com::sun::star::drawing::EnhancedCustomShapeParameterPair aSkew); void dumpSkewAsElement(com::sun::star::drawing::EnhancedCustomShapeParameterPair aSkew);
void dumpSpecularityAsAttribute(double aSpecularity);
void dumpProjectionModeAsAttribute(com::sun::star::drawing::ProjectionMode eProjectionMode);
private: private:
xmlTextWriterPtr xmlWriter; xmlTextWriterPtr xmlWriter;
......
...@@ -146,6 +146,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference ...@@ -146,6 +146,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference
if(anotherAny >>= aSkew) if(anotherAny >>= aSkew)
dumpSkewAsElement(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) void EnhancedShapeDumper::dumpExtrusionAsAttribute(sal_Bool bExtrusion)
{ {
...@@ -315,4 +327,24 @@ void EnhancedShapeDumper::dumpSkewAsElement(drawing::EnhancedCustomShapeParamete ...@@ -315,4 +327,24 @@ void EnhancedShapeDumper::dumpSkewAsElement(drawing::EnhancedCustomShapeParamete
xmlTextWriterEndElement( xmlWriter ); 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;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment