summaryrefslogtreecommitdiff
path: root/framework/source/uielement
diff options
context:
space:
mode:
Diffstat (limited to 'framework/source/uielement')
-rw-r--r--framework/source/uielement/toolbarmanager.cxx3
-rw-r--r--framework/source/uielement/toolbarsmenucontroller.cxx3
2 files changed, 3 insertions, 3 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 2d88db04ae67..ad52608c5b0c 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1943,10 +1943,7 @@ void ToolBarManager::AddCustomizeMenuItems(ToolBox const * pToolBar)
pMenu->EnableItem(MENUITEM_TOOLBAR_DOCKALLTOOLBAR, false);
Reference< XDockableWindow > xDockable( VCLUnoHelper::GetInterface( m_pToolBar ), UNO_QUERY );
if( xDockable.is() )
- {
pMenu->CheckItem(MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, xDockable->isLocked());
- pMenu->EnableItem(MENUITEM_TOOLBAR_UNDOCKTOOLBAR, !xDockable->isLocked());
- }
}
else
pMenu->EnableItem(MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, false);
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