summaryrefslogtreecommitdiff
path: root/oox/source/ppt/timenode.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/ppt/timenode.cxx')
-rw-r--r--oox/source/ppt/timenode.cxx33
1 files changed, 26 insertions, 7 deletions
diff --git a/oox/source/ppt/timenode.cxx b/oox/source/ppt/timenode.cxx
index f695d7918b96..854797a9649c 100644
--- a/oox/source/ppt/timenode.cxx
+++ b/oox/source/ppt/timenode.cxx
@@ -66,6 +66,9 @@ namespace oox { namespace ppt {
case AnimationNodeType::ANIMATE:
sServiceName = "com.sun.star.animations.Animate";
break;
+ case AnimationNodeType::ITERATE:
+ sServiceName = "com.sun.star.animations.IterateContainer";
+ break;
case AnimationNodeType::ANIMATECOLOR:
sServiceName = "com.sun.star.animations.AnimateColor";
break;
@@ -194,9 +197,15 @@ namespace oox { namespace ppt {
void TimeNode::addNode( const XmlFilterBase& rFilter, const Reference< XAnimationNode >& rxNode, const SlidePersistPtr & pSlide )
{
try {
- OUString sServiceName = getServiceName( mnNodeType );
+ sal_Int16 nNodeType = mnNodeType;
+
+ if (mnNodeType == AnimationNodeType::PAR && maNodeProperties[NP_ITERATETYPE].hasValue())
+ nNodeType = AnimationNodeType::ITERATE;
+
+ OUString sServiceName = getServiceName(nNodeType);
+
Reference< XAnimationNode > xNode = createAndInsert( rFilter, sServiceName, rxNode );
- setNode( rFilter, xNode, pSlide );
+ setNode(rFilter, xNode, pSlide, rxNode);
}
catch( const Exception& e )
{
@@ -204,7 +213,7 @@ namespace oox { namespace ppt {
}
}
- void TimeNode::setNode( const XmlFilterBase& rFilter, const Reference< XAnimationNode >& xNode, const SlidePersistPtr & pSlide )
+ void TimeNode::setNode(const XmlFilterBase& rFilter, const Reference< XAnimationNode >& xNode, const SlidePersistPtr & pSlide, const Reference<XAnimationNode>& xParent)
{
SAL_WARN_IF( !xNode.is(), "oox.ppt", "null node passed" );
@@ -310,10 +319,20 @@ namespace oox { namespace ppt {
xAnimate->setBy( aValue );
break;
case NP_TARGET:
- if (xAnimate.is())
- xAnimate->setTarget(aValue);
- if (xCommand.is())
- xCommand->setTarget(aValue);
+
+ if (xParent.is() && xParent->getType() == AnimationNodeType::ITERATE)
+ {
+ Reference<XIterateContainer> xParentContainer(xParent, UNO_QUERY);
+ if (xParentContainer.is())
+ xParentContainer->setTarget(aValue);
+ }
+ else
+ {
+ if (xAnimate.is())
+ xAnimate->setTarget(aValue);
+ if (xCommand.is())
+ xCommand->setTarget(aValue);
+ }
break;
case NP_SUBITEM:
if( xAnimate.is() )