sfx2/source/appl/appserv.cxx | 4 +++- sfx2/source/control/dispatch.cxx | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-)
New commits: commit 1a6d16cb14342f9a66f99960e96027af6e5369ef Author: Szymon Kłos <szymon.k...@collabora.com> AuthorDate: Sat Nov 4 15:08:14 2023 +0100 Commit: Caolán McNamara <caolan.mcnam...@collabora.com> CommitDate: Mon Nov 6 09:58:00 2023 +0100 lok: notebookbar: query SID_NOTEBOOKBAR only when requested to switch UI commit 5bd2931b57a6cb4ac1f39d7ddae874ac693cfab0 tdf#102063 Notebookbar wont appear on launch introduced some Query hack to SfxDispatcher::Update_Impl what causes many updates on lots of different actions. It breaks multi-view state of notebookbar in LOK case, so don't do that. It should be reviewed for regular case too. Change-Id: I8f26bddc6cff991c56a1172893d83b90fb225acd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158897 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com> diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 418bcb88430b..297f6f8f9e14 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -824,7 +824,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) aCurrentMode = comphelper::getString( aAppNode.getNodeValue( "Active" ) ); - if ( aCurrentMode == aNewName ) + if ( !comphelper::LibreOfficeKit::isActive() && aCurrentMode == aNewName ) { bDone = true; break; @@ -950,6 +950,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) // Show/Hide the Notebookbar const SfxStringItem pItem(SID_NOTEBOOKBAR, aNewName); pViewFrame->GetDispatcher()->ExecuteList(SID_NOTEBOOKBAR, SfxCallMode::SYNCHRON, {&pItem}); + const SfxPoolItem *pNbItem; + pViewFrame->GetDispatcher()->QueryState(SID_NOTEBOOKBAR, pNbItem); // Show toolbars for ( const OUString& rName : std::as_const(aMandatoryToolbars) ) diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index 9d85075de433..3915644e0d2a 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -1120,7 +1120,8 @@ void SfxDispatcher::Update_Impl( bool bForce ) if ( xLayoutManager.is() ) xLayoutManager->unlock(); - if ( SfxViewShell::Current() && SfxViewShell::Current()->GetDispatcher() ) + if ( !comphelper::LibreOfficeKit::isActive() && + SfxViewShell::Current() && SfxViewShell::Current()->GetDispatcher() ) { const SfxPoolItem *pItem; SfxViewShell::Current()->GetDispatcher()->QueryState(SID_NOTEBOOKBAR, pItem);