summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-06-15 23:24:53 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:13 +0200
commit6556f5b2f0c0e083b339c9d5dc672a8bfd3553b3 (patch)
tree64b40a244abbea04711a804a7ac8de0d1918e6a9
parent3639f80edcb6ca6b53afadcdf6d7d72fce441a22 (diff)
Added PolyPolygonBezier & Geometry properties
Change-Id: I8c7bad77c5904cc63ab1ff2e2cc1adeb7afbdc62
-rw-r--r--drawinglayer/inc/drawinglayer/XShapeDumper.hxx4
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx32
2 files changed, 35 insertions, 1 deletions
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 8ce450e06271..ccf613f30bbd 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -166,7 +166,8 @@ private:
void dumpHyperlinkAsAttribute(rtl::OUString sHyperlink, xmlTextWriterPtr xmlWriter);
// PolyPolygonBezierDescriptor.idl
- void dumpPolyPolygonBezierDescriptorService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
+ void dumpPolyPolygonBezierAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aPolyPolygonBezier, xmlTextWriterPtr xmlWriter);
+ void dumpGeometryAsElement(com::sun::star::drawing::PolyPolygonBezierCoords aGeometry, xmlTextWriterPtr xmlWriter);
// XShape.idl
void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
@@ -182,6 +183,7 @@ private:
void dumpShadowPropertiesService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter);
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);
};
#endif
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index c0cc783bba96..e7e6f0086aca 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -974,6 +974,26 @@ namespace {
rtl::OUStringToOString(xDescr->getShapeType(), RTL_TEXTENCODING_UTF8).getStr());
}
+ // -----------------------------------------------------
+ // ---------- PolyPolygonBezierDescriptor.idl ----------
+ // -----------------------------------------------------
+
+ void XShapeDumper::dumpPolyPolygonBezierAsElement(drawing::PolyPolygonBezierCoords aPolyPolygonBezier, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "PolyPolygonBezier" ));
+ dumpPolyPolygonBezierCoords(aPolyPolygonBezier, xmlWriter);
+ xmlTextWriterEndElement( xmlWriter );
+ }
+
+ void XShapeDumper::dumpGeometryAsElement(drawing::PolyPolygonBezierCoords aGeometry, xmlTextWriterPtr xmlWriter)
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Geometry" ));
+ dumpPolyPolygonBezierCoords(aGeometry, xmlWriter);
+ xmlTextWriterEndElement( xmlWriter );
+ }
+
+ // dumping services
+
void XShapeDumper::dumpTextPropertiesService(uno::Reference< beans::XPropertySet > xPropSet, xmlTextWriterPtr xmlWriter)
{
uno::Reference< beans::XPropertySetInfo> xInfo = xPropSet->getPropertySetInfo();
@@ -1496,6 +1516,18 @@ namespace {
if(anotherAny >>= ePolygonKind)
dumpPolygonKindAsAttribute(ePolygonKind, xmlWriter);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("PolyPolygonBezier");
+ drawing::PolyPolygonBezierCoords aPolyPolygonBezier;
+ if(anotherAny >>= aPolyPolygonBezier)
+ dumpPolyPolygonBezierCoords(aPolyPolygonBezier, xmlWriter);
+ }
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("Geometry");
+ drawing::PolyPolygonBezierCoords aGeometry;
+ if(anotherAny >>= aGeometry)
+ dumpPolyPolygonBezierCoords(aGeometry, xmlWriter);
+ }
}
void XShapeDumper::dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter)