diff options
author | Marco Cecchetti <mrcekets@gmail.com> | 2012-07-05 16:35:02 +0200 |
---|---|---|
committer | Marco Cecchetti <mrcekets@gmail.com> | 2012-07-15 11:51:47 +0200 |
commit | aa50b3bd6b1282e6dff621df14997911b7a1f10f (patch) | |
tree | c6e90a06823098d3f07a0497e5f181d855047686 /sd/source | |
parent | c1598303e4c458795c28d41408a00d2082396113 (diff) |
Bug fix: now repeated animations and begin=’after effect ‘ works properly together.
Modified the CustomAnimationEffect class in order to take into account the repeatCount
attribute value when computing the node effect absolute duration.
Diffstat (limited to 'sd/source')
-rw-r--r-- | sd/source/core/CustomAnimationEffect.cxx | 13 |
1 files changed, 12 insertions, 1 deletions
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; + } } // -------------------------------------------------------------------- |