summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx4
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx32
2 files changed, 36 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index a461a88e1634..74f434fa01ba 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -35,6 +35,8 @@
#include <com/sun/star/drawing/ProjectionMode.hpp>
#include <com/sun/star/drawing/Position3D.hpp>
+#include <com/sun/star/awt/Rectangle.hpp>
+
#ifndef EnhancedShapeDumper_hxx
#define EnhancedShapeDumper_hxx
@@ -81,6 +83,8 @@ public:
// EnhancedCustomShapeGeometry.idl
void dumpEnhancedCustomShapeGeometryService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet);
void dumpTypeAsAttribute(rtl::OUString sType);
+ void dumpViewBoxAsElement(com::sun::star::awt::Rectangle aViewBox);
+ void dumpMirroredXAsAttribute(sal_Bool bMirroredX);
private:
xmlTextWriterPtr xmlWriter;
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index 10f7572d3adc..94970998582f 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -403,9 +403,41 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapeGeometryService(uno::Reference<
if(anotherAny >>= sType)
dumpTypeAsAttribute(sType);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("ViewBox");
+ awt::Rectangle aViewBox;
+ if(anotherAny >>= aViewBox)
+ dumpViewBoxAsElement(aViewBox);
+ }
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("MirroredX");
+ sal_Bool bMirroredX;
+ if(anotherAny >>= bMirroredX)
+ dumpMirroredXAsAttribute(bMirroredX);
+ }
}
void EnhancedShapeDumper::dumpTypeAsAttribute(rtl::OUString sType)
{
xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%s",
rtl::OUStringToOString(sType, RTL_TEXTENCODING_UTF8).getStr());
}
+
+void EnhancedShapeDumper::dumpViewBoxAsElement(awt::Rectangle aViewBox)
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "ViewBox" ));
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("x"), "%" SAL_PRIdINT32, aViewBox.X);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("y"), "%" SAL_PRIdINT32, aViewBox.Y);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, aViewBox.Width);
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, aViewBox.Height);
+ xmlTextWriterEndElement( xmlWriter );
+ }
+
+void EnhancedShapeDumper::dumpMirroredXAsAttribute(sal_Bool bMirroredX)
+ {
+ if(bMirroredX)
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("mirroredX"), "%s", "true");
+ else
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("mirroredX"), "%s", "false");
+ }
+
+