[Libreoffice-commits] core.git: oox/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 25 09:32:23 UTC 2019
oox/source/ppt/animationspersist.cxx | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
New commits:
commit 7b04874fc5a1385c05da0b9abb9cc71818fdbb89
Author: Mark Hung <marklh9 at gmail.com>
AuthorDate: Tue Feb 19 20:10:30 2019 +0800
Commit: Mark Hung <marklh9 at gmail.com>
CommitDate: Mon Feb 25 10:32:01 2019 +0100
tdf#123557 PPTX: import timenode condition targets.
Handle timenode condition properly. Begin and End of
TimenodeContainer allow Sequence, Event, Timing, double,
and VOID. Only events with Source set are valid.
Change-Id: I25519110715072ca36b7f5c55c26415f9fbe9deb
Reviewed-on: https://gerrit.libreoffice.org/68210
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9 at gmail.com>
diff --git a/oox/source/ppt/animationspersist.cxx b/oox/source/ppt/animationspersist.cxx
index 3ff3f3cdfe0e..bcfc4f2ba494 100644
--- a/oox/source/ppt/animationspersist.cxx
+++ b/oox/source/ppt/animationspersist.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/text/XText.hpp>
#include <com/sun/star/presentation/ParagraphTarget.hpp>
#include <com/sun/star/presentation/ShapeAnimationSubType.hpp>
+#include <com/sun/star/animations/Event.hpp>
#include <oox/drawingml/shape.hxx>
#include <oox/helper/attributelist.hxx>
@@ -35,6 +36,7 @@
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::presentation;
+using namespace ::com::sun::star::animations;
using namespace ::com::sun::star::drawing;
using namespace ::com::sun::star::text;
@@ -169,13 +171,17 @@ namespace oox { namespace ppt {
return aTarget;
}
+ // Convert a time node condition to XAnimation.Begin or XAnimation.End
Any AnimationCondition::convert(const SlidePersistPtr & pSlide) const
{
Any aAny;
- if( mpTarget )
+ Event aEvent;
+ if(mpTarget && (maValue >>= aEvent))
{
sal_Int16 nSubType;
aAny = mpTarget->convert( pSlide, nSubType );
+ aEvent.Source = aAny;
+ aAny <<= aEvent;
}
else
{
@@ -187,6 +193,10 @@ namespace oox { namespace ppt {
Any AnimationCondition::convertList(const SlidePersistPtr & pSlide, const AnimationConditionList & l)
{
Any aAny;
+
+ if (l.size() == 1)
+ return l[0].convert(pSlide);
+
for (auto const& elem : l)
{
aAny = addToSequence( aAny, elem.convert(pSlide) );
More information about the Libreoffice-commits
mailing list