summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx4
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx28
2 files changed, 32 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index 6c30dda2df99..aecb856b42d6 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -29,6 +29,7 @@
#include <libxml/xmlwriter.h>
#include <drawinglayer/drawinglayerdllapi.h>
#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>
#ifndef EnhancedShapeDumper_hxx
#define EnhancedShapeDumper_hxx
@@ -43,6 +44,9 @@ public:
}
+ // auxiliary functions
+ void dumpEnhancedCustomShapeParameterPair(com::sun::star::drawing::EnhancedCustomShapeParameterPair aParameterPair);
+
// EnhancedCustomShapeExtrusion.idl
void dumpEnhancedCustomShapeExtrusionService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet);
void dumpExtrusionAsAttribute(sal_Bool bExtrusion);
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index 542a687b6c6c..85bfd276f9e1 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -64,3 +64,31 @@ void EnhancedShapeDumper::dumpBrightnessAsAttribute(double aBrightness)
xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("brightness"), "%f", aBrightness);
}
+void EnhancedShapeDumper::dumpEnhancedCustomShapeParameterPair(drawing::EnhancedCustomShapeParameterPair aParameterPair)
+{
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "First" ));
+ uno::Any aAny = aParameterPair.First.Value;
+ rtl::OUString sValue;
+ if(aAny >>= sValue)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s",
+ rtl::OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
+ }
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%" SAL_PRIdINT32, aParameterPair.First.Type);
+ xmlTextWriterEndElement( xmlWriter );
+ }
+ {
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Second" ));
+ uno::Any aAny = aParameterPair.Second.Value;
+ rtl::OUString sValue;
+ if(aAny >>= sValue)
+ {
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("value"), "%s",
+ rtl::OUStringToOString(sValue, RTL_TEXTENCODING_UTF8).getStr());
+ }
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%" SAL_PRIdINT32, aParameterPair.Second.Type);
+ xmlTextWriterEndElement( xmlWriter );
+ }
+}
+