diff options
author | Michael Meeks <michael.meeks@collabora.com> | 2024-04-16 18:24:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-04-16 20:51:53 +0200 |
commit | 95f1f2143ae53469417fcebc9b2020c34b53ff30 (patch) | |
tree | 5b75e5dbec861df19fea610e195fb752db191cad | |
parent | e005690e9c648ce516c1ed60da6341c7215bf2c9 (diff) |
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 <jenkinscollaboraoffice@gmail.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r-- | desktop/source/lib/init.cxx | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 1c047116a22d..04c46306f12e 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1697,6 +1697,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) |