drawinglayer/inc/drawinglayer/XShapeDumper.hxx |    6 +
 drawinglayer/source/dumper/XShapeDumper.cxx    |   82 +++++++++++++++++++++++++
 2 files changed, 88 insertions(+)

New commits:
commit 85b8c0e1b5cbe3ae50ef75c851a6946766224814
Author: Artur Dorda <artur.dorda+l...@gmail.com>
Date:   Sun Jun 10 02:35:24 2012 +0200

    Added dumping TextAnimationStopInside & TextWritingMode properties
    
    Change-Id: I6fad605243003826d5df89f9f1d9040cff4ee6b2

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx 
b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 77d33b1..3d37bd7 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -49,6 +49,7 @@
 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
 #include <com/sun/star/drawing/TextAnimationDirection.hpp>
 #include <com/sun/star/drawing/TextAnimationKind.hpp>
+#include <com/sun/star/text/WritingMode.hpp>
 
 #ifndef ChartViewDumper_hxx
 #define ChartViewDumper_hxx
@@ -136,6 +137,8 @@ private:
     void 
dumpTextAnimationDirectionAsAttribute(com::sun::star::drawing::TextAnimationDirection
 eTextAnimationDirection, xmlTextWriterPtr xmlWriter);
     void 
dumpTextAnimationKindAsAttribute(com::sun::star::drawing::TextAnimationKind 
eTextAnimationKind, xmlTextWriterPtr xmlWriter);
     void dumpTextAnimationStartInsideAsAttribute(sal_Bool 
bTextAnimationStartInside, xmlTextWriterPtr xmlWriter);
+    void dumpTextAnimationStopInsideAsAttribute(sal_Bool 
bTextAnimationStopInside, xmlTextWriterPtr xmlWriter);
+    void dumpTextWritingModeAsAttribute(com::sun::star::text::WritingMode 
eWritingMode, 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 71ee218..8f86d5a 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -801,6 +801,32 @@ namespace {
                        xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textAnimationStartInside"), "%s", "false");
        }
 
+    void XShapeDumper::dumpTextAnimationStopInsideAsAttribute(sal_Bool 
bTextAnimationStopInside, xmlTextWriterPtr xmlWriter)
+       {
+               if(bTextAnimationStopInside)
+                       xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textAnimationStopInside"), "%s", "true");
+               else
+                       xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textAnimationStopInside"), "%s", "false");
+       }
+
+    void XShapeDumper::dumpTextWritingModeAsAttribute(text::WritingMode 
eTextWritingMode, xmlTextWriterPtr xmlWriter)
+       {
+               switch(eTextWritingMode)
+               {
+                       case text::WritingMode_LR_TB:
+                               xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textWritingMode"), "%s", "LR_TB");
+                               break;
+                       case text::WritingMode_RL_TB:
+                               xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textWritingMode"), "%s", "RL_TB");
+                               break;
+                       case text::WritingMode_TB_RL:
+                               xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textWritingMode"), "%s", "TB_RL");
+                               break;
+                       default:
+                               break;
+               }
+       }
+
     // --------------------------------
     // ---------- XShape.idl ----------
     // --------------------------------
@@ -981,6 +1007,18 @@ namespace {
                                if(anotherAny >>= bTextAnimationStartInside)
                                        
dumpTextAnimationStartInsideAsAttribute(bTextAnimationStartInside, xmlWriter);
                        }
+                       {
+                               uno::Any anotherAny = 
xPropSet->getPropertyValue("TextAnimationStopInside");
+                               sal_Bool bTextAnimationStopInside;
+                               if(anotherAny >>= bTextAnimationStopInside)
+                                       
dumpTextAnimationStopInsideAsAttribute(bTextAnimationStopInside, xmlWriter);
+                       }
+                       {
+                               uno::Any anotherAny = 
xPropSet->getPropertyValue("TextWritingMode");
+                               text::WritingMode eTextWritingMode;
+                               if(anotherAny >>= eTextWritingMode)
+                                       
dumpTextWritingModeAsAttribute(eTextWritingMode, xmlWriter);
+                       }
         }
         else 
if(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
         {
commit 236f4eccb566a582ef117e45ac4a2de32da125c8
Author: Artur Dorda <artur.dorda+l...@gmail.com>
Date:   Sun Jun 10 02:25:50 2012 +0200

    Added dumping TextAnimationKind & TextAnimationStartInside properties
    
    Change-Id: I2ea8b51499fca9107c5e60a33b76e3bfb15833ba

diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx 
b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 74f14e4..77d33b1 100644
--- a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
+++ b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
@@ -48,6 +48,7 @@
 #include <com/sun/star/drawing/TextHorizontalAdjust.hpp>
 #include <com/sun/star/drawing/TextVerticalAdjust.hpp>
 #include <com/sun/star/drawing/TextAnimationDirection.hpp>
+#include <com/sun/star/drawing/TextAnimationKind.hpp>
 
 #ifndef ChartViewDumper_hxx
 #define ChartViewDumper_hxx
@@ -133,6 +134,8 @@ private:
     void dumpTextAnimationCountAsAttribute(sal_Int32 aTextAnimationCount, 
xmlTextWriterPtr xmlWriter);
     void dumpTextAnimationDelayAsAttribute(sal_Int32 aTextAnimationDelay, 
xmlTextWriterPtr xmlWriter);
     void 
dumpTextAnimationDirectionAsAttribute(com::sun::star::drawing::TextAnimationDirection
 eTextAnimationDirection, xmlTextWriterPtr xmlWriter);
+    void 
dumpTextAnimationKindAsAttribute(com::sun::star::drawing::TextAnimationKind 
eTextAnimationKind, xmlTextWriterPtr xmlWriter);
+    void dumpTextAnimationStartInsideAsAttribute(sal_Bool 
bTextAnimationStartInside, 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 f77f037..71ee218 100644
--- a/drawinglayer/source/dumper/XShapeDumper.cxx
+++ b/drawinglayer/source/dumper/XShapeDumper.cxx
@@ -769,6 +769,38 @@ namespace {
                }
        }
 
+    void 
XShapeDumper::dumpTextAnimationKindAsAttribute(drawing::TextAnimationKind 
eTextAnimationKind, xmlTextWriterPtr xmlWriter)
+       {
+               switch(eTextAnimationKind)
+               {
+                       case drawing::TextAnimationKind_NONE:
+                               xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textAnimationKind"), "%s", "NONE");
+                               break;
+                       case drawing::TextAnimationKind_BLINK:
+                               xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textAnimationKind"), "%s", "BLINK");
+                               break;
+                       case drawing::TextAnimationKind_SCROLL:
+                               xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textAnimationKind"), "%s", "SCROLL");
+                               break;
+                       case drawing::TextAnimationKind_ALTERNATE:
+                               xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textAnimationKind"), "%s", "ALTERNATE");
+                               break;
+                       case drawing::TextAnimationKind_SLIDE:
+                               xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textAnimationKind"), "%s", "SLIDE");
+                               break;
+                       default:
+                               break;
+               }
+       }
+
+    void XShapeDumper::dumpTextAnimationStartInsideAsAttribute(sal_Bool 
bTextAnimationStartInside, xmlTextWriterPtr xmlWriter)
+       {
+               if(bTextAnimationStartInside)
+                       xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textAnimationStartInside"), "%s", "true");
+               else
+                       xmlTextWriterWriteFormatAttribute( xmlWriter, 
BAD_CAST("textAnimationStartInside"), "%s", "false");
+       }
+
     // --------------------------------
     // ---------- XShape.idl ----------
     // --------------------------------
@@ -937,6 +969,18 @@ namespace {
                                if(anotherAny >>= eTextAnimationDirection)
                                        
dumpTextAnimationDirectionAsAttribute(eTextAnimationDirection, xmlWriter);
                        }
+                       {
+                               uno::Any anotherAny = 
xPropSet->getPropertyValue("TextAnimationKind");
+                               drawing::TextAnimationKind eTextAnimationKind;
+                               if(anotherAny >>= eTextAnimationKind)
+                                       
dumpTextAnimationKindAsAttribute(eTextAnimationKind, xmlWriter);
+                       }
+                       {
+                               uno::Any anotherAny = 
xPropSet->getPropertyValue("TextAnimationStartInside");
+                               sal_Bool bTextAnimationStartInside;
+                               if(anotherAny >>= bTextAnimationStartInside)
+                                       
dumpTextAnimationStartInsideAsAttribute(bTextAnimationStartInside, xmlWriter);
+                       }
         }
         else 
if(xServiceInfo->supportsService("com.sun.star.drawing.GroupShape"))
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to