tdf#131441 Disable "UNDOCKTOOLBAR" when toolbar is locked

Change-Id: I3a7fdf2fbde55a8ac4083f1fa8cd76e55718b2e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106476
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
This commit is contained in:
diwanshu885
2020-11-24 11:49:17 +05:30
committed by Heiko Tietze
parent 6993d5d0f1
commit 2f13fcb672

View File

@@ -1538,7 +1538,10 @@ 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);