slideshow/source/engine/effectrewinder.cxx |   17 +++++++++++++++++
 slideshow/source/engine/effectrewinder.hxx |    7 +++++++
 slideshow/source/engine/slideshowimpl.cxx  |    1 +
 3 files changed, 25 insertions(+)

New commits:
commit cea2fce6406c1ee05850c0c465e361dede91edef
Author:     Gülşah Köse <gulsah.k...@collabora.com>
AuthorDate: Fri Dec 25 14:08:32 2020 +0300
Commit:     Gülşah Köse <gulsah.k...@collabora.com>
CommitDate: Mon Dec 28 10:26:09 2020 +0100

    tdf#134133 Check when the eventqueue needs to be emptied.
    
    To fix tdf#131254, forceEmpty call removed without a control.
    Bug was related advance time setting. Now we control if slide has
    advance time setting.
    
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108282
    Tested-by: Jenkins
    Reviewed-by: Gülşah Köse <gulsah.k...@collabora.com>
    (cherry picked from commit a63caf49958b40e33e0d7aaedbe6424f78ecdc46)
    
    Change-Id: Ie83f4d7ff3e4bd0a744ca205173d747204918b39
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108335
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Gülşah Köse <gulsah.k...@collabora.com>

diff --git a/slideshow/source/engine/effectrewinder.cxx 
b/slideshow/source/engine/effectrewinder.cxx
index 944374d1d6c8..96379062ea97 100644
--- a/slideshow/source/engine/effectrewinder.cxx
+++ b/slideshow/source/engine/effectrewinder.cxx
@@ -24,12 +24,14 @@
 #include <mouseeventhandler.hxx>
 #include <basecontainernode.hxx>
 #include <delayevent.hxx>
+#include <tools.hxx>
 
 #include <com/sun/star/awt/MouseEvent.hpp>
 #include <com/sun/star/animations/Event.hpp>
 #include <com/sun/star/animations/EventTrigger.hpp>
 #include <com/sun/star/container/XEnumerationAccess.hpp>
 #include <com/sun/star/animations/XAnimate.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
 
 #include <officecfg/Office/Canvas.hxx>
 
@@ -84,6 +86,7 @@ EffectRewinder::EffectRewinder (
       mnMainSequenceEffectCount(0),
       mpAsynchronousRewindEvent(),
       mxCurrentAnimationRootNode(),
+      mxCurrentSlide(),
       mbNonUserTriggeredMainSequenceEffectSeen(false)
 {
     initialize();
@@ -156,6 +159,11 @@ void EffectRewinder::setRootAnimationNode (
     mxCurrentAnimationRootNode = xRootNode;
 }
 
+void EffectRewinder::setCurrentSlide (
+    const uno::Reference<drawing::XDrawPage>& xSlide)
+{
+    mxCurrentSlide = xSlide;
+}
 
 bool EffectRewinder::rewind (
     const ::std::shared_ptr<ScreenUpdater::UpdateLock>& rpPaintLock,
@@ -412,6 +420,15 @@ 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)
+            mrEventQueue.forceEmpty();
+
         if (mbNonUserTriggeredMainSequenceEffectSeen)
         {
             mrUserEventQueue.callSkipEffectEventHandler();
diff --git a/slideshow/source/engine/effectrewinder.hxx 
b/slideshow/source/engine/effectrewinder.hxx
index f71f8425e840..bcc68b5363bc 100644
--- a/slideshow/source/engine/effectrewinder.hxx
+++ b/slideshow/source/engine/effectrewinder.hxx
@@ -25,6 +25,7 @@
 #include <animationeventhandler.hxx>
 #include <event.hxx>
 #include <screenupdater.hxx>
+#include <com/sun/star/drawing/XDrawPage.hpp>
 
 #include <functional>
 #include <memory>
@@ -67,6 +68,11 @@ public:
     void setRootAnimationNode (
         const css::uno::Reference<css::animations::XAnimationNode>& xRootNode);
 
+    /** Store the XDrawPage to reach specific slide properties.
+    */
+    void setCurrentSlide (
+        const css::uno::Reference<css::drawing::XDrawPage>& xSlide);
+
     /** Rewind one effect of the main effect sequence.  When the current
         slide has not effects or no main sequence effect has yet been played
         then switch to the previous slide and replay all of its main
@@ -120,6 +126,7 @@ private:
     EventSharedPtr mpAsynchronousRewindEvent;
 
     css::uno::Reference<css::animations::XAnimationNode> 
mxCurrentAnimationRootNode;
+    css::uno::Reference<css::drawing::XDrawPage> mxCurrentSlide;
     ::std::shared_ptr<ScreenUpdater::UpdateLock> mpPaintLock;
 
     bool mbNonUserTriggeredMainSequenceEffectSeen;
diff --git a/slideshow/source/engine/slideshowimpl.cxx 
b/slideshow/source/engine/slideshowimpl.cxx
index f81e9e9fb278..996605ab9869 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1056,6 +1056,7 @@ void SlideShowImpl::displaySlide(
         return;
 
     maEffectRewinder.setRootAnimationNode(xRootNode);
+    maEffectRewinder.setCurrentSlide(xSlide);
 
     // precondition: must only be called from the main thread!
     DBG_TESTSOLARMUTEX();
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to