Kaydet (Commit) 7b04874f authored tarafından Mark Hung's avatar Mark Hung

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: 's avatarMark Hung <marklh9@gmail.com>
üst db03d555
......@@ -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) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment