tdf#155920: next effect in END mode should no resume show

When starting a presentation and moving over the last slide into the END
mode the next effect should not resume the presentation. Instead it
should exit the presentation. Furthermore, when hitting then the back
key it should show again the last slide (only resuming the presentation,
not directly resuming and moving back to the slide before the last.

Change-Id: I816232725d923601356e0bc8e39421f256d184eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153302
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index a9f16b8..01165af 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -2758,7 +2758,7 @@ void SAL_CALL SlideshowImpl::gotoNextEffect(  )
    if( !(mxShow.is() && mpSlideController && mpShowWindow) )
        return;

    if( mbIsPaused )
    if( mbIsPaused && mpShowWindow->GetShowWindowMode() != SHOWWINDOWMODE_END )
        resume();

    const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
@@ -2784,13 +2784,10 @@ void SAL_CALL SlideshowImpl::gotoPreviousEffect(  )
    if( !(mxShow.is() && mpSlideController && mpShowWindow) )
        return;

    if( mbIsPaused )
        resume();

    const ShowWindowMode eMode = mpShowWindow->GetShowWindowMode();
    if( (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) )
    if( (eMode == SHOWWINDOWMODE_PAUSE) || (eMode == SHOWWINDOWMODE_BLANK) || mbIsPaused )
    {
        mpShowWindow->RestartShow();
        resume();
    }
    else
    {