slideshow/source/engine/effectrewinder.cxx | 23 +++++++++++++++-------- slideshow/source/engine/effectrewinder.hxx | 1 + 2 files changed, 16 insertions(+), 8 deletions(-)
New commits: commit df7c7d17149059d8a9b127f98d569abf063c1552 Author: Gülşah Köse <gulsah.k...@collabora.com> AuthorDate: Fri Jan 1 18:09:29 2021 +0300 Commit: Gülşah Köse <gulsah.k...@collabora.com> CommitDate: Mon Jan 4 06:48:16 2021 +0100 tdf#136278 Follow-up Check when the eventqueue needs to be emptied. Follow up commit a63caf49958b40e33e0d7aaedbe6424f78ecdc46 Change-Id: I90b94f6aee1e1fe62f61ca20a75fd59e2a12d5da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108559 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.k...@collabora.com> (cherry picked from commit b83c16834792874524019495662b2f23a066611c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108585 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx index 96379062ea97..ef1a307e970a 100644 --- a/slideshow/source/engine/effectrewinder.cxx +++ b/slideshow/source/engine/effectrewinder.cxx @@ -87,7 +87,8 @@ EffectRewinder::EffectRewinder ( mpAsynchronousRewindEvent(), mxCurrentAnimationRootNode(), mxCurrentSlide(), - mbNonUserTriggeredMainSequenceEffectSeen(false) + mbNonUserTriggeredMainSequenceEffectSeen(false), + mbHasAdvancedTimeSetting(false) { initialize(); } @@ -163,6 +164,15 @@ void EffectRewinder::setCurrentSlide ( const uno::Reference<drawing::XDrawPage>& 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 ( @@ -182,6 +192,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) { @@ -420,13 +433,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 bcc68b5363bc..678e968872cf 100644 --- a/slideshow/source/engine/effectrewinder.hxx +++ b/slideshow/source/engine/effectrewinder.hxx @@ -130,6 +130,7 @@ private: ::std::shared_ptr<ScreenUpdater::UpdateLock> mpPaintLock; bool mbNonUserTriggeredMainSequenceEffectSeen; + bool mbHasAdvancedTimeSetting; // Slide has advanced time setting or not. void initialize(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits