diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-11-04 19:20:46 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2023-11-06 10:05:00 +0100 |
commit | 019917b1451bc3f39ea9259df48e68cb098a0402 (patch) | |
tree | cdda904ca5d9e17430e4e1c5e571b1e07dfd159e /sfx2 | |
parent | b9159cf17ba61cb78c45f7223027f3e47126643b (diff) |
lok: notebookbar: reduce calls to SfxNotebookBar::IsActive
- in LOK case toolbars in core doesn't make any difference
- SfxNotebookBar::IsActive which reads config
makes doc_setView slower, avoid it in LOK case then
- it was used for hiding contextual toolbars
- introduced in commit 9bc1ffa2153d2474b023e0860d3c9c68ee18727b
tdf#125040 Make single mode toolbar context aware
Signed-off-by: Szymon Kłos <szymon.klos@collabora.com>
Change-Id: I63de48faf2f7e7f30f8b509455061ac20a788f8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158939
Tested-by: Jenkins
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/workwin.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sfx2/source/appl/workwin.cxx b/sfx2/source/appl/workwin.cxx index 6ff260f2f88e..88b7cc016e3e 100644 --- a/sfx2/source/appl/workwin.cxx +++ b/sfx2/source/appl/workwin.cxx @@ -1199,7 +1199,8 @@ void SfxWorkWindow::UpdateObjectBars_Impl2() // Iterate over all Toolboxes xLayoutManager->lock(); - const bool isNotebookBarActive = sfx2::SfxNotebookBar::IsActive(true); + const bool bForceDestroyToolbars = + comphelper::LibreOfficeKit::isActive() ? false : sfx2::SfxNotebookBar::IsActive(true); for ( auto const & n: aObjBarList ) { ToolbarId eId = n.eId; @@ -1213,7 +1214,7 @@ void SfxWorkWindow::UpdateObjectBars_Impl2() // Is a ToolBox required in this context ? bool bModesMatching = (nUpdateMode != SfxVisibilityFlags::Invisible) && ((nTbxMode & nUpdateMode) == nUpdateMode); - if ( bDestroy || isNotebookBarActive) + if ( bDestroy || bForceDestroyToolbars) { OUString aTbxId = g_aTbxTypeName + GetResourceURLFromToolbarId(eId); xLayoutManager->destroyElement( aTbxId ); |