sfx2/source/appl/workwin.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 019917b1451bc3f39ea9259df48e68cb098a0402
Author:     Szymon Kłos <szymon.k...@collabora.com>
AuthorDate: Sat Nov 4 19:20:46 2023 +0100
Commit:     Szymon Kłos <szymon.k...@collabora.com>
CommitDate: Mon Nov 6 10:05:00 2023 +0100

    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.k...@collabora.com>
    Change-Id: I63de48faf2f7e7f30f8b509455061ac20a788f8a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158939
    Tested-by: Jenkins

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 );

Reply via email to