summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-06-10 02:35:24 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:09 +0200
commit63c004fc3f0bc53ce888ef012f7993b9203a7503 (patch)
tree347dbf83e2e93536c44d9b574b529c06c72f025e /drawinglayer
parentb100e5a98e17104b957e21fd5183528fff8ad951 (diff)
Added dumping TextAnimationStopInside & TextWritingMode properties
Change-Id: I6fad605243003826d5df89f9f1d9040cff4ee6b2
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/XShapeDumper.hxx3
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx38
2 files changed, 41 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 77d33b15307d..3d37bd73ea09 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 71ee2184753c..8f86d5a3193b 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"))
{