Simplify the construction of the '>>' menu.
This commit is contained in:
parent
3bdb228895
commit
bca961b855
1 changed files with 3 additions and 19 deletions
|
@ -1872,25 +1872,9 @@ IMPL_LINK( ToolBarManager, MenuButton, ToolBox*, pToolBar )
|
|||
if ( m_bDisposed )
|
||||
return 1;
|
||||
|
||||
PopupMenu * pMenu = GetToolBarCustomMenu(pToolBar);
|
||||
if (pMenu)
|
||||
{
|
||||
sal_uInt16 nObsoleteItems = 6;
|
||||
sal_uInt16 positionInMenu;
|
||||
sal_uInt32 obsoleteItems[] = { MENUITEM_TOOLBAR_CLOSE ,
|
||||
MENUITEM_TOOLBAR_VISIBLEBUTTON ,
|
||||
MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR,
|
||||
MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION,
|
||||
MENUITEM_TOOLBAR_DOCKTOOLBAR,
|
||||
MENUITEM_TOOLBAR_DOCKALLTOOLBAR
|
||||
};
|
||||
for( int i = 0 ; i < nObsoleteItems ; i++ )
|
||||
{
|
||||
positionInMenu = pMenu->GetItemPos( obsoleteItems[i] );
|
||||
if ( positionInMenu != MENU_ITEM_NOTFOUND )
|
||||
pMenu->RemoveItem( positionInMenu );
|
||||
}
|
||||
}
|
||||
pToolBar->UpdateCustomMenu();
|
||||
// remove all entries that do not come from the toolbar itself (fdo#38276)
|
||||
ImplClearPopupMenu( pToolBar );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue