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

Artur Dorda adorda at kemper.freedesktop.org
Thu Jun 7 15:12:09 PDT 2012


 drawinglayer/inc/drawinglayer/XShapeDumper.hxx |   11 +-
 drawinglayer/source/dumper/XShapeDumper.cxx    |  134 ++++++++++++++++++++++++-
 2 files changed, 142 insertions(+), 3 deletions(-)

New commits:
commit d5b3e1db197eccb4f6e506ecd9375f1dcf100f64
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Fri Jun 8 00:10:44 2012 +0200

    Added dumping [property] FillBitmapTile
    
    Change-Id: I14ccd56b98ca8054062fce43e261f50c2758f3a1

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 8f2dcd8..94f41e0 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -72,6 +72,7 @@ private:
     void dumpFillBitmapSizeYAsAttribute(sal_Int32 aBitmapSizeY, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapModeAsAttribute(com::sun::star::drawing::BitmapMode eBitmapMode, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapStretchAsAttribute(sal_Bool bBitmapStretch, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapTileAsAttribute(sal_Bool bBitmapTile, xmlTextWriterPtr xmlWriter);
 
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
     void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 4f18b16..247d5cc 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -320,6 +320,14 @@ namespace {
             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapStretch"), "%s", "false");
     }
 
+    void XShapeDumper::dumpFillBitmapTileAsAttribute(sal_Bool bBitmapTile, xmlTextWriterPtr xmlWriter)
+    {
+        if(bBitmapTile)
+            xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapTile"), "%s", "true");
+        else
+            xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapTile"), "%s", "false");
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -513,6 +521,12 @@ namespace {
                 if(anotherAny >>= bBitmapStretch)
                     dumpFillBitmapStretchAsAttribute(bBitmapStretch, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapTile");
+                sal_Bool bBitmapTile;
+                if(anotherAny >>= bBitmapTile)
+                    dumpFillBitmapTileAsAttribute(bBitmapTile, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit ce95c86f349f0e8b49c3b34f79732cde1befc164
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Fri Jun 8 00:08:34 2012 +0200

    Added dumping [property] FillBitmapStretch
    
    Change-Id: Iba0c6247c06690824b46754c9c84226590712336

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 4253ef9..8f2dcd8 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -58,7 +58,7 @@ private:
     void dumpFillGradientAsElement(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
     void dumpFillHatchNameAsAttribute(rtl::OUString sHatchName, xmlTextWriterPtr xmlWriter);
     void dumpFillHatchAsElement(com::sun::star::drawing::Hatch aHatch, xmlTextWriterPtr xmlWriter);
-    void dumpFillBackgroundAsAttribute(sal_Bool aBackground, xmlTextWriterPtr xmlWriter);
+    void dumpFillBackgroundAsAttribute(sal_Bool bBackground, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapNameAsAttribute(rtl::OUString sBitmapName, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapAsElement(com::sun::star::uno::Reference<com::sun::star::awt::XBitmap> xBitmap, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapURLAsAttribute(rtl::OUString sBitmapURL, xmlTextWriterPtr xmlWriter);
@@ -67,10 +67,11 @@ private:
     void dumpFillBitmapOffsetXAsAttribute(sal_Int32 aBitmapOffsetX, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapOffsetYAsAttribute(sal_Int32 aBitmapOffsetY, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapRectanglePointAsAttribute(com::sun::star::drawing::RectanglePoint eBitmapRectanglePoint, xmlTextWriterPtr xmlWriter);
-    void dumpFillBitmapLogicalSizeAsAttribute(sal_Bool aBitmapLogicalSize, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapLogicalSizeAsAttribute(sal_Bool bBitmapLogicalSize, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapSizeXAsAttribute(sal_Int32 aBitmapSizeX, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapSizeYAsAttribute(sal_Int32 aBitmapSizeY, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapModeAsAttribute(com::sun::star::drawing::BitmapMode eBitmapMode, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapStretchAsAttribute(sal_Bool bBitmapStretch, xmlTextWriterPtr xmlWriter);
 
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
     void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 850a647..4f18b16 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -312,6 +312,14 @@ namespace {
         }
     }
 
+    void XShapeDumper::dumpFillBitmapStretchAsAttribute(sal_Bool bBitmapStretch, xmlTextWriterPtr xmlWriter)
+    {
+        if(bBitmapStretch)
+            xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapStretch"), "%s", "true");
+        else
+            xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapStretch"), "%s", "false");
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -499,6 +507,12 @@ namespace {
                 if(anotherAny >>= eBitmapMode)
                     dumpFillBitmapModeAsAttribute(eBitmapMode, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapStretch");
+                sal_Bool bBitmapStretch;
+                if(anotherAny >>= bBitmapStretch)
+                    dumpFillBitmapStretchAsAttribute(bBitmapStretch, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit f8232a70d8eabb36302aa814e92c3ebf92c36a17
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Fri Jun 8 00:04:55 2012 +0200

    Added dumping [property] FillBitmapMode
    
    Change-Id: I936197ff0048a258646b0403d15c9f3c39c3f250

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index dc86717..4253ef9 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -35,6 +35,7 @@
 #include <com/sun/star/drawing/Hatch.hpp>
 #include <com/sun/star/awt/XBitmap.hpp>
 #include <com/sun/star/drawing/RectanglePoint.hpp>
+#include <com/sun/star/drawing/BitmapMode.hpp>
 
 #ifndef ChartViewDumper_hxx
 #define ChartViewDumper_hxx
@@ -69,6 +70,7 @@ private:
     void dumpFillBitmapLogicalSizeAsAttribute(sal_Bool aBitmapLogicalSize, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapSizeXAsAttribute(sal_Int32 aBitmapSizeX, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapSizeYAsAttribute(sal_Int32 aBitmapSizeY, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapModeAsAttribute(com::sun::star::drawing::BitmapMode eBitmapMode, xmlTextWriterPtr xmlWriter);
 
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
     void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 50aa224..850a647 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -294,6 +294,24 @@ namespace {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapSizeY"), "%" SAL_PRIdINT32, aBitmapSizeY);
     }
 
+    void XShapeDumper::dumpFillBitmapModeAsAttribute(drawing::BitmapMode eBitmapMode, xmlTextWriterPtr xmlWriter)
+    {
+        switch(eBitmapMode)
+        {
+            case drawing::BitmapMode_REPEAT:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapMode"), "%s", "REPEAT");
+                break;
+            case drawing::BitmapMode_STRETCH:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapMode"), "%s", "STRETCH");
+                break;
+            case drawing::BitmapMode_NO_REPEAT:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapMode"), "%s", "NO_REPEAT");
+                break;
+            default:
+                break;
+        }
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -475,6 +493,12 @@ namespace {
                 if(anotherAny >>= aBitmapSizeY)
                     dumpFillBitmapSizeYAsAttribute(aBitmapSizeY, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapMode");
+                drawing::BitmapMode eBitmapMode;
+                if(anotherAny >>= eBitmapMode)
+                    dumpFillBitmapModeAsAttribute(eBitmapMode, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit 23d86ce005247bfaa0070e7c3176918dbdb8eb4d
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 23:57:17 2012 +0200

    Added dumping [property] FillBitmapSizeY
    
    Change-Id: Iea1bc97021d06a87ed90d7205de57b47c561a471

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index f0b4ecd..dc86717 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -68,6 +68,7 @@ private:
     void dumpFillBitmapRectanglePointAsAttribute(com::sun::star::drawing::RectanglePoint eBitmapRectanglePoint, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapLogicalSizeAsAttribute(sal_Bool aBitmapLogicalSize, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapSizeXAsAttribute(sal_Int32 aBitmapSizeX, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapSizeYAsAttribute(sal_Int32 aBitmapSizeY, xmlTextWriterPtr xmlWriter);
 
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
     void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 2dc0826..50aa224 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -289,6 +289,11 @@ namespace {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapSizeX"), "%" SAL_PRIdINT32, aBitmapSizeX);
     }
 
+    void XShapeDumper::dumpFillBitmapSizeYAsAttribute(sal_Int32 aBitmapSizeY, xmlTextWriterPtr xmlWriter)
+    {
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapSizeY"), "%" SAL_PRIdINT32, aBitmapSizeY);
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -464,6 +469,12 @@ namespace {
                 if(anotherAny >>= aBitmapSizeX)
                     dumpFillBitmapSizeXAsAttribute(aBitmapSizeX, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapSizeY");
+                sal_Int32 aBitmapSizeY;
+                if(anotherAny >>= aBitmapSizeY)
+                    dumpFillBitmapSizeYAsAttribute(aBitmapSizeY, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit 8f5d76b8e8b2ad9e1e87004a4ef7d353b663db17
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 23:55:26 2012 +0200

    Added dumping [property] FillBitmapSizeX
    
    Change-Id: Ib10e3b80dd67b834d1cf87168524942198b89d53

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 050b15d..f0b4ecd 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -67,6 +67,7 @@ private:
     void dumpFillBitmapOffsetYAsAttribute(sal_Int32 aBitmapOffsetY, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapRectanglePointAsAttribute(com::sun::star::drawing::RectanglePoint eBitmapRectanglePoint, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapLogicalSizeAsAttribute(sal_Bool aBitmapLogicalSize, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapSizeXAsAttribute(sal_Int32 aBitmapSizeX, xmlTextWriterPtr xmlWriter);
 
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
     void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index f1f7098..2dc0826 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -284,6 +284,11 @@ namespace {
             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapLogicalSize"), "%s", "false");
     }
 
+    void XShapeDumper::dumpFillBitmapSizeXAsAttribute(sal_Int32 aBitmapSizeX, xmlTextWriterPtr xmlWriter)
+    {
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapSizeX"), "%" SAL_PRIdINT32, aBitmapSizeX);
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -453,6 +458,12 @@ namespace {
                 if(anotherAny >>= bBitmapLogicalSize)
                     dumpFillBitmapLogicalSizeAsAttribute(bBitmapLogicalSize, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapSizeX");
+                sal_Int32 aBitmapSizeX;
+                if(anotherAny >>= aBitmapSizeX)
+                    dumpFillBitmapSizeXAsAttribute(aBitmapSizeX, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit b318fa664d83fa0568f999f09aa8570a6f02dd6e
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 23:52:09 2012 +0200

    Added dumping [property] FillBitmapLogicalSize
    
    Change-Id: Ie3e225d87afab4e725e16eb28096df54b421cce5

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 455d70c..050b15d 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -66,6 +66,7 @@ private:
     void dumpFillBitmapOffsetXAsAttribute(sal_Int32 aBitmapOffsetX, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapOffsetYAsAttribute(sal_Int32 aBitmapOffsetY, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapRectanglePointAsAttribute(com::sun::star::drawing::RectanglePoint eBitmapRectanglePoint, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapLogicalSizeAsAttribute(sal_Bool aBitmapLogicalSize, xmlTextWriterPtr xmlWriter);
 
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
     void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 5bffb65..f1f7098 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -188,9 +188,9 @@ namespace {
         xmlTextWriterEndElement( xmlWriter );
     }
 
-    void XShapeDumper::dumpFillBackgroundAsAttribute(sal_Bool aBackground, xmlTextWriterPtr xmlWriter)
+    void XShapeDumper::dumpFillBackgroundAsAttribute(sal_Bool bBackground, xmlTextWriterPtr xmlWriter)
     {
-        if(aBackground)
+        if(bBackground)
             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBackground"), "%s", "true");
         else
             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBackground"), "%s", "false");
@@ -276,6 +276,14 @@ namespace {
         }
     }
 
+    void XShapeDumper::dumpFillBitmapLogicalSizeAsAttribute(sal_Bool bBitmapLogicalSize, xmlTextWriterPtr xmlWriter)
+    {
+        if(bBitmapLogicalSize)
+            xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapLogicalSize"), "%s", "true");
+        else
+            xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapLogicalSize"), "%s", "false");
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -439,6 +447,12 @@ namespace {
                 if(anotherAny >>= eBitmapRectanglePoint)
                     dumpFillBitmapRectanglePointAsAttribute(eBitmapRectanglePoint, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapLogicalSize");
+                sal_Bool bBitmapLogicalSize;
+                if(anotherAny >>= bBitmapLogicalSize)
+                    dumpFillBitmapLogicalSizeAsAttribute(bBitmapLogicalSize, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit 3a54477ba45bca6c4a5de4e64d6f3c24924b213c
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 23:46:12 2012 +0200

    Added dumping [property] FillBitmapRectanglePoint
    
    Change-Id: Ib181adc12719df35808cb480296d3e3629ca592e

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index bdf72c7..455d70c 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -34,6 +34,7 @@
 #include <com/sun/star/awt/Gradient.hpp>
 #include <com/sun/star/drawing/Hatch.hpp>
 #include <com/sun/star/awt/XBitmap.hpp>
+#include <com/sun/star/drawing/RectanglePoint.hpp>
 
 #ifndef ChartViewDumper_hxx
 #define ChartViewDumper_hxx
@@ -64,6 +65,7 @@ private:
     void dumpFillBitmapPositionOffsetYAsAttribute(sal_Int32 aBitmapPositionOffsetY, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapOffsetXAsAttribute(sal_Int32 aBitmapOffsetX, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapOffsetYAsAttribute(sal_Int32 aBitmapOffsetY, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapRectanglePointAsAttribute(com::sun::star::drawing::RectanglePoint eBitmapRectanglePoint, xmlTextWriterPtr xmlWriter);
 
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
     void dumpSizeAsAttribute(const com::sun::star::awt::Size& rSize, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 0d295b3..5bffb65 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -240,6 +240,42 @@ namespace {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapOffsetY"), "%" SAL_PRIdINT32, aBitmapOffsetY);
     }
 
+    void XShapeDumper::dumpFillBitmapRectanglePointAsAttribute(drawing::RectanglePoint eBitmapRectanglePoint, xmlTextWriterPtr xmlWriter)
+    {
+        switch(eBitmapRectanglePoint)
+        {
+            case drawing::RectanglePoint_LEFT_TOP:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "LEFT_TOP");
+                break;
+            case drawing::RectanglePoint_MIDDLE_TOP:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "MIDDLE_TOP");
+                break;
+            case drawing::RectanglePoint_RIGHT_TOP:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "RIGHT_TOP");
+                break;
+            case drawing::RectanglePoint_LEFT_MIDDLE:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "LEFT_MIDDLE");
+                break;
+            case drawing::RectanglePoint_MIDDLE_MIDDLE:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "MIDDLE_MIDDLE");
+                break;
+            case drawing::RectanglePoint_RIGHT_MIDDLE:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "RIGHT_MIDDLE");
+                break;
+            case drawing::RectanglePoint_LEFT_BOTTOM:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "LEFT_BOTTOM");
+                break;
+            case drawing::RectanglePoint_MIDDLE_BOTTOM:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "MIDDLE_BOTTOM");
+                break;
+            case drawing::RectanglePoint_RIGHT_BOTTOM:
+                xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBitmapRectanglePoint"), "%s", "RIGHT_BOTTOM");
+                break;
+            default:
+                break;
+        }
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -397,6 +433,12 @@ namespace {
                 if(anotherAny >>= aBitmapOffsetY)
                     dumpFillBitmapOffsetYAsAttribute(aBitmapOffsetY, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapRectanglePoint");
+                drawing::RectanglePoint eBitmapRectanglePoint;
+                if(anotherAny >>= eBitmapRectanglePoint)
+                    dumpFillBitmapRectanglePointAsAttribute(eBitmapRectanglePoint, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER


More information about the Libreoffice-commits mailing list