diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2020-08-10 18:35:22 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2020-08-11 10:33:00 +0200 |
commit | 3239708375c81005d66627c09d1907848cd0cfda (patch) | |
tree | bd2f8424cbaa579627022d2f71e9f4ba88c3d7ea /sfx2 | |
parent | 7841adec312b4993156cdbd9702223e8f1f34132 (diff) |
Simplify toolbar mode switching
Change-Id: I3bd809ce3ef661f6566a73e639fbd5e4bb1b7e3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100439
Tested-by: Jenkins
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/sdi/sfx.sdi | 2 | ||||
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi index 888a0e4b41da..a50b5f1a17a6 100644 --- a/sfx2/sdi/sfx.sdi +++ b/sfx2/sdi/sfx.sdi @@ -2615,7 +2615,7 @@ SfxVoidItem Notebookbar SID_NOTEBOOKBAR (SfxStringItem File SID_NOTEBOOKBAR) [ AutoUpdate = TRUE, - FastCall = FALSE, + FastCall = TRUE, ReadOnlyDoc = TRUE, Toggle = FALSE, Container = FALSE, diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 68f80d7e99e3..b07974a9b34a 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -892,6 +892,10 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) } } + // Show/Hide the Notebookbar + const SfxStringItem pItem(SID_NOTEBOOKBAR, aNewName); + pViewFrame->GetDispatcher()->ExecuteList(SID_NOTEBOOKBAR, SfxCallMode::SYNCHRON, {&pItem}); + // Show toolbars for ( const OUString& rName : std::as_const(aMandatoryToolbars) ) { @@ -929,10 +933,6 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) } } - // Show/Hide the Notebookbar - const SfxPoolItem* pItem; - pViewFrame->GetDispatcher()->QueryState( SID_NOTEBOOKBAR, pItem ); - // Save settings if ( pViewFrame == SfxViewFrame::Current() ) { |