diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index 7b4042ba2471..7d329c9ae411 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -84,7 +84,8 @@ EffectRewinder::EffectRewinder ( mpAsynchronousRewindEvent(), mxCurrentAnimationRootNode(), mxCurrentSlide(), - mbNonUserTriggeredMainSequenceEffectSeen(false) + mbNonUserTriggeredMainSequenceEffectSeen(false), + mbHasAdvancedTimeSetting(false) { initialize(); } @@ -160,6 +161,15 @@ void EffectRewinder::setCurrentSlide ( const uno::Reference& xSlide) { mxCurrentSlide = xSlide; + + // Check if the current slide has advance time setting or not + uno::Reference< beans::XPropertySet > xPropSet( mxCurrentSlide, uno::UNO_QUERY ); + sal_Int32 nChange(0); + + if( xPropSet.is()) + getPropertyValue( nChange, xPropSet, "Change"); + + mbHasAdvancedTimeSetting = nChange; } bool EffectRewinder::rewind ( @@ -179,6 +189,9 @@ bool EffectRewinder::rewind ( // Abort (and skip over the rest of) any currently active animation. mrUserEventQueue.callSkipEffectEventHandler(); + if (!mbHasAdvancedTimeSetting) + mrEventQueue.forceEmpty(); + const int nSkipCount (mnMainSequenceEffectCount - 1); if (nSkipCount < 0) { @@ -417,13 +430,7 @@ void EffectRewinder::asynchronousRewind ( // when the slide is shown. mbNonUserTriggeredMainSequenceEffectSeen = false; - uno::Reference< beans::XPropertySet > xPropSet( mxCurrentSlide, uno::UNO_QUERY ); - sal_Int32 nChange(0); - - if( xPropSet.is()) - getPropertyValue( nChange, xPropSet, "Change"); - - if (!nChange) + if (!mbHasAdvancedTimeSetting) mrEventQueue.forceEmpty(); if (mbNonUserTriggeredMainSequenceEffectSeen) diff --git a/slideshow/source/engine/effectrewinder.hxx b/slideshow/source/engine/effectrewinder.hxx index 4844991b8333..8084b03f6248 100644 --- a/slideshow/source/engine/effectrewinder.hxx +++ b/slideshow/source/engine/effectrewinder.hxx @@ -129,6 +129,7 @@ private: ::std::shared_ptr mpPaintLock; bool mbNonUserTriggeredMainSequenceEffectSeen; + bool mbHasAdvancedTimeSetting; // Slide has advanced time setting or not. void initialize();