summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-07-04 18:56:28 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:20 +0200
commit8b79eeb8181e459c6fa82847f9d5ec36cc06f998 (patch)
treee2220298228be61b071d7368de85d7cbcb3d4026 /drawinglayer
parent85ff400da59a8bb0ab64d2676696fddcd5714858 (diff)
Added dumping of GluePointLeavingDirections & GluePointType properties
Change-Id: Ie83dfd31196cc9777e4d582f45f27ff74482d2b4
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx2
-rw-r--r--drawinglayer/source/dumper/EnhancedShapeDumper.cxx28
2 files changed, 30 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index 894e530bbc08..4beef8fd858f 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -128,6 +128,8 @@ public:
void dumpStretchYAsAttribute(sal_Int32 aStretchY);
void dumpTextFramesAsElement(com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeTextFrame > aTextFrames);
void dumpGluePointsAsElement(com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair > aGluePoints);
+ void dumpGluePointLeavingDirectionsAsElement(com::sun::star::uno::Sequence< double > aGluePointLeavingDirections);
+ void dumpGluePointTypeAsAttribute(sal_Int32 aGluePointType);
private:
xmlTextWriterPtr xmlWriter;
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index ca532d15cac9..a3a34791439a 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -853,6 +853,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< bea
if(anotherAny >>= aGluePoints)
dumpGluePointsAsElement(aGluePoints);
}
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("GluePointLeavingDirections");
+ uno::Sequence< double > aGluePointLeavingDirections;
+ if(anotherAny >>= aGluePointLeavingDirections)
+ dumpGluePointLeavingDirectionsAsElement(aGluePointLeavingDirections);
+ }
+ {
+ uno::Any anotherAny = xPropSet->getPropertyValue("GluePointType");
+ sal_Int32 aGluePointType;
+ if(anotherAny >>= aGluePointType)
+ dumpGluePointTypeAsAttribute(aGluePointType);
+ }
}
void EnhancedShapeDumper::dumpCoordinatesAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates)
@@ -928,4 +940,20 @@ void EnhancedShapeDumper::dumpGluePointsAsElement(uno::Sequence< drawing::Enhanc
xmlTextWriterEndElement( xmlWriter );
}
+void EnhancedShapeDumper::dumpGluePointLeavingDirectionsAsElement(uno::Sequence< double > aGluePointLeavingDirections)
+{
+ xmlTextWriterStartElement(xmlWriter, BAD_CAST( "GluePointLeavingDirections" ));
+ sal_Int32 nLength = aGluePointLeavingDirections.getLength();
+ for (sal_Int32 i = 0; i < nLength; ++i)
+ {
+ xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("value"), "%f", aGluePointLeavingDirections[i]);
+ }
+ xmlTextWriterEndElement( xmlWriter );
+}
+
+void EnhancedShapeDumper::dumpGluePointTypeAsAttribute(sal_Int32 aGluePointType)
+{
+ xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("gluePointType"), "%" SAL_PRIdINT32, aGluePointType);
+}
+