desktop/source/lib/init.cxx      |   23 +++++++++++++++++++++++
 sfx2/source/doc/sfxbasemodel.cxx |    3 +++
 2 files changed, 26 insertions(+)

New commits:
commit 47fbbd7c6b9ea6b4a20f05fdf8870cb9e125fb21
Author:     Michael Meeks <[email protected]>
AuthorDate: Tue Apr 16 18:24:26 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Aug 28 16:15:16 2024 +0200

    lok: elide various unhelpful events during background save.
    
    In particular TEXT_SELECTION and TABLE_SELECTED seem to be favorites,
    but nothing good would come of getting these others either.
    
    Change-Id: I1f014824452bffaeddb1dfaf6565542c3c7c9e91
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166158
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit 95f1f2143ae53469417fcebc9b2020c34b53ff30)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172522
    Tested-by: Jenkins

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 5241fd4c1673..9cc65b4b9e68 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -1704,6 +1704,29 @@ void CallbackFlushHandler::queue(const int type, 
CallbackData& aCallbackData)
 
     SAL_INFO("lok", "Queue: [" << type << "]: [" << aCallbackData.getPayload() 
<< "] on " << m_queue1.size() << " entries.");
 
+    if (comphelper::LibreOfficeKit::isForkedChild())
+    {
+        // In background mode - avoid any extraneous or confusing messages
+        switch (type)
+        {
+        case LOK_CALLBACK_INVALIDATE_TILES:
+        case LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR:
+        case LOK_CALLBACK_TEXT_SELECTION:
+        case LOK_CALLBACK_CURSOR_VISIBLE:
+        case LOK_CALLBACK_GRAPHIC_SELECTION:
+        case LOK_CALLBACK_TABLE_SELECTED:
+        case LOK_CALLBACK_SET_PART:
+        case LOK_CALLBACK_DOCUMENT_SIZE_CHANGED:
+        case LOK_CALLBACK_MOUSE_POINTER:
+        case LOK_CALLBACK_INVALIDATE_HEADER:
+        case LOK_CALLBACK_INVALIDATE_SHEET_GEOMETRY:
+            SAL_INFO("lok", "Elide event in background save mode");
+            return;
+        default:
+            break;
+        }
+    }
+
     bool bIsChartActive = false;
     bool bIsComment = false;
     if (type == LOK_CALLBACK_GRAPHIC_SELECTION)
commit 4149b79c0a04e80610a34087a8b874494e7075e3
Author:     Michael Meeks <[email protected]>
AuthorDate: Tue Apr 16 18:11:36 2024 +0100
Commit:     Caolán McNamara <[email protected]>
CommitDate: Wed Aug 28 16:15:09 2024 +0200

    lok: avoid sending jsdialog messages during background save.
    
    This creates lots of enable/disable traffic that is no longer
    needed, and may trigger a fallback to non-background-save.
    
    Change-Id: I3dd789d13b6c28540422d99128014c9c17e00d70
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166157
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Caolán McNamara <[email protected]>
    (cherry picked from commit e005690e9c648ce516c1ed60da6341c7215bf2c9)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/172521
    Tested-by: Jenkins

diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index fc0db4f66f6f..a217dc252a85 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -389,6 +389,9 @@ SfxOwnFramesLocker::SfxOwnFramesLocker( SfxObjectShell 
const * pObjectShell )
     if ( !pObjectShell )
         return;
 
+    if ( comphelper::LibreOfficeKit::isForkedChild() )
+        return; // no need to tweak UI when in the background
+
     for (   SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pObjectShell );
             pFrame;
             pFrame = SfxViewFrame::GetNext( *pFrame, pObjectShell )

Reply via email to