From 39e516aaedd8261949d7c866c550dd3e00274a17 Mon Sep 17 00:00:00 2001 From: Artur Dorda Date: Tue, 3 Jul 2012 21:23:31 +0200 Subject: Added properties ViewPoint & Origin Change-Id: I87deba7504eff3feb6671835b33768045f502ba5 --- drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'drawinglayer/source/dumper') diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index 5b9b5acd3da6..152e1faabe8f 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -158,6 +158,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeExtrusionService(uno::Reference if(anotherAny >>= eProjectionMode) dumpProjectionModeAsAttribute(eProjectionMode); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("ViewPoint"); + drawing::Position3D aViewPoint; + if(anotherAny >>= aViewPoint) + dumpViewPointAsElement(aViewPoint); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("Origin"); + drawing::EnhancedCustomShapeParameterPair aOrigin; + if(anotherAny >>= aOrigin) + dumpOriginAsElement(aOrigin); + } } void EnhancedShapeDumper::dumpExtrusionAsAttribute(sal_Bool bExtrusion) { @@ -347,4 +359,20 @@ void EnhancedShapeDumper::dumpProjectionModeAsAttribute(drawing::ProjectionMode } } +void EnhancedShapeDumper::dumpViewPointAsElement(drawing::Position3D aViewPoint) +{ + xmlTextWriterStartElement(xmlWriter, BAD_CAST( "ViewPoint" )); + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("positionX"), "%f", aViewPoint.PositionX); + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("positionY"), "%f", aViewPoint.PositionY); + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("positionZ"), "%f", aViewPoint.PositionZ); + xmlTextWriterEndElement( xmlWriter ); +} + +void EnhancedShapeDumper::dumpOriginAsElement(drawing::EnhancedCustomShapeParameterPair aOrigin) +{ + xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Origin" )); + dumpEnhancedCustomShapeParameterPair(aOrigin); + xmlTextWriterEndElement( xmlWriter ); +} + -- cgit