From b83881ac5a8053cbbef98db6980f80d134ba792c Mon Sep 17 00:00:00 2001 From: Artur Dorda Date: Tue, 3 Jul 2012 21:01:40 +0200 Subject: Added properties RotateAngle & RotationCenter Change-Id: I97d52be4904657eacb7cea4ebec789e6dd9a4722 --- .../inc/drawinglayer/EnhancedShapeDumper.hxx | 2 ++ drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 26 ++++++++++++++++++++++ 2 files changed, 28 insertions(+) (limited to 'drawinglayer') diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx index aca302b5356a..6e25dc92bd7f 100644 --- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx +++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx @@ -66,6 +66,8 @@ public: void dumpSecondLightDirectionAsElement(com::sun::star::drawing::Direction3D aSecondLightDirection); void dumpMetalAsAttribute(sal_Bool bMetal); void dumpShadeModeAsAttribute(com::sun::star::drawing::ShadeMode eShadeMode); + void dumpRotateAngleAsElement(com::sun::star::drawing::EnhancedCustomShapeParameterPair aRotateAngle); + void dumpRotationCenterAsElement(com::sun::star::drawing::Direction3D aRotationCenter); private: xmlTextWriterPtr xmlWriter; diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index 527115fed3d2..dc92e425a43a 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -122,6 +122,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference if(anotherAny >>= eShadeMode) dumpShadeModeAsAttribute(eShadeMode); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("RotateAngle"); + drawing::EnhancedCustomShapeParameterPair aRotateAngle; + if(anotherAny >>= aRotateAngle) + dumpRotateAngleAsElement(aRotateAngle); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("RotationCenter"); + drawing::Direction3D aRotationCenter; + if(anotherAny >>= aRotationCenter) + dumpRotationCenterAsElement(aRotationCenter); + } } void EnhancedShapeDumper::dumpExtrusionAsAttribute(sal_Bool bExtrusion) { @@ -265,4 +277,18 @@ void EnhancedShapeDumper::dumpShadeModeAsAttribute(drawing::ShadeMode eShadeMode } } +void EnhancedShapeDumper::dumpRotateAngleAsElement(drawing::EnhancedCustomShapeParameterPair aRotateAngle) +{ + xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RotateAngle" )); + dumpEnhancedCustomShapeParameterPair(aRotateAngle); + xmlTextWriterEndElement( xmlWriter ); +} + +void EnhancedShapeDumper::dumpRotationCenterAsElement(drawing::Direction3D aRotationCenter) +{ + xmlTextWriterStartElement(xmlWriter, BAD_CAST( "RotationCenter" )); + dumpDirection3D(aRotationCenter); + xmlTextWriterEndElement( xmlWriter ); +} + -- cgit