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>
This commit is contained in:
parent
61d9a4a244
commit
b83c168347
@ -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<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 (
|
||||
@ -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)
|
||||
|
@ -129,6 +129,7 @@ private:
|
||||
::std::shared_ptr<ScreenUpdater::UpdateLock> mpPaintLock;
|
||||
|
||||
bool mbNonUserTriggeredMainSequenceEffectSeen;
|
||||
bool mbHasAdvancedTimeSetting; // Slide has advanced time setting or not.
|
||||
|
||||
void initialize();
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user