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

Artur Dorda adorda at kemper.freedesktop.org
Thu Jun 7 14:29:06 PDT 2012


 drawinglayer/inc/drawinglayer/XShapeDumper.hxx |   15 ++
 drawinglayer/source/dumper/XShapeDumper.cxx    |  133 +++++++++++++++++++++----
 2 files changed, 129 insertions(+), 19 deletions(-)

New commits:
commit c7239a6290fc921f67b1b269833dd1b6840ed5ee
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 23:28:21 2012 +0200

    Added dumping [property] FillBitmapOffsetY
    
    Change-Id: I65d5618d9a5c00b1196bd791dc6115c60837d9e6

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 045e8c4..bdf72c7 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -63,6 +63,7 @@ private:
     void dumpFillBitmapPositionOffsetXAsAttribute(sal_Int32 aBitmapPositionOffsetX, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapPositionOffsetYAsAttribute(sal_Int32 aBitmapPositionOffsetY, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapOffsetXAsAttribute(sal_Int32 aBitmapOffsetX, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapOffsetYAsAttribute(sal_Int32 aBitmapOffsetY, 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 7447c8d..0d295b3 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -235,6 +235,11 @@ namespace {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapOffsetX"), "%" SAL_PRIdINT32, aBitmapOffsetX);
     }
 
+    void XShapeDumper::dumpFillBitmapOffsetYAsAttribute(sal_Int32 aBitmapOffsetY, xmlTextWriterPtr xmlWriter)
+    {
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapOffsetY"), "%" SAL_PRIdINT32, aBitmapOffsetY);
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -386,6 +391,12 @@ namespace {
                 if(anotherAny >>= aBitmapOffsetX)
                     dumpFillBitmapOffsetXAsAttribute(aBitmapOffsetX, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapOffsetY");
+                sal_Int32 aBitmapOffsetY;
+                if(anotherAny >>= aBitmapOffsetY)
+                    dumpFillBitmapOffsetYAsAttribute(aBitmapOffsetY, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit c16b528d49a661d231e55bc2fb44c81978849a17
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 23:26:52 2012 +0200

    Added dumping [property] FillBitmapOffsetX
    
    Change-Id: Ic95bd25d5d3e6578a9143b6beee483f17236b22e

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 2092a84..045e8c4 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -62,6 +62,7 @@ private:
     void dumpFillBitmapURLAsAttribute(rtl::OUString sBitmapURL, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapPositionOffsetXAsAttribute(sal_Int32 aBitmapPositionOffsetX, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapPositionOffsetYAsAttribute(sal_Int32 aBitmapPositionOffsetY, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapOffsetXAsAttribute(sal_Int32 aBitmapOffsetX, 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 c612679..7447c8d 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -230,6 +230,11 @@ namespace {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapPositionOffsetY"), "%" SAL_PRIdINT32, aBitmapPositionOffsetY);
     }
 
+    void XShapeDumper::dumpFillBitmapOffsetXAsAttribute(sal_Int32 aBitmapOffsetX, xmlTextWriterPtr xmlWriter)
+    {
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapOffsetX"), "%" SAL_PRIdINT32, aBitmapOffsetX);
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -375,6 +380,12 @@ namespace {
                 if(anotherAny >>= aBitmapPositionOffsetY)
                     dumpFillBitmapPositionOffsetYAsAttribute(aBitmapPositionOffsetY, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapOffsetX");
+                sal_Int32 aBitmapOffsetX;
+                if(anotherAny >>= aBitmapOffsetX)
+                    dumpFillBitmapOffsetXAsAttribute(aBitmapOffsetX, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit c0261ea835f52bb2cc8b231acd048ebf58449ad7
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 23:23:50 2012 +0200

    Added dumping [property] FillBitmapPositionOffsetY
    
    Change-Id: I1846a7bed49165e09e21efea6eaaced43dd558a4

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 3bf7fc2..2092a84 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -61,6 +61,7 @@ private:
     void dumpFillBitmapAsElement(com::sun::star::uno::Reference<com::sun::star::awt::XBitmap> xBitmap, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapURLAsAttribute(rtl::OUString sBitmapURL, xmlTextWriterPtr xmlWriter);
     void dumpFillBitmapPositionOffsetXAsAttribute(sal_Int32 aBitmapPositionOffsetX, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapPositionOffsetYAsAttribute(sal_Int32 aBitmapPositionOffsetY, 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 a21e9f2..c612679 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -225,6 +225,11 @@ namespace {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapPositionOffsetX"), "%" SAL_PRIdINT32, aBitmapPositionOffsetX);
     }
 
+    void XShapeDumper::dumpFillBitmapPositionOffsetYAsAttribute(sal_Int32 aBitmapPositionOffsetY, xmlTextWriterPtr xmlWriter)
+    {
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapPositionOffsetY"), "%" SAL_PRIdINT32, aBitmapPositionOffsetY);
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -364,6 +369,12 @@ namespace {
                 if(anotherAny >>= aBitmapPositionOffsetX)
                     dumpFillBitmapPositionOffsetXAsAttribute(aBitmapPositionOffsetX, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapPositionOffsetY");
+                sal_Int32 aBitmapPositionOffsetY;
+                if(anotherAny >>= aBitmapPositionOffsetY)
+                    dumpFillBitmapPositionOffsetYAsAttribute(aBitmapPositionOffsetY, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit 407df11590a456f43e182464b7e635b81e2970ac
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 23:21:43 2012 +0200

    Added dumping [property] FillBitmapPositionOffsetX
    
    Change-Id: I2cff51b29b5b37f4a4cdb17d1f95b9f7f45c60f8

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index a48303c..3bf7fc2 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -60,6 +60,7 @@ private:
     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);
+    void dumpFillBitmapPositionOffsetXAsAttribute(sal_Int32 aBitmapPositionOffsetX, 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 523aa45..a21e9f2 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -220,6 +220,11 @@ namespace {
             rtl::OUStringToOString(sBitmapURL, RTL_TEXTENCODING_UTF8).getStr());
     }
 
+    void XShapeDumper::dumpFillBitmapPositionOffsetXAsAttribute(sal_Int32 aBitmapPositionOffsetX, xmlTextWriterPtr xmlWriter)
+    {
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapPositionOffsetX"), "%" SAL_PRIdINT32, aBitmapPositionOffsetX);
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -353,6 +358,12 @@ namespace {
                 if(anotherAny >>= sBitmapURL)
                     dumpFillBitmapURLAsAttribute(sBitmapURL, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapPositionOffsetX");
+                sal_Int32 aBitmapPositionOffsetX;
+                if(anotherAny >>= aBitmapPositionOffsetX)
+                    dumpFillBitmapPositionOffsetXAsAttribute(aBitmapPositionOffsetX, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit ba6b4d97336fb68812e9104b05a69a79f0944968
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 23:16:35 2012 +0200

    Added dumping [property] FillBitmapURL
    
    Change-Id: I58c721b529c996e5461ed4428bd01ecf5ba9e935

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 12b9127..a48303c 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -59,6 +59,7 @@ private:
     void dumpFillBackgroundAsAttribute(sal_Bool aBackground, 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);
 
     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 34f059a..523aa45 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -214,6 +214,12 @@ namespace {
         xmlTextWriterEndElement( xmlWriter );
     }
 
+    void XShapeDumper::dumpFillBitmapURLAsAttribute(rtl::OUString sBitmapURL, xmlTextWriterPtr xmlWriter)
+    {
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillBitmapURL"), "%s",
+            rtl::OUStringToOString(sBitmapURL, RTL_TEXTENCODING_UTF8).getStr());
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -341,6 +347,12 @@ namespace {
                 if(anotherAny >>= xBitmap)
                     dumpFillBitmapAsElement(xBitmap, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapURL");
+                rtl::OUString sBitmapURL;
+                if(anotherAny >>= sBitmapURL)
+                    dumpFillBitmapURLAsAttribute(sBitmapURL, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit f9411bb55f1926b3b3eb9292a614faa73c1e3185
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 23:12:11 2012 +0200

    Added dumping [property] FillBitmapName and [property] FillBitmap
    
    Change-Id: I86808c35463abf849f187b47dbe15c16a74d68a3

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 3fe2067..12b9127 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -33,6 +33,7 @@
 #include <com/sun/star/drawing/FillStyle.hpp>
 #include <com/sun/star/awt/Gradient.hpp>
 #include <com/sun/star/drawing/Hatch.hpp>
+#include <com/sun/star/awt/XBitmap.hpp>
 
 #ifndef ChartViewDumper_hxx
 #define ChartViewDumper_hxx
@@ -48,14 +49,16 @@ private:
     void dumpFillStyleAsAttribute(com::sun::star::drawing::FillStyle eFillStyle, xmlTextWriterPtr xmlWriter);
     void dumpFillColorAsAttribute(sal_Int32 aColor, xmlTextWriterPtr xmlWriter);
     void dumpFillTransparenceAsAttribute(sal_Int32 aTransparence, xmlTextWriterPtr xmlWriter);
-    void dumpFillTransparenceGradientNameAsAttribute(rtl::OUString aTranspGradName, xmlTextWriterPtr xmlWriter);
+    void dumpFillTransparenceGradientNameAsAttribute(rtl::OUString sTranspGradName, xmlTextWriterPtr xmlWriter);
     void dumpGradientProperty(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
     void dumpFillTransparenceGradientAsElement(com::sun::star::awt::Gradient aTranspGrad, xmlTextWriterPtr xmlWriter);
-    void dumpFillGradientNameAsAttribute(rtl::OUString aGradName, xmlTextWriterPtr xmlWriter);
+    void dumpFillGradientNameAsAttribute(rtl::OUString sGradName, xmlTextWriterPtr xmlWriter);
     void dumpFillGradientAsElement(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
-    void dumpFillHatchNameAsAttribute(rtl::OUString aHatchName, 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 dumpFillBitmapNameAsAttribute(rtl::OUString sBitmapName, xmlTextWriterPtr xmlWriter);
+    void dumpFillBitmapAsElement(com::sun::star::uno::Reference<com::sun::star::awt::XBitmap> xBitmap, 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 d9b2aca..34f059a 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -96,10 +96,10 @@ namespace {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparence"), "%" SAL_PRIdINT32, aTransparence);
     }
 
-    void XShapeDumper::dumpFillTransparenceGradientNameAsAttribute(rtl::OUString aTranspGradName, xmlTextWriterPtr xmlWriter)
+    void XShapeDumper::dumpFillTransparenceGradientNameAsAttribute(rtl::OUString sTranspGradName, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillTransparenceGradientName"), "%s",
-            rtl::OUStringToOString(aTranspGradName, RTL_TEXTENCODING_UTF8).getStr());
+            rtl::OUStringToOString(sTranspGradName, RTL_TEXTENCODING_UTF8).getStr());
     }
 
     //because there's more awt::Gradient properties to dump
@@ -146,10 +146,10 @@ namespace {
         xmlTextWriterEndElement( xmlWriter );
     }
 
-    void XShapeDumper::dumpFillGradientNameAsAttribute(rtl::OUString aGradName, xmlTextWriterPtr xmlWriter)
+    void XShapeDumper::dumpFillGradientNameAsAttribute(rtl::OUString sGradName, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillGradientName"), "%s",
-            rtl::OUStringToOString(aGradName, RTL_TEXTENCODING_UTF8).getStr());
+            rtl::OUStringToOString(sGradName, RTL_TEXTENCODING_UTF8).getStr());
     }
 
     void XShapeDumper::dumpFillGradientAsElement(awt::Gradient aGradient, xmlTextWriterPtr xmlWriter)
@@ -159,10 +159,10 @@ namespace {
         xmlTextWriterEndElement( xmlWriter );
     }
 
-    void XShapeDumper::dumpFillHatchNameAsAttribute(rtl::OUString aHatchName, xmlTextWriterPtr xmlWriter)
+    void XShapeDumper::dumpFillHatchNameAsAttribute(rtl::OUString sHatchName, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillHatchName"), "%s",
-            rtl::OUStringToOString(aHatchName, RTL_TEXTENCODING_UTF8).getStr());
+            rtl::OUStringToOString(sHatchName, RTL_TEXTENCODING_UTF8).getStr());
     }
 
     void XShapeDumper::dumpFillHatchAsElement(drawing::Hatch aHatch, xmlTextWriterPtr xmlWriter)
@@ -196,6 +196,24 @@ namespace {
             xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBackground"), "%s", "false");
     }
 
+    void XShapeDumper::dumpFillBitmapNameAsAttribute(rtl::OUString sBitmapName, xmlTextWriterPtr xmlWriter)
+    {
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("fillGradientName"), "%s",
+            rtl::OUStringToOString(sBitmapName, RTL_TEXTENCODING_UTF8).getStr());
+    }
+
+    void XShapeDumper::dumpFillBitmapAsElement(uno::Reference<awt::XBitmap> xBitmap, xmlTextWriterPtr xmlWriter)
+    {
+        xmlTextWriterStartElement(xmlWriter, BAD_CAST( "FillBitmap" ));
+        if (xBitmap.is())
+        {
+            awt::Size const aSize = xBitmap->getSize();
+            xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("width"), "%" SAL_PRIdINT32, aSize.Width);
+            xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("height"), "%" SAL_PRIdINT32, aSize.Height);
+        }
+        xmlTextWriterEndElement( xmlWriter );
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -210,7 +228,8 @@ namespace {
 
     void XShapeDumper::dumpShapeDescriptorAsAttribute( uno::Reference< drawing::XShapeDescriptor > xDescr, xmlTextWriterPtr xmlWriter )
     {
-        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%s", rtl::OUStringToOString(xDescr->getShapeType(), RTL_TEXTENCODING_UTF8).getStr());
+        xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("type"), "%s",
+            rtl::OUStringToOString(xDescr->getShapeType(), RTL_TEXTENCODING_UTF8).getStr());
     }
 
     void XShapeDumper::dumpXShape(uno::Reference< drawing::XShape > xShape, xmlTextWriterPtr xmlWriter)
@@ -270,9 +289,9 @@ namespace {
             }
             {
                 uno::Any anotherAny = xPropSet->getPropertyValue("FillTransparenceGradientName");
-                rtl::OUString aTranspGradName;
-                if(anotherAny >>= aTranspGradName)
-                    dumpFillTransparenceGradientNameAsAttribute(aTranspGradName, xmlWriter);
+                rtl::OUString sTranspGradName;
+                if(anotherAny >>= sTranspGradName)
+                    dumpFillTransparenceGradientNameAsAttribute(sTranspGradName, xmlWriter);
             }
             {
                 uno::Any anotherAny = xPropSet->getPropertyValue("FillTransparenceGradient");
@@ -282,9 +301,9 @@ namespace {
             }
             {
                 uno::Any anotherAny = xPropSet->getPropertyValue("FillGradientName");
-                rtl::OUString aGradName;
-                if(anotherAny >>= aGradName)
-                    dumpFillGradientNameAsAttribute(aGradName, xmlWriter);
+                rtl::OUString sGradName;
+                if(anotherAny >>= sGradName)
+                    dumpFillGradientNameAsAttribute(sGradName, xmlWriter);
             }
             {
                 uno::Any anotherAny = xPropSet->getPropertyValue("FillGradient");
@@ -294,9 +313,9 @@ namespace {
             }
             {
                 uno::Any anotherAny = xPropSet->getPropertyValue("FillHatchName");
-                rtl::OUString aHatchName;
-                if(anotherAny >>= aHatchName)
-                    dumpFillGradientNameAsAttribute(aHatchName, xmlWriter);
+                rtl::OUString sHatchName;
+                if(anotherAny >>= sHatchName)
+                    dumpFillGradientNameAsAttribute(sHatchName, xmlWriter);
             }
             {
                 uno::Any anotherAny = xPropSet->getPropertyValue("FillHatch");
@@ -310,6 +329,18 @@ namespace {
                 if(anotherAny >>= bFillBackground)
                     dumpFillBackgroundAsAttribute(bFillBackground, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmapName");
+                rtl::OUString sBitmapName;
+                if(anotherAny >>= sBitmapName)
+                    dumpFillGradientNameAsAttribute(sBitmapName, xmlWriter);
+            }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBitmap");
+                uno::Reference<awt::XBitmap> xBitmap(xShape, uno::UNO_QUERY);
+                if(anotherAny >>= xBitmap)
+                    dumpFillBitmapAsElement(xBitmap, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER
commit e601f25783ba36ea01d7d17326e2fc84bada9598
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Thu Jun 7 00:35:28 2012 +0200

    Added dumping [property] FillBackground
    
    Change-Id: Iff019182e407355aa3d052083fb8cc3d184de6cd

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 2644106..3fe2067 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -55,6 +55,7 @@ private:
     void dumpFillGradientAsElement(com::sun::star::awt::Gradient aGradient, xmlTextWriterPtr xmlWriter);
     void dumpFillHatchNameAsAttribute(rtl::OUString aHatchName, xmlTextWriterPtr xmlWriter);
     void dumpFillHatchAsElement(com::sun::star::drawing::Hatch aHatch, xmlTextWriterPtr xmlWriter);
+    void dumpFillBackgroundAsAttribute(sal_Bool aBackground, 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 400440f..d9b2aca 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -188,6 +188,14 @@ namespace {
         xmlTextWriterEndElement( xmlWriter );
     }
 
+    void XShapeDumper::dumpFillBackgroundAsAttribute(sal_Bool aBackground, xmlTextWriterPtr xmlWriter)
+    {
+        if(aBackground)
+            xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBackground"), "%s", "true");
+        else
+            xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("fillBackground"), "%s", "false");
+    }
+
     void XShapeDumper::dumpPositionAsAttribute(const awt::Point& rPoint, xmlTextWriterPtr xmlWriter)
     {
         xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("positionX"), "%" SAL_PRIdINT32, rPoint.X);
@@ -296,6 +304,12 @@ namespace {
                 if(anotherAny >>= aHatch)
                     dumpFillHatchAsElement(aHatch, xmlWriter);
             }
+            {
+                uno::Any anotherAny = xPropSet->getPropertyValue("FillBackground");
+                sal_Bool bFillBackground;
+                if(anotherAny >>= bFillBackground)
+                    dumpFillBackgroundAsAttribute(bFillBackground, xmlWriter);
+            }
         }
 
         #if DEBUG_DUMPER


More information about the Libreoffice-commits mailing list