diff options
author | Oliver Bolte <obo@openoffice.org> | 2005-10-11 07:44:25 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2005-10-11 07:44:25 +0000 |
commit | 467939abcf3c0569316310d10b39a763b2c606c8 (patch) | |
tree | 8481c3eeb20105fc0a85e449f31cdf83e931b229 /slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx | |
parent | 3d45aeb1fbfc3766f09812121306201aed4a4e55 (diff) |
INTEGRATION: CWS presfixes08 (1.3.16); FILE MERGED
2005/07/21 16:13:45 dbo 1.3.16.2: #i45197# some cleanup
Issue number:
Submitted by:
Reviewed by:
2005/07/15 13:11:02 dbo 1.3.16.1: #i45197# skipping animations, cleanup
Issue number:
Submitted by:
Reviewed by:
Diffstat (limited to 'slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx')
-rw-r--r-- | slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx | 53 |
1 files changed, 35 insertions, 18 deletions
diff --git a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx index 8a6ae34d046d..2ef22ed84eaa 100644 --- a/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx +++ b/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx @@ -4,9 +4,9 @@ * * $RCSfile: sequentialtimecontainer.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: rt $ $Date: 2005-09-07 20:46:40 $ + * last change: $Author: obo $ $Date: 2005-10-11 08:44:25 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -33,20 +33,15 @@ * ************************************************************************/ -#include <canvas/debug.hxx> -#include <canvas/verbosetrace.hxx> - -#include <sequentialtimecontainer.hxx> -#include <tools.hxx> -#include <nodetools.hxx> - -#ifndef BOOST_BIND_HPP_INCLUDED -#include <boost/bind.hpp> -#endif -#ifndef BOOST_MEM_FN_HPP_INCLUDED -#include <boost/mem_fn.hpp> -#endif - +#include "canvas/debug.hxx" +#include "canvas/verbosetrace.hxx" +#include "sequentialtimecontainer.hxx" +#include "tools.hxx" +#include "nodetools.hxx" +#include "delayevent.hxx" +#include "com/sun/star/animations/EventTrigger.hpp" +#include "boost/bind.hpp" +#include "boost/mem_fn.hpp" #include <algorithm> using namespace ::com::sun::star; @@ -72,11 +67,33 @@ namespace presentation // resolve first child if( !getChildren().empty() ) - return getChildren().front()->resolve(); + return resolveChild( getChildren().front() ); return true; } + void SequentialTimeContainer::dispose() + { + BaseContainerNode::dispose(); + m_pCurrentSkipEvent.reset(); + } + + bool SequentialTimeContainer::resolveChild( + BaseNodeSharedPtr const & pChildNode ) + { + bool const bResolved = pChildNode->resolve(); + if (bResolved && isMainSequenceRootNode()) { + if (m_pCurrentSkipEvent) + m_pCurrentSkipEvent->dispose(); + m_pCurrentSkipEvent = makeEvent( + boost::bind( &BaseNode::deactivate, pChildNode ) ); + // deactivate child node when skip event occurs: + getContext().mrUserEventQueue.registerSkipEffectEvent( + m_pCurrentSkipEvent ); + } + return bResolved; + } + void SequentialTimeContainer::notifyDeactivating( const AnimationNodeSharedPtr& rNotifier ) { // early exit on invalid nodes @@ -109,7 +126,7 @@ namespace presentation // resolve next child if( isDurationInfinite() && getFinishedCount() < getChildren().size() && - !getChildren()[getFinishedCount()]->resolve() ) + !resolveChild( getChildren()[getFinishedCount()] )) { // could not resolve child - since we risk to // stall the chain of events here, play it safe |