summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2021-01-01 18:09:29 +0300
committerXisco Fauli <xiscofauli@libreoffice.org>2021-01-05 09:30:58 +0100
commit09c4b4dbf7bb1dc4821455b0e0f549954f1c4002 (patch)
treee50f7311206566e7b7e4d3a5bcf48a0f50c3da49
parentb6178d47ec1ec2cdd91727fe5fd792f6248d0222 (diff)
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.kose@collabora.com> (cherry picked from commit b83c16834792874524019495662b2f23a066611c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108593 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r--slideshow/source/engine/effectrewinder.cxx23
-rw-r--r--slideshow/source/engine/effectrewinder.hxx1
2 files changed, 16 insertions, 8 deletions
diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx
index 183e14885e6f..55666b752bc4 100644
--- a/slideshow/source/engine/effectrewinder.cxx
+++ b/slideshow/source/engine/effectrewinder.cxx
@@ -85,7 +85,8 @@ EffectRewinder::EffectRewinder (
mpAsynchronousRewindEvent(),
mxCurrentAnimationRootNode(),
mxCurrentSlide(),
- mbNonUserTriggeredMainSequenceEffectSeen(false)
+ mbNonUserTriggeredMainSequenceEffectSeen(false),
+ mbHasAdvancedTimeSetting(false)
{
initialize();
}
@@ -161,6 +162,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 (
@@ -180,6 +190,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)
{
@@ -418,13 +431,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<ScreenUpdater::UpdateLock> mpPaintLock;
bool mbNonUserTriggeredMainSequenceEffectSeen;
+ bool mbHasAdvancedTimeSetting; // Slide has advanced time setting or not.
void initialize();