summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorGülşah Köse <gulsah.kose@collabora.com>2020-12-25 14:08:32 +0300
committerGülşah Köse <gulsah.kose@collabora.com>2020-12-26 23:11:36 +0100
commita63caf49958b40e33e0d7aaedbe6424f78ecdc46 (patch)
tree5cca5560fb116e3d3fe7b2bd2d5bf53538aba589 /slideshow
parentd038129facbecc1b5af8670f3283a25a82151bca (diff)
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. Change-Id: Ie83f4d7ff3e4bd0a744ca205173d747204918b39 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108282 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/effectrewinder.cxx16
-rw-r--r--slideshow/source/engine/effectrewinder.hxx7
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx1
3 files changed, 24 insertions, 0 deletions
diff --git a/slideshow/source/engine/effectrewinder.cxx b/slideshow/source/engine/effectrewinder.cxx
index 5a784a7fe7d0..7b4042ba2471 100644
--- a/slideshow/source/engine/effectrewinder.cxx
+++ b/slideshow/source/engine/effectrewinder.cxx
@@ -28,6 +28,7 @@
#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>
@@ -82,6 +83,7 @@ EffectRewinder::EffectRewinder (
mnMainSequenceEffectCount(0),
mpAsynchronousRewindEvent(),
mxCurrentAnimationRootNode(),
+ mxCurrentSlide(),
mbNonUserTriggeredMainSequenceEffectSeen(false)
{
initialize();
@@ -154,6 +156,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,
@@ -410,6 +417,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 69891172e3c9..4844991b8333 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>
@@ -66,6 +67,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
@@ -119,6 +125,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 3bfee3cb88ba..5647170f9c4d 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1059,6 +1059,7 @@ void SlideShowImpl::displaySlide(
return;
maEffectRewinder.setRootAnimationNode(xRootNode);
+ maEffectRewinder.setCurrentSlide(xSlide);
// precondition: must only be called from the main thread!
DBG_TESTSOLARMUTEX();