sd/inc/drawdoc.hxx                                        |    1 
 sd/inc/sdattr.hrc                                         |    3 +
 sd/qa/unit/dialogs-test.cxx                               |    2 +
 sd/source/core/drawdoc.cxx                                |    3 +
 sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx |    2 -
 sd/source/ui/animations/CustomAnimationPane.cxx           |    2 -
 sd/source/ui/animations/SlideTransitionPane.cxx           |    2 -
 sd/source/ui/app/sdmod1.cxx                               |    3 +
 sd/source/ui/dlg/navigatr.cxx                             |    3 +
 sd/source/ui/dlg/present.cxx                              |    8 ++++
 sd/source/ui/docshell/docshel3.cxx                        |    3 +
 sd/source/ui/func/funavig.cxx                             |    3 +
 sd/source/ui/func/fupoor.cxx                              |    6 ++-
 sd/source/ui/func/fusldlg.cxx                             |    8 ++++
 sd/source/ui/inc/present.hxx                              |    1 
 sd/source/ui/inc/slideshow.hxx                            |    3 +
 sd/source/ui/slideshow/slideshow.cxx                      |   26 +++++++++++---
 sd/source/ui/slideshow/slideshowimpl.cxx                  |    2 -
 sd/source/ui/unoidl/DrawController.cxx                    |    2 -
 sd/source/ui/view/drawview.cxx                            |    2 -
 sd/source/ui/view/drviews1.cxx                            |    4 +-
 sd/source/ui/view/drviews2.cxx                            |    5 +-
 sd/source/ui/view/drviews3.cxx                            |    2 -
 sd/source/ui/view/drviews4.cxx                            |    3 +
 sd/source/ui/view/drviews7.cxx                            |   10 +++--
 sd/source/ui/view/drviewsa.cxx                            |    7 ++-
 sd/source/ui/view/drviewse.cxx                            |    4 +-
 sd/source/ui/view/drviewsh.cxx                            |    2 -
 sd/source/ui/view/sdview2.cxx                             |    3 +
 sd/source/ui/view/viewshel.cxx                            |    4 +-
 sd/uiconfig/simpress/ui/presentationdialog.ui             |   21 ++++++++++-
 31 files changed, 110 insertions(+), 40 deletions(-)

New commits:
commit c68712d3689a0322e59934cd8151d003e869f30d
Author:     Armin Le Grand (allotropia) <armin.le.grand.ext...@allotropia.de>
AuthorDate: Fri Feb 23 16:30:23 2024 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Sat Feb 24 00:54:34 2024 +0100

    IASS: make live slideshow experimental and configurable
    
    * adding an option button to slideshow settings dlg
    * switch from env var to officecfg
    
    Change-Id: I9713fde374b04264947daaab73759eb585c4a3f6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163851
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>

diff --git a/sd/inc/drawdoc.hxx b/sd/inc/drawdoc.hxx
index dd6b81647ef7..401bde6b5f88 100644
--- a/sd/inc/drawdoc.hxx
+++ b/sd/inc/drawdoc.hxx
@@ -110,6 +110,7 @@ namespace sd
         sal_Int32 mnPauseTimeout;
         bool mbShowPauseLogo;
         bool mbStartCustomShow;
+        bool mbInteractive;
 
         PresentationSettings();
     };
diff --git a/sd/inc/sdattr.hrc b/sd/inc/sdattr.hrc
index f431dea4f680..409838dea996 100644
--- a/sd/inc/sdattr.hrc
+++ b/sd/inc/sdattr.hrc
@@ -55,8 +55,9 @@ class XColorItem;
 #define ATTR_PRESENT_PAUSE_TIMEOUT           
TypedWhichId<SfxUInt32Item>(ATTR_PRESENT_START + 13)
 #define ATTR_PRESENT_SHOW_PAUSELOGO          ATTR_PRESENT_START + 14
 #define ATTR_PRESENT_DISPLAY                 
TypedWhichId<SfxInt32Item>(ATTR_PRESENT_START + 15)
+#define ATTR_PRESENT_INTERACTIVE             ATTR_PRESENT_START + 16
 
-#define ATTR_PRESENT_END                ATTR_PRESENT_DISPLAY
+#define ATTR_PRESENT_END                ATTR_PRESENT_INTERACTIVE
 
 // animation attributes
 #define ATTR_ANIMATION_START            ATTR_PRESENT_END + 1
diff --git a/sd/qa/unit/dialogs-test.cxx b/sd/qa/unit/dialogs-test.cxx
index 45bdcaef9d48..e7c0d38f7f2e 100644
--- a/sd/qa/unit/dialogs-test.cxx
+++ b/sd/qa/unit/dialogs-test.cxx
@@ -407,6 +407,8 @@ VclPtr<VclAbstractDialog> 
SdDialogsTest::createDialogByID(sal_uInt32 nID)
             aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_FULLSCREEN, 
rPresentationSettings.mbFullScreen));
             aDlgSet.Put(SfxUInt32Item(ATTR_PRESENT_PAUSE_TIMEOUT, 
rPresentationSettings.mnPauseTimeout));
             aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_SHOW_PAUSELOGO, 
rPresentationSettings.mbShowPauseLogo));
+            aDlgSet.Put(SfxBoolItem(ATTR_PRESENT_INTERACTIVE, 
rPresentationSettings.mbInteractive));
+
             //SdOptions* pOptions = 
SD_MOD()->GetSdOptions(DocumentType::Impress);
             aDlgSet.Put(SfxInt32Item(ATTR_PRESENT_DISPLAY, 0 
/*pOptions->GetDisplay()*/));
             pRetval = 
getSdAbstractDialogFactory()->CreateSdStartPresentationDlg(
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index 2f9f431866a5..ea32e0f5e8d6 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -109,7 +109,8 @@ PresentationSettings::PresentationSettings()
     mbAnimationAllowed( true ),
     mnPauseTimeout( 0 ),
     mbShowPauseLogo( false ),
-    mbStartCustomShow( false )
+    mbStartCustomShow( false ),
+    mbInteractive( true )
 {
 }
 
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx 
b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 0071b0e85647..24fa39eb21cc 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -339,7 +339,7 @@ void SAL_CALL
             //mpChildrenManager->SetShapeList 
(uno::Reference<drawing::XShapes> (
             //    xView->getCurrentPage(), uno::UNO_QUERY));
             rtl::Reference< sd::SlideShow > xSlideshow( 
sd::SlideShow::GetSlideShow( mpSdViewSh->GetViewShellBase() ) );
-            if( xSlideshow.is() && (xSlideshow->isRunning() && 
!sd::SlideShow::IsInteractiveSlideshow()) //IASS
+            if( xSlideshow.is() && (xSlideshow->isRunning() && 
!xSlideshow->IsInteractiveSlideshow()) //IASS
                 && xSlideshow->isFullScreen() )
             {
                 css::uno::Reference< drawing::XDrawPage > xSlide;
diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx 
b/sd/source/ui/animations/CustomAnimationPane.cxx
index 35425a5dfea5..f6d8505966e7 100644
--- a/sd/source/ui/animations/CustomAnimationPane.cxx
+++ b/sd/source/ui/animations/CustomAnimationPane.cxx
@@ -1879,7 +1879,7 @@ void CustomAnimationPane::onAdd()
 
     updateControls();
 
-    if (!SlideShow::IsInteractiveSlideshow()) // IASS
+    if (!SlideShow::IsInteractiveSlideshow(&mrBase)) // IASS
         SlideShow::Stop( mrBase );
 }
 
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx 
b/sd/source/ui/animations/SlideTransitionPane.cxx
index b83bb98087b0..4f9914f6ea22 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -884,7 +884,7 @@ void SlideTransitionPane::applyToSelectedPages(bool 
bPreview = true)
     {
         if (aEffect.mnType) // mnType = 0 denotes no transition
             playCurrentEffect();
-        else if( mxView.is() && !SlideShow::IsInteractiveSlideshow()) // IASS
+        else if( mxView.is() && !SlideShow::IsInteractiveSlideshow(&mrBase)) 
// IASS
             SlideShow::Stop( mrBase );
     }
 
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 199e8a41c6f0..66e1ecd8bad8 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -196,7 +196,8 @@ void SdModule::Execute(SfxRequest& rReq)
             ::sd::ViewShell* pViewShell = pDocShell ? 
pDocShell->GetViewShell() : nullptr;
             if (pViewShell)
             {
-                if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() ) 
&& !sd::SlideShow::IsInteractiveSlideshow() ) // IASS
+                if( sd::SlideShow::IsRunning( pViewShell->GetViewShellBase() )
+                    && !sd::SlideShow::IsInteractiveSlideshow( 
&pViewShell->GetViewShellBase() ) ) // IASS
                 {
                     // Prevent documents from opening while the slide
                     // show is running, except when this request comes
diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx
index 930a68f7ec66..dbea0b6b4818 100644
--- a/sd/source/ui/dlg/navigatr.cxx
+++ b/sd/source/ui/dlg/navigatr.cxx
@@ -187,7 +187,8 @@ void SdNavigatorWin::InitTreeLB( const SdDrawDocument* pDoc 
)
 
     // Disable the shape filter drop down menu when there is a running slide
     // show.
-    if (pViewShell!=nullptr && sd::SlideShow::IsRunning( 
pViewShell->GetViewShellBase() ) && !sd::SlideShow::IsInteractiveSlideshow() ) 
// IASS
+    if (pViewShell!=nullptr && sd::SlideShow::IsRunning( 
pViewShell->GetViewShellBase() )
+        && !sd::SlideShow::IsInteractiveSlideshow( 
&pViewShell->GetViewShellBase() ) ) // IASS
         mxToolbox->set_item_sensitive("shapes", false);
     else
         mxToolbox->set_item_sensitive("shapes", true);
diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx
index 27b9ee345878..b4458241e392 100644
--- a/sd/source/ui/dlg/present.cxx
+++ b/sd/source/ui/dlg/present.cxx
@@ -25,6 +25,8 @@
 #include <svl/stritem.hxx>
 #include <vcl/svapp.hxx>
 
+#include <officecfg/Office/Common.hxx>
+
 #include <sdattr.hrc>
 #include <present.hxx>
 #include <cusshow.hxx>
@@ -72,6 +74,7 @@ SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* 
pWindow, const SfxI
     , m_xFrameEnableRemote(m_xBuilder->weld_frame("frameremote"))
     , m_xCbxEnableRemote(m_xBuilder->weld_check_button("enableremote"))
     , 
m_xCbxEnableRemoteInsecure(m_xBuilder->weld_check_button("enableremoteinsecure"))
+    , 
m_xCbxInteractiveMode(m_xBuilder->weld_check_button("enableinteractivemode"))
     , m_xLbConsole(m_xBuilder->weld_combo_box("console_cb"))
     , m_xFtMonitor(m_xBuilder->weld_label("presdisplay_label"))
     , m_xLBMonitor(m_xBuilder->weld_combo_box("presdisplay_cb"))
@@ -177,6 +180,10 @@ 
SdStartPresentationDlg::SdStartPresentationDlg(weld::Window* pWindow, const SfxI
     m_xFrameEnableRemote->hide();
 #endif
 
+    m_xCbxInteractiveMode->set_active( static_cast<const SfxBoolItem&>( 
rOutAttrs.Get( ATTR_PRESENT_INTERACTIVE ) ).GetValue() );
+    if (!officecfg::Office::Common::Misc::ExperimentalMode::get())
+        m_xCbxInteractiveMode->set_visible(false);
+
     InitMonitorSettings();
 
     ChangeRangeHdl(*m_xRbtCustomshow);
@@ -336,6 +343,7 @@ void SdStartPresentationDlg::GetAttr( SfxItemSet& rAttr )
     rAttr.Put( SfxBoolItem ( ATTR_PRESENT_ENDLESS, m_xRbtAuto->get_active() ) 
);
     rAttr.Put( SfxUInt32Item ( ATTR_PRESENT_PAUSE_TIMEOUT, 
m_xFormatter->GetTime().GetMSFromTime() / 1000 ) );
     rAttr.Put( SfxBoolItem ( ATTR_PRESENT_SHOW_PAUSELOGO, 
m_xCbxAutoLogo->get_active() ) );
+    rAttr.Put( SfxBoolItem ( ATTR_PRESENT_INTERACTIVE, 
m_xCbxInteractiveMode->get_active() ) );
 
     int nPos = m_xLBMonitor->get_active();
     if (nPos != -1)
diff --git a/sd/source/ui/docshell/docshel3.cxx 
b/sd/source/ui/docshell/docshel3.cxx
index c79f23580872..f62e424cf3be 100644
--- a/sd/source/ui/docshell/docshel3.cxx
+++ b/sd/source/ui/docshell/docshel3.cxx
@@ -129,7 +129,8 @@ static void lcl_setLanguage( const SdDrawDocument *pDoc, 
std::u16string_view rLa
  */
 void DrawDocShell::Execute( SfxRequest& rReq )
 {
-    if(mpViewShell && SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) 
&& !SlideShow::IsInteractiveSlideshow() ) // IASS
+    if(mpViewShell && SlideShow::IsRunning( mpViewShell->GetViewShellBase() )
+        && !SlideShow::IsInteractiveSlideshow( 
&mpViewShell->GetViewShellBase() ) ) // IASS
     {
         // during a running presentation no slot will be executed
         return;
diff --git a/sd/source/ui/func/funavig.cxx b/sd/source/ui/func/funavig.cxx
index b3adcdf89128..a160d94c7140 100644
--- a/sd/source/ui/func/funavig.cxx
+++ b/sd/source/ui/func/funavig.cxx
@@ -56,7 +56,8 @@ rtl::Reference<FuPoor> FuNavigation::Create( ViewShell* 
pViewSh, ::sd::Window* p
 
 void FuNavigation::DoExecute( SfxRequest& rReq )
 {
-    bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) 
&& !SlideShow::IsInteractiveSlideshow(); // IASS
+    bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() )
+        && !SlideShow::IsInteractiveSlideshow( 
&mpViewShell->GetViewShellBase() ); // IASS
 
     switch ( rReq.GetSlot() )
     {
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 31832a5e043c..23adf88ffaca 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -123,7 +123,8 @@ void FuPoor::ForceScroll(const Point& aPixPos)
     aScrollTimer.Stop();
 
     if ( mpView->IsDragHelpLine() || mpView->IsSetPageOrg() ||
-         (SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) && 
!SlideShow::IsInteractiveSlideshow()) ) // IASS
+         (SlideShow::IsRunning( mpViewShell->GetViewShellBase() )
+            && !SlideShow::IsInteractiveSlideshow( 
&mpViewShell->GetViewShellBase() )) ) // IASS
         return;
 
     Point aPos = mpWindow->OutputToScreenPixel(aPixPos);
@@ -176,7 +177,8 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
 {
     sal_uInt16          nCode = rKEvt.GetKeyCode().GetCode();
     bool            bReturn = false;
-    bool            bSlideShow = SlideShow::IsRunning( 
mpViewShell->GetViewShellBase() ) && !SlideShow::IsInteractiveSlideshow(); // 
IASS
+    bool bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() )
+        && !SlideShow::IsInteractiveSlideshow( 
&mpViewShell->GetViewShellBase() ); // IASS
 
     switch (nCode)
     {
diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index ab076b872cf4..3ce1814c92b2 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -102,6 +102,7 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
     aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_FULLSCREEN, 
rPresentationSettings.mbFullScreen ) );
     aDlgSet.Put( SfxUInt32Item( ATTR_PRESENT_PAUSE_TIMEOUT, 
rPresentationSettings.mnPauseTimeout ) );
     aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_SHOW_PAUSELOGO, 
rPresentationSettings.mbShowPauseLogo ) );
+    aDlgSet.Put( SfxBoolItem( ATTR_PRESENT_INTERACTIVE, 
rPresentationSettings.mbInteractive ) );
 
     SdOptions* pOptions = SD_MOD()->GetSdOptions(DocumentType::Impress);
     aDlgSet.Put( SfxInt32Item( ATTR_PRESENT_DISPLAY, pOptions->GetDisplay() ) 
);
@@ -214,6 +215,13 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
         rPresentationSettings.mbShowPauseLogo = bValue;
     }
 
+    bValue = ITEMVALUE( aDlgSet, ATTR_PRESENT_INTERACTIVE, SfxBoolItem );
+    if ( bValue != rPresentationSettings.mbInteractive )
+    {
+        bValuesChanged = true;
+        rPresentationSettings.mbInteractive = bValue;
+    }
+
     pOptions->SetDisplay( aDlgSet.Get(ATTR_PRESENT_DISPLAY).GetValue() );
 
     // is something has changed, we set the modified flag
diff --git a/sd/source/ui/inc/present.hxx b/sd/source/ui/inc/present.hxx
index 0d626bc234d7..6e1d1aadef26 100644
--- a/sd/source/ui/inc/present.hxx
+++ b/sd/source/ui/inc/present.hxx
@@ -60,6 +60,7 @@ private:
     std::unique_ptr<weld::Frame> m_xFrameEnableRemote;
     std::unique_ptr<weld::CheckButton> m_xCbxEnableRemote;
     std::unique_ptr<weld::CheckButton> m_xCbxEnableRemoteInsecure;
+    std::unique_ptr<weld::CheckButton> m_xCbxInteractiveMode;
 
     std::unique_ptr<weld::ComboBox> m_xLbConsole;
 
diff --git a/sd/source/ui/inc/slideshow.hxx b/sd/source/ui/inc/slideshow.hxx
index 2703d9611e31..4d84d5a8a994 100644
--- a/sd/source/ui/inc/slideshow.hxx
+++ b/sd/source/ui/inc/slideshow.hxx
@@ -102,7 +102,8 @@ public:
     static bool IsRunning( const ViewShell& rViewShell );
 
     /// returns true if the interactive slideshow mode is activated
-    static bool IsInteractiveSlideshow();
+    static bool IsInteractiveSlideshow(const ViewShellBase* pViewShellBase);
+    bool IsInteractiveSlideshow() const;
 
     // helper api
 
diff --git a/sd/source/ui/slideshow/slideshow.cxx 
b/sd/source/ui/slideshow/slideshow.cxx
index be3b95f27805..279534e0030e 100644
--- a/sd/source/ui/slideshow/slideshow.cxx
+++ b/sd/source/ui/slideshow/slideshow.cxx
@@ -39,6 +39,8 @@
 #include <framework/FrameworkHelper.hxx>
 #include <comphelper/extract.hxx>
 
+#include <officecfg/Office/Common.hxx>
+
 #include <FrameView.hxx>
 #include <createpresentation.hxx>
 #include <unomodel.hxx>
@@ -194,12 +196,12 @@ bool SlideShow::StartPreview( ViewShellBase const & rBase,
         return false;
 
     // end an already running IASS Preview (when someone is fast)
-    if (SlideShow::IsInteractiveSlideshow() && 
xSlideShow->isInteractiveSetup())
+    if (xSlideShow->IsInteractiveSlideshow() && 
xSlideShow->isInteractiveSetup())
         xSlideShow->endInteractivePreview();
 
     // check if IASS re-use of running Slideshow can/should be done
     // and do it
-    if (SlideShow::IsInteractiveSlideshow() && xSlideShow->isFullScreen()) // 
IASS
+    if (xSlideShow->IsInteractiveSlideshow() && xSlideShow->isFullScreen()) // 
IASS
         return xSlideShow->startInteractivePreview( xDrawPage, xAnimationNode 
);
 
     // fallback to usual mode
@@ -227,10 +229,24 @@ bool SlideShow::IsRunning( const ViewShell& rViewShell )
 }
 
 /// returns true if the interactive slideshow mode is activated
-bool SlideShow::IsInteractiveSlideshow()
+bool SlideShow::IsInteractiveSlideshow(const ViewShellBase* pViewShellBase)
 {
+    if (nullptr == pViewShellBase)
+        return false;
+    rtl::Reference< SlideShow > xSlideShow(GetSlideShow(*pViewShellBase));
+    if (!xSlideShow.is())
+        return false;
+    return xSlideShow->IsInteractiveSlideshow();
+}
+
+bool SlideShow::IsInteractiveSlideshow() const
+{
+    // allow override with ENV_VAR for practical dev reasons
     static bool 
g_bEnable_Interactive_Slideshow(getenv("ENABLE_INTERACTIVE_SLIDESHOW"));
-    return g_bEnable_Interactive_Slideshow;
+    if (g_bEnable_Interactive_Slideshow)
+        return true;
+
+    return officecfg::Office::Common::Misc::ExperimentalMode::get() && 
mpDoc->getPresentationSettings().mbInteractive;
 }
 
 void SlideShow::CreateController(  ViewShell* pViewSh, ::sd::View* pView, 
vcl::Window* pParentWindow )
@@ -654,7 +670,7 @@ void SAL_CALL SlideShow::end()
 {
     SolarMutexGuard aGuard;
 
-    if (SlideShow::IsInteractiveSlideshow() && isInteractiveSetup())
+    if (IsInteractiveSlideshow() && isInteractiveSetup())
     {
         // If IASS was active clean that up, but do not end SlideShow
         endInteractivePreview();
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 12a8cc31dcae..3db608c60869 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1126,7 +1126,7 @@ bool SlideshowImpl::startShow( PresentationSettingsEx 
const * pPresSettings )
                 mpPaneHider.reset(new PaneHider(*mpViewShell,this));
 
             // these Slots are forbidden in other views for this document
-            if( mpDocSh && !SlideShow::IsInteractiveSlideshow()) // IASS
+            if( mpDocSh && !pPresSettings->mbInteractive) // IASS
             {
                 mpDocSh->SetSlotFilter( true, pAllowed );
                 mpDocSh->ApplySlotFilter();
diff --git a/sd/source/ui/unoidl/DrawController.cxx 
b/sd/source/ui/unoidl/DrawController.cxx
index 8ae76e58e66b..0fa76487843b 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -184,7 +184,7 @@ sal_Bool SAL_CALL DrawController::suspend( sal_Bool Suspend 
)
             rtl::Reference< SlideShow > xSlideShow( SlideShow::GetSlideShow( 
*pViewShellBase ) );
             if (xSlideShow.is())
             {
-                if (SlideShow::IsInteractiveSlideshow())
+                if (xSlideShow->IsInteractiveSlideshow())
                 {
                     // IASS mode: If preview mode, end it
                     if (xSlideShow->isInteractiveSetup())
diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index 992a1bea7d6a..6792250fd8e7 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -501,7 +501,7 @@ void DrawView::CompleteRedraw(OutputDevice* pOutDev, const 
vcl::Region& rReg, sd
             {
                 if( pShowWindow == pOutDev && mpViewSh )
                     xSlideshow->paint();
-                if (!SlideShow::IsInteractiveSlideshow()) // IASS
+                if (!xSlideshow->IsInteractiveSlideshow()) // IASS
                     return;
             }
         }
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 7f7e6253c046..6286b524ce4d 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -1350,7 +1350,7 @@ sal_Int8 DrawViewShell::AcceptDrop (
     sal_uInt16 /*nPage*/,
     SdrLayerID nLayer )
 {
-    if( SlideShow::IsRunning( GetViewShellBase() ) && 
!SlideShow::IsInteractiveSlideshow() ) // IASS
+    if( SlideShow::IsRunning( GetViewShellBase() ) && 
!SlideShow::IsInteractiveSlideshow( &GetViewShellBase() ) ) // IASS
         return DND_ACTION_NONE;
 
     return mpDrawView->AcceptDrop( rEvt, rTargetHelper, nLayer );
@@ -1370,7 +1370,7 @@ sal_Int8 DrawViewShell::ExecuteDrop (
     if( nPage != SDRPAGE_NOTFOUND )
         nPage = GetDoc()->GetSdPage( nPage, mePageKind )->GetPageNum();
 
-    if( SlideShow::IsRunning( GetViewShellBase() ) && 
!SlideShow::IsInteractiveSlideshow()) // IASS
+    if( SlideShow::IsRunning( GetViewShellBase() ) && 
!SlideShow::IsInteractiveSlideshow( &GetViewShellBase() )) // IASS
         return DND_ACTION_NONE;
 
     Broadcast(ViewShellHint(ViewShellHint::HINT_COMPLEX_MODEL_CHANGE_START));
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 5befa312542a..9b2aeb4187fc 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -586,7 +586,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
 {
     // during a native slide show nothing gets executed!
     if(SlideShow::IsRunning( GetViewShellBase() )
-        && !SlideShow::IsInteractiveSlideshow() // IASS
+        && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() ) // IASS
         && (rReq.GetSlot() != SID_NAVIGATOR))
         return;
 
@@ -3973,7 +3973,8 @@ void DrawViewShell::DuplicateSelectedSlides (SfxRequest& 
rRequest)
 
 void DrawViewShell::ExecutePropPanelAttr (SfxRequest const & rReq)
 {
-    if(SlideShow::IsRunning( GetViewShellBase() ) && 
!SlideShow::IsInteractiveSlideshow()) // IASS
+    if(SlideShow::IsRunning( GetViewShellBase() )
+        && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() )) // IASS
         return;
 
     SdDrawDocument* pDoc = GetDoc();
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 87f0f4e8114d..89f89bbddb03 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -139,7 +139,7 @@ void  DrawViewShell::ExecCtrl(SfxRequest& rReq)
         {
             // switch page in running slide show
             if(SlideShow::IsRunning(GetViewShellBase())
-                && !SlideShow::IsInteractiveSlideshow() // IASS
+                && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase()) // 
IASS
                 && rReq.GetArgs())
             {
                 if (const SfxUInt32Item* pWhatPage = 
rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE))
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 20cca262d039..12a734a6ca45 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -530,7 +530,8 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, 
::sd::Window* pWin)
     if( GetView() &&GetView()->getSmartTags().Command(rCEvt) )
         return;
 
-    const bool bNativeShow (SlideShow::IsRunning(GetViewShellBase()) && 
!SlideShow::IsInteractiveSlideshow()); // IASS
+    const bool bNativeShow (SlideShow::IsRunning(GetViewShellBase())
+        && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())); // IASS
 
     if( rCEvt.GetCommand() == CommandEventId::PasteSelection && !bNativeShow )
     {
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index ed96850d58ed..c9aeab96349b 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -1300,7 +1300,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
     }
 
     rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( 
GetViewShellBase() ) );
-    if( (xSlideshow.is() && xSlideshow->isRunning() && 
!SlideShow::IsInteractiveSlideshow() // IASS
+    if( (xSlideshow.is() && xSlideshow->isRunning() && 
!xSlideshow->IsInteractiveSlideshow() // IASS
         && (xSlideshow->getAnimationMode() != ANIMATIONMODE_PREVIEW) ) || 
GetDocSh()->IsPreview() )
     {
         // Own Slots
@@ -1324,7 +1324,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
         rSet.DisableItem( SID_DELETE_PAGE );
         rSet.DisableItem( SID_PAGESETUP );
 
-        if( xSlideshow.is() && xSlideshow->isRunning() && 
!SlideShow::IsInteractiveSlideshow() ) // IASS
+        if( xSlideshow.is() && xSlideshow->isRunning() && 
!xSlideshow->IsInteractiveSlideshow() ) // IASS
         {
             rSet.ClearItem(SID_INSERTFILE);
             rSet.ClearItem(SID_OBJECT_ROTATE);
@@ -1643,7 +1643,8 @@ void DrawViewShell::GetModeSwitchingMenuState (SfxItemSet 
&rSet)
     // clause because the current function of the docshell can only be
     // search and replace or spell checking and in that case switching the
     // view mode is allowed.
-    const bool bIsRunning = SlideShow::IsRunning(GetViewShellBase()) && 
!SlideShow::IsInteractiveSlideshow(); // IASS
+    const bool bIsRunning = SlideShow::IsRunning(GetViewShellBase())
+        && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase()); // IASS
 
     if (GetViewFrame()->GetFrame().IsInPlace() || bIsRunning)
     {
@@ -1935,7 +1936,8 @@ void DrawViewShell::GetState (SfxItemSet& rSet)
 
 void DrawViewShell::Execute (SfxRequest& rReq)
 {
-    if(SlideShow::IsRunning(GetViewShellBase()) && 
!SlideShow::IsInteractiveSlideshow()) // IASS
+    if(SlideShow::IsRunning(GetViewShellBase())
+        && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS
     {
         // Do not execute anything during a native slide show.
         return;
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index a0960b47bb56..915b5454f7e3 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -371,7 +371,8 @@ void DrawViewShell::Shutdown()
 {
     ViewShell::Shutdown();
 
-    if(SlideShow::IsRunning( GetViewShellBase() ) && 
!SlideShow::IsInteractiveSlideshow()) // IASS
+    if(SlideShow::IsRunning( GetViewShellBase() )
+        && !SlideShow::IsInteractiveSlideshow( &GetViewShellBase() )) // IASS
     {
         // Turn off effects.
         GetDrawView()->SetAnimationMode(SdrAnimationMode::Disable);
@@ -552,7 +553,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
     if( SfxItemState::DEFAULT == rSet.GetItemState( SID_ATTR_ZOOM ) )
     {
         if (GetDocSh()->IsUIActive()
-            || (SlideShow::IsRunning(GetViewShellBase()) && 
!SlideShow::IsInteractiveSlideshow()) // IASS
+            || (SlideShow::IsRunning(GetViewShellBase()) && 
!SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS
             || !GetActiveWindow())
         {
             rSet.DisableItem( SID_ATTR_ZOOM );
@@ -584,7 +585,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
     {
         rtl::Reference< sd::SlideShow > xSlideshow( SlideShow::GetSlideShow( 
GetDoc() ) );
         if (GetDocSh()->IsUIActive()
-            || (xSlideshow.is() && xSlideshow->isRunning() && 
!SlideShow::IsInteractiveSlideshow()) // IASS
+            || (xSlideshow.is() && xSlideshow->isRunning() && 
!xSlideshow->IsInteractiveSlideshow()) // IASS
             || !GetActiveWindow() )
         {
             rSet.DisableItem( SID_ATTR_ZOOMSLIDER );
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 47205a55d694..5f95769e6311 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -142,7 +142,7 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
 {
     // We do not execute a thing during a native slide show
 
-    if (SlideShow::IsRunning(GetViewShellBase()) && 
!SlideShow::IsInteractiveSlideshow()) // IASS
+    if (SlideShow::IsRunning(GetViewShellBase()) && 
!SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS
         return;
 
     sal_uInt16 nSId = rReq.GetSlot();
@@ -739,7 +739,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
 
     // We do not execute a thing during a native slide show
     if((SlideShow::IsRunning(GetViewShellBase())
-        && !SlideShow::IsInteractiveSlideshow()) // IASS
+        && !SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS
         && (rReq.GetSlot() != SID_PRESENTATION_END && rReq.GetSlot() != 
SID_SIZE_PAGE))
         return;
 
diff --git a/sd/source/ui/view/drviewsh.cxx b/sd/source/ui/view/drviewsh.cxx
index d421a76163a8..679fea7b5089 100644
--- a/sd/source/ui/view/drviewsh.cxx
+++ b/sd/source/ui/view/drviewsh.cxx
@@ -50,7 +50,7 @@ void DrawViewShell::MakeVisible(const ::tools::Rectangle& 
rRect, vcl::Window& rW
     if ( IsMouseButtonDown() && !IsMouseSelecting() )
         return;
 
-    if ( SlideShow::IsRunning( GetViewShellBase() ) && 
!SlideShow::IsInteractiveSlideshow() ) // IASS
+    if ( SlideShow::IsRunning( GetViewShellBase() ) && 
!SlideShow::IsInteractiveSlideshow( &GetViewShellBase() ) ) // IASS
         return;
 
     // tdf#98646 check if Rectangle which contains the bounds of the region to
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 465bb1f56a83..a17f240106f3 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -578,7 +578,8 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, 
DropTargetHelper& rTarge
                     }
 
                     if( bBookmark && bFile && ( nDropAction & DND_ACTION_MOVE 
) && mpViewSh
-                        && ( 
SlideShow::IsRunning(mpViewSh->GetViewShellBase()) && 
!SlideShow::IsInteractiveSlideshow() )) // IASS
+                        && ( SlideShow::IsRunning(mpViewSh->GetViewShellBase())
+                        && 
!SlideShow::IsInteractiveSlideshow(&mpViewSh->GetViewShellBase()) )) // IASS
                         bBookmark = false;
 
                     if( bDrawing || bGraphic || bMtf || bBitmap || bBookmark 
|| bFile || bFileList || bXFillExchange || bSBAFormat || bEditEngineODF || 
bString || bRTF )
diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx
index 6ea4f1062690..96a1a01463cd 100644
--- a/sd/source/ui/view/viewshel.cxx
+++ b/sd/source/ui/view/viewshel.cxx
@@ -422,7 +422,7 @@ bool ViewShell::KeyInput(const KeyEvent& rKEvt, 
::sd::Window* pWin)
         const bool bSlideShowRunning(xSlideShow.is() && 
xSlideShow->isRunning());
         bool bUseForSlideShow(bSlideShowRunning);
 
-        if(bSlideShowRunning && SlideShow::IsInteractiveSlideshow())
+        if(bSlideShowRunning && xSlideShow->IsInteractiveSlideshow())
         {
             // IASS
             OutputDevice* pShOut(xSlideShow->getShowWindow());
@@ -838,7 +838,7 @@ void ViewShell::SetupRulers()
     if(!mbHasRulers || !mpContentWindow )
         return;
 
-    if( SlideShow::IsRunning(GetViewShellBase()) && 
!SlideShow::IsInteractiveSlideshow()) // IASS
+    if( SlideShow::IsRunning(GetViewShellBase()) && 
!SlideShow::IsInteractiveSlideshow(&GetViewShellBase())) // IASS
         return;
 
     ::tools::Long nHRulerOfs = 0;
diff --git a/sd/uiconfig/simpress/ui/presentationdialog.ui 
b/sd/uiconfig/simpress/ui/presentationdialog.ui
index 9a474200f366..583f088f6036 100644
--- a/sd/uiconfig/simpress/ui/presentationdialog.ui
+++ b/sd/uiconfig/simpress/ui/presentationdialog.ui
@@ -621,7 +621,7 @@
                     <property name="label-xalign">0</property>
                     <property name="shadow-type">none</property>
                     <child>
-                      <!-- n-columns=1 n-rows=6 -->
+                      <!-- n-columns=1 n-rows=7 -->
                       <object class="GtkGrid" id="grid4">
                         <property name="visible">True</property>
                         <property name="can-focus">False</property>
@@ -744,6 +744,25 @@
                             <property name="top-attach">5</property>
                           </packing>
                         </child>
+                        <child>
+                          <object class="GtkCheckButton" 
id="enableinteractivemode">
+                            <property name="label" translatable="yes" 
context="presentationdialog|enableinteractivemode">Live-mode slidehow 
editing</property>
+                            <property name="visible">True</property>
+                            <property name="can-focus">True</property>
+                            <property name="receives-default">False</property>
+                            <property name="use-underline">True</property>
+                            <property name="draw-indicator">True</property>
+                            <child internal-child="accessible">
+                              <object class="AtkObject" 
id="enableinteractivemode-atkobject">
+                                <property 
name="AtkObject::accessible-description" translatable="yes" 
context="presentationdialog|extended_tip|enableinteractivemode">The Impress 
main document window remains active during the presentation. Users can continue 
editing slide content, which will be reflected in the running 
slideshow.</property>
+                              </object>
+                            </child>
+                          </object>
+                          <packing>
+                            <property name="left-attach">0</property>
+                            <property name="top-attach">6</property>
+                          </packing>
+                        </child>
                       </object>
                     </child>
                     <child type="label">

Reply via email to