diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2023-11-04 15:08:14 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2023-11-06 10:04:39 +0100 |
commit | b9159cf17ba61cb78c45f7223027f3e47126643b (patch) | |
tree | f74d8ad029bcab561aaa89591555e09e13b3d1e8 /sfx2/source | |
parent | 6bf428d354349995f7a20e6ce38a47c238911abe (diff) |
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/+/158937
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 3 |
2 files changed, 5 insertions, 2 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 5b0ef2ca491f..d58b62a9bf3b 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -805,7 +805,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; @@ -931,6 +931,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 6a492bffda7e..9134f8da574d 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); |