summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMert Tumer <mert.tumer@collabora.com>2021-08-06 12:42:16 +0300
committerMichael Meeks <michael.meeks@collabora.com>2021-08-06 15:26:03 +0200
commitb606764ce2a042f2a38c98820d7236661149d20c (patch)
tree63ea748705ed3d47f9302b12ffe33e73a49d8854 /sfx2
parenta03892e818736b98d5d3699fdf20ad461f2fb70b (diff)
lok: Avoid redundant call to UpdateConfigurations
We call doc_setView each time we send an event to LOK such as keystroke and SidebarController::notifyContextChange event is triggered after that UpdateConfigurations() call causes layout reallocating for whole sidebar and we end up keep doing it. It takes significant amount of cpu time for lok case for no reason. Signed-off-by: Mert Tumer <mert.tumer@collabora.com> Change-Id: I8f456156af841fdeaba1934498863a07a7d4554e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120112 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/sidebar/SidebarController.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx
index 266a69f5dcbe..db4f9679e34a 100644
--- a/sfx2/source/sidebar/SidebarController.cxx
+++ b/sfx2/source/sidebar/SidebarController.cxx
@@ -333,7 +333,8 @@ void SAL_CALL SidebarController::notifyContextChangeEvent (const css::ui::Contex
// calling with held
// solarmutex
// TODO: this call is redundant but mandatory for unit test to update context on document loading
- UpdateConfigurations();
+ if (!comphelper::LibreOfficeKit::isActive())
+ UpdateConfigurations();
}
}