From fd09060f57c20e7a0ee3e87ced3c0461d90382e6 Mon Sep 17 00:00:00 2001 From: Artur Dorda Date: Sun, 10 Jun 2012 02:17:45 +0200 Subject: Added dumping TextAnimationDelay & TextAnimationDirection properties Change-Id: I9ac0fa6c727890bf4274b2341db07f7a8a93f204 --- drawinglayer/source/dumper/XShapeDumper.cxx | 38 +++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) (limited to 'drawinglayer/source') diff --git a/drawinglayer/source/dumper/XShapeDumper.cxx b/drawinglayer/source/dumper/XShapeDumper.cxx index 92993d088b09..f77f0377aa19 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")) { -- cgit