diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2021-05-19 13:21:00 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2021-06-08 15:28:56 +0200 |
commit | 086fa727cabf46eacfec1a0fd4f6dfe916aa2f04 (patch) | |
tree | d17d263a3f2eef1b9c0d39ffd08e751c3f2fa105 /framework/source/uielement/toolbarsmenucontroller.cxx | |
parent | a2d8a737f41cbb0ed8a51a99b1c233b25e433d1c (diff) |
Resolves tdf#131817 - Option to globally switch toolbar locking on/off
Reverts 6993d5d0f1079fe720a7da004b70b57361c99fc6 and
sets Locked in GlobalSettings to true
New UNO command ToolbarLock to toggle the state added to
the toolbars menu
Change-Id: I246280b2b7930f2bf686e6fc26383da4799b5028
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115797
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'framework/source/uielement/toolbarsmenucontroller.cxx')
-rw-r--r-- | framework/source/uielement/toolbarsmenucontroller.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 1498cb1ed3e6..83816bc64bdb 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -69,6 +69,7 @@ using namespace ::com::sun::star::container; using namespace ::com::sun::star::ui; constexpr OUStringLiteral CMD_RESTOREVISIBILITY = u".cmd:RestoreVisibility"; +constexpr OUStringLiteral CMD_LOCKTOOLBARS = u".uno:ToolbarLock"; constexpr OUStringLiteral STATIC_CMD_PART = u".uno:AvailableToolbars?Toolbar:string="; const char STATIC_INTERNAL_CMD_PART[] = ".cmd:"; @@ -461,6 +462,8 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > co OUString aLabelStr(FwkResId(STR_RESTORE_TOOLBARS)); addCommand( m_xPopupMenu, CMD_RESTOREVISIBILITY, aLabelStr ); + aLabelStr = FwkResId(STR_LOCK_TOOLBARS); + addCommand( m_xPopupMenu, CMD_LOCKTOOLBARS, aLabelStr ); } // XEventListener |