diff options
author | Mark Hung <marklh9@gmail.com> | 2019-02-19 20:10:30 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2019-02-25 10:32:01 +0100 |
commit | 7b04874fc5a1385c05da0b9abb9cc71818fdbb89 (patch) | |
tree | d162177eae3044db852c9c2db75441427548f56a /oox | |
parent | db03d555e857a9cfc82b8ec19dd56514361849f6 (diff) |
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@gmail.com>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/ppt/animationspersist.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
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) ); |