summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-06-15 23:48:58 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:13 +0200
commit3d766ba84cad3227d0ce62eaf44e8328479907e9 (patch)
tree7ea1bfd92cabcac6b322edee6e2cfb137edb3d76 /drawinglayer
parent6556f5b2f0c0e083b339c9d5dc672a8bfd3553b3 (diff)
Started dumping CustomShape service. Added CustomShapeEngine property
Change-Id: If1d11d5dfcf101a3599bc828f6ac515624b087a1
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/XShapeDumper.hxx4
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx22
2 files changed, 25 insertions, 1 deletions
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index ccf613f30bbd..9caec462c738 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -169,6 +169,9 @@ private:
void dumpPolyPolygonBezierAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aPolyPolygonBezier, xmlTextWriterPtr xmlWriter);
void dumpGeometryAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aGeometry, xmlTextWriterPtr xmlWriter);
+ // CustomShape.idl
+ void dumpCustomShapeEngineAsAttribute(rtl::OUString sCustomShapeEngine, xmlTextWriterPtr xmlWriter);
+
// XShape.idl
void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
@@ -184,6 +187,7 @@ private:
void dumpPolyPolygonDescriptorService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
void dumpShapeService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
void dumpPolyPolygonBezierDescriptorService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
+ void dumpCustomShapeService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
};
#endif
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index e7e6f0086aca..63b8a793fdef 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -992,7 +992,17 @@ namespace {
xmlTextWriterEndElement( xmlWriter );
}
- // dumping services
+ // -------------------------------------
+ // ---------- CustomShape.idl ----------
+ // -------------------------------------
+
+ void XShapeDumper::dumpCustomShapeEngineAsAttribute(rtl::OUString sCustomShapeEngine, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("customShapeEngine"), "%s",
+ rtl::OUStringToOString(sCustomShapeEngine, RTL_TEXTENCODING_UTF8).getStr());
+ }
+
+ // methods dumping whole services
void XShapeDumper::dumpTextPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
{
@@ -1530,6 +1540,16 @@ namespace {
}
}
+ void XShapeDumper::dumpCustomShapeService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
+ {
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("CustomShapeEngine");
+ rtl::OUString sCustomShapeEngine;
+ if(anotherAny >>= sCustomShapeEngine)
+ dumpCustomShapeEngineAsAttribute(sCustomShapeEngine, xmlWriter);
+ }
+ }
+
void XShapeDumper::dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter)
{
xmlTextWriterStartElement( xmlWriter, BAD_CAST( "XShape" ) );