summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-07-04 19:10:45 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:20 +0200
commitf48bd974cb652d28d7a80a9084f75c1daaadac50 (patch)
treecdc433c69c35a15d15f0e60506c4083cba02363e /drawinglayer
parentec5b681bbeeb800e67dd228616c29694a9f7a400 (diff)
Added dumping TextPathMode & ScaleX properties
Change-Id: Ib31fc84424d4a57e8f3bcca2054016c5809b6f10
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx4
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx37
2 files changed, 41 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index 7fc85597dc9e..7bad73c7e497 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -46,6 +46,8 @@
#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextPathMode.hpp>
+
#ifndef EnhancedShapeDumper_hxx
#define EnhancedShapeDumper_hxx
@@ -139,6 +141,8 @@ public:
// EnhancedCustomShapePath.idl
void dumpEnhancedCustomShapeTextPathService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet);
void dumpTextPathAsAttribute(sal_Bool bTextPath);
+ void dumpTextPathModeAsAttribute(com::sun::star::drawing::EnhancedCustomShapeTextPathMode eTextPathMode);
+ void dumpScaleXAsAttribute(sal_Bool bScaleX);
private:
xmlTextWriterPtr xmlWriter;
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");
+}