summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorArtur Dorda <artur.dorda+libo@gmail.com>2012-06-10 02:25:50 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-07-12 03:10:09 +0200
commitb100e5a98e17104b957e21fd5183528fff8ad951 (patch)
tree864cfbd0ecbd2efc3ee2dfc3c896036440119b45 /drawinglayer
parentfd09060f57c20e7a0ee3e87ced3c0461d90382e6 (diff)
Added dumping TextAnimationKind & TextAnimationStartInside properties
Change-Id: I2ea8b51499fca9107c5e60a33b76e3bfb15833ba
Diffstat (limited to 'drawinglayer')
-rw-r--r--drawinglayer/inc/drawinglayer/XShapeDumper.hxx3
-rw-r--r--drawinglayer/source/dumper/XShapeDumper.cxx44
2 files changed, 47 insertions, 0 deletions
diff --git a/drawinglayer/inc/drawinglayer/XShapeDumper.hxx b/drawinglayer/inc/drawinglayer/XShapeDumper.hxx
index 74f14e45e8ae..77d33b15307d 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 f77f0377aa19..71ee2184753c 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"))
{