[Libreoffice-commits] .: Branch 'feature/gsoc_test_improvements2' - 7 commits - drawinglayer/inc drawinglayer/source

Artur Dorda adorda at kemper.freedesktop.org
Wed Jul 4 10:02:31 PDT 2012


 drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx |   19 +
 drawinglayer/source/dumper/EnhancedShapeDumper.cxx    |  206 ++++++++++++++++++
 drawinglayer/source/dumper/XShapeDumper.cxx           |    5 
 3 files changed, 230 insertions(+)

New commits:
commit ea85bb3f72cad70404c0ae7a3750f36737a27b15
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Wed Jul 4 19:01:54 2012 +0200

    Added dumping of TextPathAllowed & SubViewSize properties
    
    Change-Id: I4088e15cf010f2c0c4493b9a7781c9720d375480

diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index 11cb429..74c231c 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -44,6 +44,7 @@
 
 #include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
 #include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
+#include <com/sun/star/awt/Size.hpp>
 
 #ifndef EnhancedShapeDumper_hxx
 #define EnhancedShapeDumper_hxx
@@ -132,6 +133,8 @@ public:
     void dumpGluePointTypeAsAttribute(sal_Int32 aGluePointType);
     void dumpExtrusionAllowedAsAttribute(sal_Bool bExtrusionAllowed);
     void dumpConcentricGradientFillAllowedAsAttribute(sal_Bool bConcentricGradientFillAllowed);
+    void dumpTextPathAllowedAsAttribute(sal_Bool bTextPathAllowed);
+    void dumpSubViewSizeAsElement(com::sun::star::uno::Sequence< com::sun::star::awt::Size > aSubViewSize);
 
 private:
     xmlTextWriterPtr xmlWriter;
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index 4020309..735919b 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -877,6 +877,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< bea
         if(anotherAny >>= bConcentricGradientFillAllowed)
             dumpConcentricGradientFillAllowedAsAttribute(bConcentricGradientFillAllowed);
     }
+    {
+        uno::Any anotherAny = xPropSet->getPropertyValue("TextPathAllowed");
+        sal_Bool bTextPathAllowed;
+        if(anotherAny >>= bTextPathAllowed)
+            dumpTextPathAllowedAsAttribute(bTextPathAllowed);
+    }
+    {
+        uno::Any anotherAny = xPropSet->getPropertyValue("SubViewSize");
+        uno::Sequence< awt::Size > aSubViewSize;
+        if(anotherAny >>= aSubViewSize)
+            dumpSubViewSizeAsElement(aSubViewSize);
+    }
 }
 
 void EnhancedShapeDumper::dumpCoordinatesAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates)
@@ -984,4 +996,24 @@ void EnhancedShapeDumper::dumpConcentricGradientFillAllowedAsAttribute(sal_Bool
         xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("concentricGradientFillAllowed"), "%s", "false");
 }
 
+void EnhancedShapeDumper::dumpTextPathAllowedAsAttribute(sal_Bool bTextPathAllowed)
+{
+    if(bTextPathAllowed)
+        xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathAllowed"), "%s", "true");
+    else
+        xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textPathAllowed"), "%s", "false");
+}
 
+void EnhancedShapeDumper::dumpSubViewSizeAsElement(uno::Sequence< awt::Size > aSubViewSize)
+{
+    xmlTextWriterStartElement(xmlWriter, BAD_CAST( "SubViewSize" ));
+    sal_Int32 nLength = aSubViewSize.getLength();
+    for (sal_Int32 i = 0; i < nLength; ++i)
+    {
+        xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Size" ));
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, aSubViewSize[i].Width);
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, aSubViewSize[i].Height);
+        xmlTextWriterEndElement( xmlWriter );
+    }
+    xmlTextWriterEndElement( xmlWriter );
+}
commit bf8c908471e1205d78a7c4df30f5286017c9351c
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Wed Jul 4 18:58:29 2012 +0200

    Added dumping of ExtrusionAllowed & ConcentricGradientFillAllowed properties
    
    Change-Id: I696c7bfc6f0f7e50d0f0ae84a9e96c6b2f1bd554

diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index 4beef8f..11cb429 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -130,6 +130,8 @@ public:
     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);
+    void dumpExtrusionAllowedAsAttribute(sal_Bool bExtrusionAllowed);
+    void dumpConcentricGradientFillAllowedAsAttribute(sal_Bool bConcentricGradientFillAllowed);
 
 private:
     xmlTextWriterPtr xmlWriter;
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index a3a3479..4020309 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -865,6 +865,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< bea
         if(anotherAny >>= aGluePointType)
             dumpGluePointTypeAsAttribute(aGluePointType);
     }
+    {
+        uno::Any anotherAny = xPropSet->getPropertyValue("ExtrusionAllowed");
+        sal_Bool bExtrusionAllowed;
+        if(anotherAny >>= bExtrusionAllowed)
+            dumpExtrusionAllowedAsAttribute(bExtrusionAllowed);
+    }
+    {
+        uno::Any anotherAny = xPropSet->getPropertyValue("ConcentricGradientFillAllowed");
+        sal_Bool bConcentricGradientFillAllowed;
+        if(anotherAny >>= bConcentricGradientFillAllowed)
+            dumpConcentricGradientFillAllowedAsAttribute(bConcentricGradientFillAllowed);
+    }
 }
 
 void EnhancedShapeDumper::dumpCoordinatesAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates)
@@ -956,4 +968,20 @@ void EnhancedShapeDumper::dumpGluePointTypeAsAttribute(sal_Int32 aGluePointType)
     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("gluePointType"), "%" SAL_PRIdINT32, aGluePointType);
 }
 
+void EnhancedShapeDumper::dumpExtrusionAllowedAsAttribute(sal_Bool bExtrusionAllowed)
+{
+    if(bExtrusionAllowed)
+        xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusionAllowed"), "%s", "true");
+    else
+        xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("extrusionAllowed"), "%s", "false");
+}
+
+void EnhancedShapeDumper::dumpConcentricGradientFillAllowedAsAttribute(sal_Bool bConcentricGradientFillAllowed)
+{
+    if(bConcentricGradientFillAllowed)
+        xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("concentricGradientFillAllowed"), "%s", "true");
+    else
+        xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("concentricGradientFillAllowed"), "%s", "false");
+}
+
 
commit e5b97335cc519975bbba97a85641b65d258e49cd
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Wed Jul 4 18:56:28 2012 +0200

    Added dumping of GluePointLeavingDirections & GluePointType properties
    
    Change-Id: Ie83dfd31196cc9777e4d582f45f27ff74482d2b4

diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index 894e530..4beef8f 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 ca532d1..a3a3479 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);
+}
+
 
commit 4c07d6b87e80ec153a7d2fe64ab298810aca3cb6
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Wed Jul 4 18:52:04 2012 +0200

    Added dumping of TextFrames & GluePoints properties
    
    Change-Id: Ibaa5f782d511d406575bfec6267f95d6ae50b87c

diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index 9823483..894e530 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -43,6 +43,7 @@
 #include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp>
 
 #include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
+#include <com/sun/star/drawing/EnhancedCustomShapeTextFrame.hpp>
 
 #ifndef EnhancedShapeDumper_hxx
 #define EnhancedShapeDumper_hxx
@@ -125,6 +126,8 @@ public:
     void dumpSegmentsAsElement(com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeSegment > aSegments);
     void dumpStretchXAsAttribute(sal_Int32 aStretchX);
     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);
 
 private:
     xmlTextWriterPtr xmlWriter;
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index a461c47..ca532d1 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -841,6 +841,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< bea
         if(anotherAny >>= aStretchY)
             dumpStretchYAsAttribute(aStretchY);
     }
+    {
+        uno::Any anotherAny = xPropSet->getPropertyValue("TextFrames");
+        uno::Sequence< drawing::EnhancedCustomShapeTextFrame > aTextFrames;
+        if(anotherAny >>= aTextFrames)
+            dumpTextFramesAsElement(aTextFrames);
+    }
+    {
+        uno::Any anotherAny = xPropSet->getPropertyValue("GluePoints");
+        uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aGluePoints;
+        if(anotherAny >>= aGluePoints)
+            dumpGluePointsAsElement(aGluePoints);
+    }
 }
 
 void EnhancedShapeDumper::dumpCoordinatesAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates)
@@ -882,4 +894,38 @@ void EnhancedShapeDumper::dumpStretchYAsAttribute(sal_Int32 aStretchY)
     xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stretchY"), "%" SAL_PRIdINT32, aStretchY);
 }
 
+void EnhancedShapeDumper::dumpTextFramesAsElement(uno::Sequence< drawing::EnhancedCustomShapeTextFrame > aTextFrames)
+{
+    xmlTextWriterStartElement(xmlWriter, BAD_CAST( "TextFrames" ));
+    sal_Int32 nLength = aTextFrames.getLength();
+    for (sal_Int32 i = 0; i < nLength; ++i)
+    {
+        xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeTextFrame" ));
+        {
+        xmlTextWriterStartElement(xmlWriter, BAD_CAST( "TopLeft" ));
+        dumpEnhancedCustomShapeParameterPair(aTextFrames[i].TopLeft);
+        xmlTextWriterEndElement( xmlWriter );
+
+        xmlTextWriterStartElement(xmlWriter, BAD_CAST( "BottomRight" ));
+        dumpEnhancedCustomShapeParameterPair(aTextFrames[i].BottomRight);
+        xmlTextWriterEndElement( xmlWriter );
+        }
+        xmlTextWriterEndElement( xmlWriter );
+    }
+    xmlTextWriterEndElement( xmlWriter );
+}
+
+void EnhancedShapeDumper::dumpGluePointsAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aGluePoints)
+{
+    xmlTextWriterStartElement(xmlWriter, BAD_CAST( "GluePoints" ));
+    sal_Int32 nLength = aGluePoints.getLength();
+    for (sal_Int32 i = 0; i < nLength; ++i)
+    {
+        xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeParameterPair" ));
+        dumpEnhancedCustomShapeParameterPair(aGluePoints[i]);
+        xmlTextWriterEndElement( xmlWriter );
+    }
+    xmlTextWriterEndElement( xmlWriter );
+}
+
 
commit e7c4f8a5299bd2891672fb1cd0aa69b8a0adac8e
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Wed Jul 4 18:30:48 2012 +0200

    Added dumping of StretchX & StretchY properties
    
    Change-Id: Iddd10cb3baffbb3f40bd6af15e48bcfb7ea8317e

diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index 6742021..9823483 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -123,6 +123,8 @@ public:
     void dumpEnhancedCustomShapePathService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet);
     void dumpCoordinatesAsElement(com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair > aCoordinates);
     void dumpSegmentsAsElement(com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeSegment > aSegments);
+    void dumpStretchXAsAttribute(sal_Int32 aStretchX);
+    void dumpStretchYAsAttribute(sal_Int32 aStretchY);
 
 private:
     xmlTextWriterPtr xmlWriter;
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index dbb7f56..a461c47 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -829,6 +829,18 @@ void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< bea
         if(anotherAny >>= aSegments)
             dumpSegmentsAsElement(aSegments);
     }
+    {
+        uno::Any anotherAny = xPropSet->getPropertyValue("StretchX");
+        sal_Int32 aStretchX;
+        if(anotherAny >>= aStretchX)
+            dumpStretchXAsAttribute(aStretchX);
+    }
+    {
+        uno::Any anotherAny = xPropSet->getPropertyValue("StretchY");
+        sal_Int32 aStretchY;
+        if(anotherAny >>= aStretchY)
+            dumpStretchYAsAttribute(aStretchY);
+    }
 }
 
 void EnhancedShapeDumper::dumpCoordinatesAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates)
@@ -860,4 +872,14 @@ void EnhancedShapeDumper::dumpSegmentsAsElement(uno::Sequence< drawing::Enhanced
     xmlTextWriterEndElement( xmlWriter );
 }
 
+void EnhancedShapeDumper::dumpStretchXAsAttribute(sal_Int32 aStretchX)
+{
+    xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stretchX"), "%" SAL_PRIdINT32, aStretchX);
+}
+
+void EnhancedShapeDumper::dumpStretchYAsAttribute(sal_Int32 aStretchY)
+{
+    xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("stretchY"), "%" SAL_PRIdINT32, aStretchY);
+}
+
 
commit 16858653d6b403aa870d2e0ceca13531ea384010
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Wed Jul 4 17:57:42 2012 +0200

    Added dumping of Coordinates & Segments properties
    
    Change-Id: I4acfe9f1d1ca9bb4f434376bd6fd23804b66a25f

diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index 74947ca..6742021 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -42,6 +42,8 @@
 #include <com/sun/star/beans/PropertyValues.hpp>
 #include <com/sun/star/drawing/EnhancedCustomShapeParameter.hpp>
 
+#include <com/sun/star/drawing/EnhancedCustomShapeSegment.hpp>
+
 #ifndef EnhancedShapeDumper_hxx
 #define EnhancedShapeDumper_hxx
 
@@ -119,6 +121,8 @@ public:
 
     // EnhancedCustomShapePath.idl
     void dumpEnhancedCustomShapePathService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet);
+    void dumpCoordinatesAsElement(com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeParameterPair > aCoordinates);
+    void dumpSegmentsAsElement(com::sun::star::uno::Sequence< com::sun::star::drawing::EnhancedCustomShapeSegment > aSegments);
 
 private:
     xmlTextWriterPtr xmlWriter;
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index e7940a2..dbb7f56 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -817,5 +817,47 @@ void EnhancedShapeDumper::dumpRadiusRangeMaximumAsElement(drawing::EnhancedCusto
 
 void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< beans::XPropertySet > xPropSet)
 {
+    {
+        uno::Any anotherAny = xPropSet->getPropertyValue("Coordinates");
+        uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates;
+        if(anotherAny >>= aCoordinates)
+            dumpCoordinatesAsElement(aCoordinates);
+    }
+    {
+        uno::Any anotherAny = xPropSet->getPropertyValue("Segments");
+        uno::Sequence< drawing::EnhancedCustomShapeSegment > aSegments;
+        if(anotherAny >>= aSegments)
+            dumpSegmentsAsElement(aSegments);
+    }
+}
 
+void EnhancedShapeDumper::dumpCoordinatesAsElement(uno::Sequence< drawing::EnhancedCustomShapeParameterPair > aCoordinates)
+{
+    xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Coordinates" ));
+    sal_Int32 nLength = aCoordinates.getLength();
+    for (sal_Int32 i = 0; i < nLength; ++i)
+    {
+        xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeParameterPair" ));
+        dumpEnhancedCustomShapeParameterPair(aCoordinates[i]);
+        xmlTextWriterEndElement( xmlWriter );
+    }
+    xmlTextWriterEndElement( xmlWriter );
 }
+
+void EnhancedShapeDumper::dumpSegmentsAsElement(uno::Sequence< drawing::EnhancedCustomShapeSegment > aSegments)
+{
+    xmlTextWriterStartElement(xmlWriter, BAD_CAST( "Segments" ));
+    sal_Int32 nLength = aSegments.getLength();
+    for (sal_Int32 i = 0; i < nLength; ++i)
+    {
+        xmlTextWriterStartElement(xmlWriter, BAD_CAST( "EnhancedCustomShapeSegment" ));
+        sal_Int32 aCommand = aSegments[i].Command;
+        sal_Int32 aCount = aSegments[i].Count;
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("command"), "%" SAL_PRIdINT32, aCommand);
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("count"), "%" SAL_PRIdINT32, aCount);
+        xmlTextWriterEndElement( xmlWriter );
+    }
+    xmlTextWriterEndElement( xmlWriter );
+}
+
+
commit 4547ca53d0063a67d5e4af1c61cc92d1842afd14
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Wed Jul 4 17:45:11 2012 +0200

    Started dumping of EnhancedCustomShapePath service
    
    Change-Id: I11ded0e19f4a9f619546af2ff838ad7aeadd7429

diff --git a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
index a93a524..74947ca 100644
--- a/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/EnhancedShapeDumper.hxx
@@ -117,6 +117,9 @@ public:
     void dumpRadiusRangeMinimumAsElement(com::sun::star::drawing::EnhancedCustomShapeParameter aRadiusRangeMinimum);
     void dumpRadiusRangeMaximumAsElement(com::sun::star::drawing::EnhancedCustomShapeParameter aRadiusRangeMaximum);
 
+    // EnhancedCustomShapePath.idl
+    void dumpEnhancedCustomShapePathService(com::sun::star::uno::Reference< com::sun::star::beans::XPropertySet > xPropSet);
+
 private:
     xmlTextWriterPtr xmlWriter;
 };
diff --git a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
index 5f55913..e7940a2 100644
--- a/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
+++ b/drawinglayer/source/dumper/EnhancedShapeDumper.cxx
@@ -811,3 +811,11 @@ void EnhancedShapeDumper::dumpRadiusRangeMaximumAsElement(drawing::EnhancedCusto
     xmlTextWriterEndElement( xmlWriter );
 }
 
+// ------------------------------------------------------
+// ---------- EnhancedCustomShapePath.idl ---------------
+// ------------------------------------------------------
+
+void EnhancedShapeDumper::dumpEnhancedCustomShapePathService(uno::Reference< beans::XPropertySet > xPropSet)
+{
+
+}
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index c0dc89e..c1c8941 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -1828,6 +1828,11 @@ namespace {
             EnhancedShapeDumper enhancedDumper(xmlWriter);
             enhancedDumper.dumpEnhancedCustomShapeHandleService(xPropSet);
         }
+        if(xServiceInfo->supportsService("com.sun.star.drawing.EnhancedCustomShapePath"))
+        {
+            EnhancedShapeDumper enhancedDumper(xmlWriter);
+            enhancedDumper.dumpEnhancedCustomShapePathService(xPropSet);
+        }
         }   // end of the 'try' block
         catch (com::sun::star::beans::UnknownPropertyException &e)
         {


More information about the Libreoffice-commits mailing list