sd/source/ui/unoidl/DrawController.cxx |   23 +++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

New commits:
commit 8eee7eab8087590aa19bb9989c294e9be767f356
Author:     Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de>
AuthorDate: Wed Feb 21 15:51:23 2024 +0100
Commit:     Armin Le Grand <armin.le.gr...@me.com>
CommitDate: Wed Feb 21 23:29:41 2024 +0100

    IASS: Allow exit Impress when SlideShow is running
    
    Change-Id: Iffccf2c7fe37845f9da44fd911cf974db026af89
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163697
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <armin.le.gr...@me.com>

diff --git a/sd/source/ui/unoidl/DrawController.cxx 
b/sd/source/ui/unoidl/DrawController.cxx
index 011bfe939858..8ae76e58e66b 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -182,8 +182,27 @@ sal_Bool SAL_CALL DrawController::suspend( sal_Bool 
Suspend )
         {
             // do not allow suspend if a slideshow needs this controller!
             rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( 
*pViewShellBase ) );
-            if( xSlideShow.is() && xSlideShow->dependsOn(pViewShellBase) )
-                return false;
+            if (xSlideShow.is())
+            {
+                if (SlideShow::IsInteractiveSlideshow())
+                {
+                    // IASS mode: If preview mode, end it
+                    if (xSlideShow->isInteractiveSetup())
+                        xSlideShow->endInteractivePreview();
+
+                    // end the SlideShow
+                    xSlideShow->end();
+
+                    // use SfxBaseController::suspend( Suspend ) below
+                    // for normal processing and return value
+                }
+                else
+                {
+                    // original reaction - prevent exit
+                    if (xSlideShow->dependsOn(pViewShellBase))
+                        return false;
+                }
+            }
         }
     }
 

Reply via email to