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

Artur Dorda adorda at kemper.freedesktop.org
Sat Jun 9 17:19:20 PDT 2012


 drawinglayer/inc/drawinglayer/XShapeDumper.hxx |    9 ++
 drawinglayer/source/dumper/XShapeDumper.cxx    |  104 +++++++++++++++++++++++++
 2 files changed, 113 insertions(+)

New commits:
commit 16dc28c1eabbda44eff0d62f76e05812918ec187
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Sun Jun 10 02:17:45 2012 +0200

    Added dumping TextAnimationDelay & TextAnimationDirection properties
    
    Change-Id: I9ac0fa6c727890bf4274b2341db07f7a8a93f204

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index e64a3cf..74f14e4 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -47,6 +47,7 @@
 #include <com/sun/star/drawing/TextFitToSizeType.hpp>
 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
+#include <com/sun/star/drawing/TextAnimationDirection.hpp>
 
 #ifndef ChartViewDumper_hxx
 #define ChartViewDumper_hxx
@@ -130,6 +131,8 @@ private:
     void dumpTextMinimumFrameWidthAsAttribute(sal_Int32 aTextMinimumFrameWidth, xmlTextWriterPtr xmlWriter);
     void dumpTextAnimationAmountAsAttribute(sal_Int32 aTextAnimationAmount, xmlTextWriterPtr xmlWriter);
     void dumpTextAnimationCountAsAttribute(sal_Int32 aTextAnimationCount, xmlTextWriterPtr xmlWriter);
+    void dumpTextAnimationDelayAsAttribute(sal_Int32 aTextAnimationDelay, xmlTextWriterPtr xmlWriter);
+    void dumpTextAnimationDirectionAsAttribute(com::sun::star::drawing::TextAnimationDirection eTextAnimationDirection, xmlTextWriterPtr xmlWriter);
 
     // XShape.idl
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 92993d0..f77f037 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -743,6 +743,32 @@ namespace {
 		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textAnimationCount"), "%" SAL_PRIdINT32, aTextAnimationCount);
 	}
 
+    void XShapeDumper::dumpTextAnimationDelayAsAttribute(sal_Int32 aTextAnimationDelay, xmlTextWriterPtr xmlWriter)
+	{
+		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textAnimationDelay"), "%" SAL_PRIdINT32, aTextAnimationDelay);
+	}
+
+    void XShapeDumper::dumpTextAnimationDirectionAsAttribute(drawing::TextAnimationDirection eTextAnimationDirection, xmlTextWriterPtr xmlWriter)
+	{
+		switch(eTextAnimationDirection)
+		{
+			case drawing::TextAnimationDirection_LEFT:
+				xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationDirection"), "%s", "LEFT");
+				break;
+			case drawing::TextAnimationDirection_RIGHT:
+				xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationDirection"), "%s", "RIGHT");
+				break;
+			case drawing::TextAnimationDirection_UP:
+				xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationDirection"), "%s", "UP");
+				break;
+			case drawing::TextAnimationDirection_DOWN:
+				xmlTextWriterWriteFormatAttribute( xmlWriter, BAD_CAST("textAnimationDirection"), "%s", "DOWN");
+				break;
+			default:
+				break;
+		}
+	}
+
     // --------------------------------
     // ---------- XShape.idl ----------
     // --------------------------------
@@ -899,6 +925,18 @@ namespace {
 				if(anotherAny >>= aTextAnimationCount)
 					dumpTextAnimationCountAsAttribute(aTextAnimationCount, xmlWriter);
 			}
+			{
+				uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationDelay");
+				sal_Int32 aTextAnimationDelay;
+				if(anotherAny >>= aTextAnimationDelay)
+					dumpTextAnimationDelayAsAttribute(aTextAnimationDelay, xmlWriter);
+			}
+			{
+				uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationDirection");
+				drawing::TextAnimationDirection eTextAnimationDirection;
+				if(anotherAny >>= eTextAnimationDirection)
+					dumpTextAnimationDirectionAsAttribute(eTextAnimationDirection, xmlWriter);
+			}
         }
         else if(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
         {
commit 8044cb896cad2acec32bdadef94057c78556cb53
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Sun Jun 10 02:14:05 2012 +0200

    Added dumping TextAnimationAmount & TextAnimationCount properties
    
    Change-Id: I3293b0faf5ddcb9be4d363ac8c34cb70331a0360

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index f3bc0be..e64a3cf 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -128,6 +128,8 @@ private:
     void dumpTextMaximumFrameWidthAsAttribute(sal_Int32 aTextMaximumFrameWidth, xmlTextWriterPtr xmlWriter);
     void dumpTextMinimumFrameHeightAsAttribute(sal_Int32 aTextMinimumFrameHeight, xmlTextWriterPtr xmlWriter);
     void dumpTextMinimumFrameWidthAsAttribute(sal_Int32 aTextMinimumFrameWidth, xmlTextWriterPtr xmlWriter);
+    void dumpTextAnimationAmountAsAttribute(sal_Int32 aTextAnimationAmount, xmlTextWriterPtr xmlWriter);
+    void dumpTextAnimationCountAsAttribute(sal_Int32 aTextAnimationCount, xmlTextWriterPtr xmlWriter);
 
     // XShape.idl
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 6484f12..92993d0 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -733,6 +733,16 @@ namespace {
 		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMinimumFrameWidth"), "%" SAL_PRIdINT32, aTextMinimumFrameWidth);
 	}
 
+    void XShapeDumper::dumpTextAnimationAmountAsAttribute(sal_Int32 aTextAnimationAmount, xmlTextWriterPtr xmlWriter)
+	{
+		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textAnimationAmount"), "%" SAL_PRIdINT32, aTextAnimationAmount);
+	}
+
+    void XShapeDumper::dumpTextAnimationCountAsAttribute(sal_Int32 aTextAnimationCount, xmlTextWriterPtr xmlWriter)
+	{
+		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textAnimationCount"), "%" SAL_PRIdINT32, aTextAnimationCount);
+	}
+
     // --------------------------------
     // ---------- XShape.idl ----------
     // --------------------------------
@@ -877,6 +887,18 @@ namespace {
 				if(anotherAny >>= aTextMinimumFrameWidth)
 					dumpTextMinimumFrameWidthAsAttribute(aTextMinimumFrameWidth, xmlWriter);
 			}
+			{
+				uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationAmount");
+				sal_Int32 aTextAnimationAmount;
+				if(anotherAny >>= aTextAnimationAmount)
+					dumpTextAnimationAmountAsAttribute(aTextAnimationAmount, xmlWriter);
+			}
+			{
+				uno::Any anotherAny = xPropSet->getPropertyValue("TextAnimationCount");
+				sal_Int32 aTextAnimationCount;
+				if(anotherAny >>= aTextAnimationCount)
+					dumpTextAnimationCountAsAttribute(aTextAnimationCount, xmlWriter);
+			}
         }
         else if(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
         {
commit 3f63211f1b21bbb8040ac6eb2eb0027ed3997be7
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Sun Jun 10 02:11:29 2012 +0200

    Added dumping TextMinimumFrameHeight & TextMinimumFrameWidth properties
    
    Change-Id: I6b6ab712c1852f3f77620b55dd82077fe0b6d1f7

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 796579f..f3bc0be 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -126,6 +126,8 @@ private:
     void dumpTextLowerDistanceAsAttribute(sal_Int32 aTextLowerDistance, xmlTextWriterPtr xmlWriter);
     void dumpTextMaximumFrameHeightAsAttribute(sal_Int32 aTextMaximumFrameHeight, xmlTextWriterPtr xmlWriter);
     void dumpTextMaximumFrameWidthAsAttribute(sal_Int32 aTextMaximumFrameWidth, xmlTextWriterPtr xmlWriter);
+    void dumpTextMinimumFrameHeightAsAttribute(sal_Int32 aTextMinimumFrameHeight, xmlTextWriterPtr xmlWriter);
+    void dumpTextMinimumFrameWidthAsAttribute(sal_Int32 aTextMinimumFrameWidth, xmlTextWriterPtr xmlWriter);
 
     // XShape.idl
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index 9823481..6484f12 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -723,6 +723,16 @@ namespace {
 		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMaximumFrameWidth"), "%" SAL_PRIdINT32, aTextMaximumFrameWidth);
 	}
 
+    void XShapeDumper::dumpTextMinimumFrameHeightAsAttribute(sal_Int32 aTextMinimumFrameHeight, xmlTextWriterPtr xmlWriter)
+	{
+		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMinimumFrameHeight"), "%" SAL_PRIdINT32, aTextMinimumFrameHeight);
+	}
+
+    void XShapeDumper::dumpTextMinimumFrameWidthAsAttribute(sal_Int32 aTextMinimumFrameWidth, xmlTextWriterPtr xmlWriter)
+	{
+		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMinimumFrameWidth"), "%" SAL_PRIdINT32, aTextMinimumFrameWidth);
+	}
+
     // --------------------------------
     // ---------- XShape.idl ----------
     // --------------------------------
@@ -855,6 +865,18 @@ namespace {
 				if(anotherAny >>= aTextMaximumFrameWidth)
 					dumpTextMaximumFrameWidthAsAttribute(aTextMaximumFrameWidth, xmlWriter);
 			}
+			{
+				uno::Any anotherAny = xPropSet->getPropertyValue("TextMinimumFrameHeight");
+				sal_Int32 aTextMinimumFrameHeight;
+				if(anotherAny >>= aTextMinimumFrameHeight)
+					dumpTextMinimumFrameHeightAsAttribute(aTextMinimumFrameHeight, xmlWriter);
+			}
+			{
+				uno::Any anotherAny = xPropSet->getPropertyValue("TextMinimumFrameWidth");
+				sal_Int32 aTextMinimumFrameWidth;
+				if(anotherAny >>= aTextMinimumFrameWidth)
+					dumpTextMinimumFrameWidthAsAttribute(aTextMinimumFrameWidth, xmlWriter);
+			}
         }
         else if(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
         {
commit c30e3187fc61f214bad965c3195026b4109c9374
Author: Artur Dorda <artur.dorda+libo at gmail.com>
Date:   Sun Jun 10 02:06:03 2012 +0200

    Added dumping TextMaximumFrameHeight & TextMaximumFrameWidth properties
    
    Change-Id: I87fe9583e9db988a552bd21efe5c3e1c606871dd

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 21ece8b..796579f 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -124,6 +124,8 @@ private:
     void dumpTextRightDistanceAsAttribute(sal_Int32 aTextRightDistance, xmlTextWriterPtr xmlWriter);
     void dumpTextUpperDistanceAsAttribute(sal_Int32 aTextUpperDistance, xmlTextWriterPtr xmlWriter);
     void dumpTextLowerDistanceAsAttribute(sal_Int32 aTextLowerDistance, xmlTextWriterPtr xmlWriter);
+    void dumpTextMaximumFrameHeightAsAttribute(sal_Int32 aTextMaximumFrameHeight, xmlTextWriterPtr xmlWriter);
+    void dumpTextMaximumFrameWidthAsAttribute(sal_Int32 aTextMaximumFrameWidth, xmlTextWriterPtr xmlWriter);
 
     // XShape.idl
     void dumpPositionAsAttribute(const com::sun::star::awt::Point& rPoint, xmlTextWriterPtr xmlWriter);
diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx
index bad5746..9823481 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -713,6 +713,16 @@ namespace {
 		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textLowerDistance"), "%" SAL_PRIdINT32, aTextLowerDistance);
 	}
 
+    void XShapeDumper::dumpTextMaximumFrameHeightAsAttribute(sal_Int32 aTextMaximumFrameHeight, xmlTextWriterPtr xmlWriter)
+	{
+		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMaximumFrameHeight"), "%" SAL_PRIdINT32, aTextMaximumFrameHeight);
+	}
+
+    void XShapeDumper::dumpTextMaximumFrameWidthAsAttribute(sal_Int32 aTextMaximumFrameWidth, xmlTextWriterPtr xmlWriter)
+	{
+		xmlTextWriterWriteFormatAttribute(xmlWriter, BAD_CAST("textMaximumFrameWidth"), "%" SAL_PRIdINT32, aTextMaximumFrameWidth);
+	}
+
     // --------------------------------
     // ---------- XShape.idl ----------
     // --------------------------------
@@ -833,6 +843,18 @@ namespace {
 				if(anotherAny >>= aTextLowerDistance)
 					dumpTextLowerDistanceAsAttribute(aTextLowerDistance, xmlWriter);
 			}
+			{
+				uno::Any anotherAny = xPropSet->getPropertyValue("TextMaximumFrameHeight");
+				sal_Int32 aTextMaximumFrameHeight;
+				if(anotherAny >>= aTextMaximumFrameHeight)
+					dumpTextMaximumFrameHeightAsAttribute(aTextMaximumFrameHeight, xmlWriter);
+			}
+			{
+				uno::Any anotherAny = xPropSet->getPropertyValue("TextMaximumFrameWidth");
+				sal_Int32 aTextMaximumFrameWidth;
+				if(anotherAny >>= aTextMaximumFrameWidth)
+					dumpTextMaximumFrameWidthAsAttribute(aTextMaximumFrameWidth, xmlWriter);
+			}
         }
         else if(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
         {


More information about the Libreoffice-commits mailing list