sfx2/source/control/dispatch.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit cc4b05f92bb16c80d75b7c47e2f9e7b0fd0cfd17
Author:     Miklos Vajna <[email protected]>
AuthorDate: Thu Nov 20 08:15:16 2025 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Thu Nov 20 09:31:07 2025 +0100

    Related: cool#4535 sfx2 lok: warn when ignoring UNO command in read-only 
mode
    
    It took a bit of time to find why dispatching this command doesn't
    result in a call to SwView::Execute(), make the problem more obvious for
    the next person.
    
    Change-Id: I01dd63391b955f1c6f4cc9f2c060c83a8bff8fb2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194237
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 11614d9ef688..3572c2a7c8cf 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1705,7 +1705,12 @@ bool SfxDispatcher::FindServer_(sal_uInt16 nSlot, 
SfxSlotServer& rServer)
             {
                 if (!IsCommandAllowedInLokReadOnlyViewMode(pSlot->GetCommand(),
                                                            
*xImp->pFrame->GetViewShell()))
+                {
+                    SAL_WARN("sfx.control", "SfxDispatcher::FindServer_: 
rejecting command '"
+                                                << pSlot->GetCommand()
+                                                << "', not allowed in LOK 
read-only view mode");
                     return false;
+                }
             }
         }
 

Reply via email to