summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-06-16 01:52:24 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:13 +0200
commit89683e605855995450320c9751b4a6832a1baa58 (patch)
tree6766d4176cb832b4b51590bdc8f4d29d53b37465
parent3d766ba84cad3227d0ce62eaf44e8328479907e9 (diff)
Added CustomShapeData property
Change-Id: I9b41a8b427098126224bff268bf0b9be9ec3e2ef
-rw-r--r--drawinglayer/inc/drawinglayer/XShapeDumper.hxx1
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx12
2 files changed, 13 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 9caec462c738..135b15701e47 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -171,6 +171,7 @@ private:
// CustomShape.idl
void dumpCustomShapeEngineAsAttribute(rtl::OUString sCustomShapeEngine, xmlTextWriterPtr xmlWriter);
+ void dumpCustomShapeDataAsAttribute(rtl::OUString sCustomShapeData, xmlTextWriterPtr xmlWriter);
// XShape.idl
void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 63b8a793fdef..9eb524b9fa16 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -1002,6 +1002,12 @@ namespace {
rtl::OUStringToOString(sCustomShapeEngine, RTL_TEXTENCODING_UTF8).getStr());
}
+ void XShapeDumper::dumpCustomShapeDataAsAttribute(rtl::OUString sCustomShapeData, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("customShapeData"), "%s",
+ rtl::OUStringToOString(sCustomShapeData, RTL_TEXTENCODING_UTF8).getStr());
+ }
+
// methods dumping whole services
void XShapeDumper::dumpTextPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
@@ -1548,6 +1554,12 @@ namespace {
if(anotherAny >>= sCustomShapeEngine)
dumpCustomShapeEngineAsAttribute(sCustomShapeEngine, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("CustomShapeData");
+ rtl::OUString sCustomShapeData;
+ if(anotherAny >>= sCustomShapeData)
+ dumpCustomShapeDataAsAttribute(sCustomShapeData, xmlWriter);
+ }
}
void XShapeDumper::dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter)