diff options
author | Artur Dorda <artur.dorda+libo@gmail.com> | 2012-07-04 15:01:16 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2012-07-12 03:10:18 +0200 |
commit | bd6f8d3f9e21b149a42527e5d4f6e3252c6e2242 (patch) | |
tree | c3cce18bc5abea571d3bf77ec92235974ebd4d52 /drawinglayer | |
parent | a7cb63e3e772259ff86f8207651808a66fd4167f (diff) |
Added dumping of Switched & Position properties
Change-Id: Ice30218ba8ec66807089174058951c7607f9b6cb
Diffstat (limited to 'drawinglayer')
-rw-r--r-- | drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx | 2 | ||||
-rw-r--r-- | drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 29 |
2 files changed, 31 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx index c4786ac0a856..9922f309086e 100644 --- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx +++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx @@ -101,6 +101,8 @@ public: // EnhancedCustomShapeHandle.idl void dumpEnhancedCustomShapeHandleService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet); + void dumpSwitchedAsAttribute(sal_Bool bSwitched); + void dumpPositionAsElement(com::sun::star::drawing::EnhancedCustomShapeParameterPair aPosition); private: xmlTextWriterPtr xmlWriter; diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index 57546011b6a8..4306b22fb487 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -650,4 +650,33 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeHandleService(uno::Reference< b if(anotherAny >>= bMirroredY) dumpMirroredYAsAttribute(bMirroredY); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("Switched"); + sal_Bool bSwitched; + if(anotherAny >>= bSwitched) + dumpSwitchedAsAttribute(bSwitched); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("Position"); + drawing::EnhancedCustomShapeParameterPair aPosition; + if(anotherAny >>= aPosition) + dumpPositionAsElement(aPosition); + } +} + +void EnhancedShapeDumper::dumpSwitchedAsAttribute(sal_Bool bSwitched) +{ + if(bSwitched) + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("switched"), "%s", "true"); + else + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("switched"), "%s", "false"); } + +void EnhancedShapeDumper::dumpPositionAsElement(drawing::EnhancedCustomShapeParameterPair aPosition) +{ + xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Position" )); + dumpEnhancedCustomShapeParameterPair(aPosition); + xmlTextWriterEndElement( xmlWriter ); +} + + |