From aa50b3bd6b1282e6dff621df14997911b7a1f10f Mon Sep 17 00:00:00 2001 From: Marco Cecchetti Date: Thu, 5 Jul 2012 16:35:02 +0200 Subject: Bug fix: now repeated animations and begin=’after effect ‘ works properly together. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Modified the CustomAnimationEffect class in order to take into account the repeatCount attribute value when computing the node effect absolute duration. --- sd/source/core/CustomAnimationEffect.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sd/source/core/CustomAnimationEffect.cxx b/sd/source/core/CustomAnimationEffect.cxx index 2ed611589722..65fbb4ad17f3 100644 --- a/sd/source/core/CustomAnimationEffect.cxx +++ b/sd/source/core/CustomAnimationEffect.cxx @@ -281,6 +281,10 @@ void CustomAnimationEffect::setNode( const ::com::sun::star::uno::Reference< ::c } mfAbsoluteDuration = mfDuration; + double fRepeatCount = 1.0; + if( (mxNode->getRepeatCount()) >>= fRepeatCount ) + mfAbsoluteDuration *= fRepeatCount; + checkForText(); } @@ -755,7 +759,9 @@ void CustomAnimationEffect::setDuration( double fDuration ) { double fScale = fDuration / mfDuration; mfDuration = fDuration; - mfAbsoluteDuration = mfDuration; + double fRepeatCount = 1.0; + getRepeatCount() >>= fRepeatCount; + mfAbsoluteDuration = mfDuration * fRepeatCount; // calculate effect duration and get target shape Reference< XEnumerationAccess > xEnumerationAccess( mxNode, UNO_QUERY ); @@ -954,7 +960,12 @@ sal_Int16 CustomAnimationEffect::getFill() const void CustomAnimationEffect::setRepeatCount( const Any& rRepeatCount ) { if( mxNode.is() ) + { mxNode->setRepeatCount( rRepeatCount ); + double fRepeatCount = 1.0; + rRepeatCount >>= fRepeatCount; + mfAbsoluteDuration = mfDuration * fRepeatCount; + } } // -------------------------------------------------------------------- -- cgit v1.2.3