sd/source/ui/func/fusldlg.cxx |   26 +++++++++++++++++++-------
 1 file changed, 19 insertions(+), 7 deletions(-)

New commits:
commit 79017462936a9344f72d464c0182526b6a176167
Author:     Thorsten Behrens <thorsten.behr...@allotropia.de>
AuthorDate: Fri Feb 7 04:40:44 2025 +0100
Commit:     Thorsten Behrens <thorsten.behr...@allotropia.de>
CommitDate: Fri Feb 7 17:36:59 2025 +0100

    IASS: Update mouse-as-pen status into live slideshow
    
    If live mode is enabled, reflect new settings of slideshow pen
    directly into the running slideshow.
    
    Change-Id: Ic44dc3b28c682366aba72383d24c552b7dd826da
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181227
    Reviewed-by: Thorsten Behrens <thorsten.behr...@allotropia.de>
    Tested-by: Jenkins
    (cherry picked from commit 44575876825f1af7c5d0cf9c5f0c2450d61f4634)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181254
    Tested-by: allotropia jenkins <jenk...@allotropia.de>

diff --git a/sd/source/ui/func/fusldlg.cxx b/sd/source/ui/func/fusldlg.cxx
index 3ce1814c92b2..db12149fd068 100644
--- a/sd/source/ui/func/fusldlg.cxx
+++ b/sd/source/ui/func/fusldlg.cxx
@@ -32,6 +32,11 @@
 #include <Window.hxx>
 #include <optsitem.hxx>
 #include <sdabstdlg.hxx>
+#include <slideshow.hxx>
+#include <ViewShell.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::presentation;
 
 namespace sd {
 
@@ -166,13 +171,6 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
         rPresentationSettings.mbMouseVisible = bValue;
     }
 
-    bValue = ITEMVALUE( aDlgSet, ATTR_PRESENT_PEN, SfxBoolItem );
-    if ( bValue != rPresentationSettings.mbMouseAsPen )
-    {
-        bValuesChanged = true;
-        rPresentationSettings.mbMouseAsPen = bValue;
-    }
-
     bValue = !ITEMVALUE( aDlgSet, ATTR_PRESENT_CHANGE_PAGE, SfxBoolItem );
     if ( bValue != rPresentationSettings.mbLockedPages )
     {
@@ -222,6 +220,20 @@ void FuSlideShowDlg::DoExecute( SfxRequest& )
         rPresentationSettings.mbInteractive = bValue;
     }
 
+    bValue = ITEMVALUE( aDlgSet, ATTR_PRESENT_PEN, SfxBoolItem );
+    if ( bValue != rPresentationSettings.mbMouseAsPen )
+    {
+        bValuesChanged = true;
+        rPresentationSettings.mbMouseAsPen = bValue;
+
+        // live slideshow? pass pen state on immediately
+        Reference< XSlideShowController > xSlideShowController(
+            SlideShow::GetSlideShowController(mpViewShell->GetViewShellBase() 
) );
+        if( xSlideShowController.is() )
+            if(rPresentationSettings.mbInteractive)
+                xSlideShowController->setUsePen( bValue );
+    }
+
     pOptions->SetDisplay( aDlgSet.Get(ATTR_PRESENT_DISPLAY).GetValue() );
 
     // is something has changed, we set the modified flag

Reply via email to