summaryrefslogtreecommitdiff
path: root/slideshow/source/engine/animationnodes
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-04-18 08:49:50 +0000
committerOliver Bolte <obo@openoffice.org>2005-04-18 08:49:50 +0000
commita3ad36391d5700ae581b017d72d52186f537ba49 (patch)
treee72f481651555793cd7e98e79f8f1187b3bcdb77 /slideshow/source/engine/animationnodes
parentc481f127e034e8967506f0bb3364f1f4232d4427 (diff)
INTEGRATION: CWS presfixes03 (1.3.2); FILE MERGED
2005/04/11 17:42:34 thb 1.3.2.1: #i36190# #i44807# Implemented reduction of subset animations to the actual subset bounding box: relegated some common code to tools.cxx; completely overhauled viewshape.cxx; removed duplicate subset vector entry from DrawShapeSubsetting; corrected auto-reverse mode (fixed broken 'put on the brakes' effect); fixed AnimationSetNode deactivate behaviour (made the sequence activate->process activity->deactivate explicit (was by chance before and currently actually broken))
Diffstat (limited to 'slideshow/source/engine/animationnodes')
-rw-r--r--slideshow/source/engine/animationnodes/animationsetnode.cxx60
1 files changed, 44 insertions, 16 deletions
diff --git a/slideshow/source/engine/animationnodes/animationsetnode.cxx b/slideshow/source/engine/animationnodes/animationsetnode.cxx
index 0eb042bd2a8b..5c9f1bc907b3 100644
--- a/slideshow/source/engine/animationnodes/animationsetnode.cxx
+++ b/slideshow/source/engine/animationnodes/animationsetnode.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: animationsetnode.cxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: rt $ $Date: 2005-03-30 08:05:44 $
+ * last change: $Author: obo $ $Date: 2005-04-18 09:49:50 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -79,7 +79,7 @@ namespace presentation
AnimationSetNode::AnimationSetNode( const uno::Reference< animations::XAnimationNode >& xNode,
const BaseContainerNodeSharedPtr& rParent,
const NodeContext& rContext ) :
- AnimationBaseNode( xNode, rParent, rContext )
+ ActivityAnimationBaseNode( xNode, rParent, rContext )
{
}
@@ -104,7 +104,14 @@ namespace presentation
return true;
}
- void AnimationSetNode::scheduleDeactivationEvent() const
+#if defined(VERBOSE) && defined(DBG_UTIL)
+ const char* AnimationSetNode::getDescription() const
+ {
+ return "AnimationSetNode";
+ }
+#endif
+
+ void AnimationSetNode::implScheduleDeactivationEvent() const
{
if( !isIndefiniteTiming( getXNode()->getDuration() ) )
{
@@ -124,19 +131,35 @@ namespace presentation
}
}
-#if defined(VERBOSE) && defined(DBG_UTIL)
- const char* AnimationSetNode::getDescription() const
- {
- return "AnimationSetNode";
- }
-#endif
-
AnimationActivitySharedPtr AnimationSetNode::createSetActivity()
{
+ ActivitiesFactory::CommonParameters aParms( fillCommonParameters() );
+
const ::rtl::OUString& rAttrName( getXAnimateNode()->getAttributeName() );
const AttributableShapeSharedPtr& rShape( getShape() );
+ // make deactivation a two-step procedure. Normally, we
+ // could solely rely on
+ // BaseNode::scheduleDeactivationEvent() to deactivate()
+ // us. Unfortunately, that method on the one hand ignores
+ // indefinite timing, on the other hand generates
+ // zero-timeout delays, which might get fired _before_ our
+ // set activity has taken place. Therefore, we enforce
+ // sequentiality by letting only the set activity schedule
+ // the deactivation event (and ActivityAnimationBaseNode
+ // takes care for the fact when mpActivity should be zero).
+ AnimationSetNodeSharedPtr pSelf(
+ ::boost::dynamic_pointer_cast< AnimationSetNode >(getSelf()) );
+
+ ENSURE_AND_THROW( pSelf.get(),
+ "AnimationSetNode::createSetActivity(): cannot cast getSelf() to my type!" );
+
+ aParms.mpEndEvent =
+ makeEvent(
+ ::boost::bind( &AnimationSetNode::implScheduleDeactivationEvent,
+ pSelf ) );
+
switch( AnimationFactory::classifyAttributeName( rAttrName ) )
{
default:
@@ -154,7 +177,8 @@ namespace presentation
rShape, getContext().mpLayerManager ),
"AnimationSetNode::createSetActivity(): Could not import numeric to value" );
- return makeSetActivity( AnimationFactory::createNumberPropertyAnimation(
+ return makeSetActivity( aParms,
+ AnimationFactory::createNumberPropertyAnimation(
rAttrName,
rShape,
getContext().mpLayerManager,
@@ -172,7 +196,8 @@ namespace presentation
getContext().mpLayerManager ),
"AnimationSetNode::createSetActivity(): Could not import enum to value" );
- return makeSetActivity( AnimationFactory::createEnumPropertyAnimation(
+ return makeSetActivity( aParms,
+ AnimationFactory::createEnumPropertyAnimation(
rAttrName,
rShape,
getContext().mpLayerManager,
@@ -190,7 +215,8 @@ namespace presentation
getContext().mpLayerManager ),
"AnimationSetNode::createSetActivity(): Could not import color to value" );
- return makeSetActivity( AnimationFactory::createColorPropertyAnimation(
+ return makeSetActivity( aParms,
+ AnimationFactory::createColorPropertyAnimation(
rAttrName,
rShape,
getContext().mpLayerManager,
@@ -208,7 +234,8 @@ namespace presentation
getContext().mpLayerManager ),
"AnimationSetNode::createSetActivity(): Could not import string to value" );
- return makeSetActivity( AnimationFactory::createStringPropertyAnimation(
+ return makeSetActivity( aParms,
+ AnimationFactory::createStringPropertyAnimation(
rAttrName,
rShape,
getContext().mpLayerManager,
@@ -226,7 +253,8 @@ namespace presentation
getContext().mpLayerManager ),
"AnimationSetNode::createSetActivity(): Could not import bool to value" );
- return makeSetActivity( AnimationFactory::createBoolPropertyAnimation(
+ return makeSetActivity( aParms,
+ AnimationFactory::createBoolPropertyAnimation(
rAttrName,
rShape,
getContext().mpLayerManager,