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.Grand@me.com>
This commit is contained in:
Armin Le Grand (allotropia)
2024-02-21 23:29:41 +01:00
committed by Armin Le Grand
parent 018f58b5f2
commit 8eee7eab80
+21 -2
View File
@@ -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;
}
}
}
}