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 )
|
if ( m_bDisposed )
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
PopupMenu * pMenu = GetToolBarCustomMenu(pToolBar);
|
pToolBar->UpdateCustomMenu();
|
||||||
if (pMenu)
|
// remove all entries that do not come from the toolbar itself (fdo#38276)
|
||||||
{
|
ImplClearPopupMenu( pToolBar );
|
||||||
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 );
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue