summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-07-04 19:07:31 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:20 +0200
commitec5b681bbeeb800e67dd228616c29694a9f7a400 (patch)
tree82e4a6cf65e58d86dad6932cf6cffd9f854714f8 /drawinglayer
parentcf7e4d3cedaee86da6887ff068565185fee4874a (diff)
Started dumping EnhancedCustomShapeTextPath service & added TextPath property
Change-Id: I4945ee8cba2d9d4fc9f374cf0002dbdb99d6df28
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx4
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx23
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx5
3 files changed, 32 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index 74c231cfb484..7fc85597dc9e 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -136,6 +136,10 @@ public:
void dumpTextPathAllowedAsAttribute(sal_Bool bTextPathAllowed);
void dumpSubViewSizeAsElement(com::sun::star::uno::Sequence< com::sun::star::awt::Size > aSubViewSize);
+ // EnhancedCustomShapePath.idl
+ void dumpEnhancedCustomShapeTextPathService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet);
+ void dumpTextPathAsAttribute(sal_Bool bTextPath);
+
private:
xmlTextWriterPtr xmlWriter;
};
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index 735919b16cbc..a880d6b3972c 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -1017,3 +1017,26 @@ void EnhancedShapeDumper::dumpSubViewSizeAsElement(uno::Sequence< awt::Size > aS
}
xmlTextWriterEndElement( xmlWriter );
}
+
+// ----------------------------------------------------------
+// ---------- EnhancedCustomShapeTextPath.idl ---------------
+// ----------------------------------------------------------
+
+void EnhancedShapeDumper::dumpEnhancedCustomShapeTextPathService(uno::Reference< beans::XPropertySet > xPropSet)
+{
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("TextPath");
+ sal_Bool bTextPath;
+ if(anotherAny >>= bTextPath)
+ dumpTextPathAsAttribute(bTextPath);
+ }
+}
+
+void EnhancedShapeDumper::dumpTextPathAsAttribute(sal_Bool bTextPath)
+{
+ if(bTextPath)
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPath"), "%s", "true");
+ else
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPath"), "%s", "false");
+}
+
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index c1c89418a2ca..1503bbe28230 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -1833,6 +1833,11 @@ namespace {
EnhancedShapeDumper enhancedDumper(xmlWriter);
enhancedDumper.dumpEnhancedCustomShapePathService(xPropSet);
}
+ if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapeTextPath"))
+ {
+ EnhancedShapeDumper enhancedDumper(xmlWriter);
+ enhancedDumper.dumpEnhancedCustomShapeTextPathService(xPropSet);
+ }
} // end of the 'try' block
catch (com::sun::star::beans::UnknownPropertyException &e)
{