From f48bd974cb652d28d7a80a9084f75c1daaadac50 Mon Sep 17 00:00:00 2001 From: Artur Dorda Date: Wed, 4 Jul 2012 19:10:45 +0200 Subject: Added dumping TextPathMode & ScaleX properties Change-Id: Ib31fc84424d4a57e8f3bcca2054016c5809b6f10 --- drawinglayer/source/dumper/EnhancedShapeDumper.cxx | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'drawinglayer/source/dumper') diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx index a880d6b3972c..7ecbb3c5f1ab 100644 --- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx +++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx @@ -1030,6 +1030,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeTextPathService(uno::Reference< if(anotherAny >>= bTextPath) dumpTextPathAsAttribute(bTextPath); } + { + uno::Any anotherAny = xPropSet->getPropertyValue("TextPathMode"); + drawing::EnhancedCustomShapeTextPathMode eTextPathMode; + if(anotherAny >>= eTextPathMode) + dumpTextPathModeAsAttribute(eTextPathMode); + } + { + uno::Any anotherAny = xPropSet->getPropertyValue("ScaleX"); + sal_Bool bScaleX; + if(anotherAny >>= bScaleX) + dumpScaleXAsAttribute(bScaleX); + } } void EnhancedShapeDumper::dumpTextPathAsAttribute(sal_Bool bTextPath) @@ -1040,3 +1052,28 @@ void EnhancedShapeDumper::dumpTextPathAsAttribute(sal_Bool bTextPath) xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPath"), "%s", "false"); } +void EnhancedShapeDumper::dumpTextPathModeAsAttribute(drawing::EnhancedCustomShapeTextPathMode eTextPathMode) +{ + switch(eTextPathMode) + { + case drawing::EnhancedCustomShapeTextPathMode_NORMAL: + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathMode"), "%s", "NORMAL"); + break; + case drawing::EnhancedCustomShapeTextPathMode_PATH: + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathMode"), "%s", "PATH"); + break; + case drawing::EnhancedCustomShapeTextPathMode_SHAPE: + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathMode"), "%s", "SHAPE"); + break; + default: + break; + } +} + +void EnhancedShapeDumper::dumpScaleXAsAttribute(sal_Bool bScaleX) +{ + if(bScaleX) + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("scaleX"), "%s", "true"); + else + xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("scaleX"), "%s", "false"); +} -- cgit