diff options
Diffstat (limited to 'slideshow/source/engine/animationnodes/setactivity.hxx')
-rw-r--r-- | slideshow/source/engine/animationnodes/setactivity.hxx | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/slideshow/source/engine/animationnodes/setactivity.hxx b/slideshow/source/engine/animationnodes/setactivity.hxx index 821971115ea6..76d750f2b337 100644 --- a/slideshow/source/engine/animationnodes/setactivity.hxx +++ b/slideshow/source/engine/animationnodes/setactivity.hxx @@ -2,7 +2,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -43,11 +43,11 @@ namespace slideshow { namespace internal { /** Templated setter for animation values - + This template class implements the AnimationActivity interface, but only the perform() and setAttributeLayer() methods are functional. To be used for set animations. - + @see AnimationSetNode. */ template <class AnimationT> @@ -56,7 +56,7 @@ class SetActivity : public AnimationActivity public: typedef ::boost::shared_ptr< AnimationT > AnimationSharedPtrT; typedef typename AnimationT::ValueType ValueT; - + SetActivity( const ActivitiesFactory::CommonParameters& rParms, const AnimationSharedPtrT& rAnimation, const ValueT& rToValue ) @@ -70,7 +70,7 @@ public: { ENSURE_OR_THROW( mpAnimation, "Invalid animation" ); } - + virtual void dispose() { mbIsActive = false; @@ -82,19 +82,19 @@ public: mpEndEvent->dispose(); mpEndEvent.reset(); } - + virtual double calcTimeLag() const { return 0.0; } - + virtual bool perform() { if (! isActive()) return false; // we're going inactive immediately: mbIsActive = false; - + if (mpAnimation && mpAttributeLayer && mpShape) { mpAnimation->start( mpShape, mpAttributeLayer ); (*mpAnimation)(maToValue); @@ -103,15 +103,15 @@ public: // fire end event, if any if (mpEndEvent) mrEventQueue.addEvent( mpEndEvent ); - + return false; // don't reinsert } - + virtual bool isActive() const { return mbIsActive; } - + virtual void dequeued() { } @@ -120,17 +120,17 @@ public: { perform(); } - + virtual void setTargets( const AnimatableShapeSharedPtr& rShape, const ShapeAttributeLayerSharedPtr& rAttrLayer ) { ENSURE_OR_THROW( rShape, "Invalid shape" ); ENSURE_OR_THROW( rAttrLayer, "Invalid attribute layer" ); - + mpShape = rShape; mpAttributeLayer = rAttrLayer; } - + private: AnimationSharedPtrT mpAnimation; AnimatableShapeSharedPtr mpShape; |