diff options
author | Armin Le Grand (allotropia) <armin.le.grand.extern@allotropia.de> | 2024-04-11 16:37:30 +0200 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2024-04-30 15:10:42 +0200 |
commit | 4c2852eaf89e045c85c034ba070e17f3bfa34dea (patch) | |
tree | b4609515efcbafe12373fbd5be2749d74df76c3b | |
parent | 969f7b87ec5d9e05f3236b9f9c940d01264f6302 (diff) |
IASS: Correct Buffering of last Slide
There is a mechanism to pre-fetch the next slide, but
at the last slide that just gets not reset/refreshed.
Thus the last slide *is* the buffered slide.
When making changes and refreshing the SlideShow display
for the last slide this pe-fetched one is just used, so
the slide content gets not re-created and thus not
updated.
I added needed code to do that now when reacing the last
slide to make that work.
Change-Id: Ie57e6917e0996d5fce46021aeb933064c47dd90f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166011
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
-rw-r--r-- | sd/source/ui/slideshow/slideshowimpl.cxx | 12 | ||||
-rw-r--r-- | slideshow/source/engine/slideshowimpl.cxx | 8 |
2 files changed, 20 insertions, 0 deletions
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index 339b54382adc..d20b2c750709 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -500,6 +500,18 @@ void AnimationSlideController::displayCurrentSlide( const Reference< XSlideShow Any(aValue), PropertyState_DIRECT_VALUE); } + else if (-1 == nNextSlideNumber) + { + // IASS: next slide does not exist, thus current slide is the last one. + // we need to signal to stop Prefetch since else SlideShowImpl *keeps* the + // last slide buffered and will just re-use it when asked to update, thus + // updates will not work. + aProperties.emplace_back( "Prefetch" , + -1, + Any(false), + PropertyState_DIRECT_VALUE); + } + if (bSkipAllMainSequenceEffects) { // Add one property that prevents the slide transition from being diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx index 5e0dbbb8074e..121416327191 100644 --- a/slideshow/source/engine/slideshowimpl.cxx +++ b/slideshow/source/engine/slideshowimpl.cxx @@ -1041,6 +1041,14 @@ public: seq[0] >>= mpSlideShowImpl->mxPrefetchSlide; seq[1] >>= mpSlideShowImpl->mxPrefetchAnimationNode; } + else // rProperty.Value might be tested to 'bool' and 'false' + { + // IASS: There is no 'next' slide (last one is displayed), + // so end/flush Prefetch since that might still hold the + // last slide what would prevent updating/re-creating it + mpSlideShowImpl->mxPrefetchSlide.clear(); + mpSlideShowImpl->mpPrefetchSlide.reset(); + } } else if ( rProperty.Name == "SkipAllMainSequenceEffects" ) { |