summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIain Billett <iainbillett@gmail.com>2012-04-11 18:36:00 +0300
committerTor Lillqvist <tlillqvist@suse.com>2012-04-11 20:14:29 +0300
commit63c95085db6ecf6254e3f73d8483006ad3e52222 (patch)
treebecf3d2d52d00483d4a2f04ad1c7720f4b7021ae
parentadef30c0b8d9c5404f37cb9ae3b16040cb4dded7 (diff)
fdo#38276: Improve the ">>" toolbar overflow menu
-rw-r--r--framework/source/uielement/toolbarmanager.cxx20
1 files changed, 19 insertions, 1 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 80adbd735883..cc874b676ece 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1880,7 +1880,25 @@ IMPL_LINK( ToolBarManager, MenuButton, ToolBox*, pToolBar )
if ( m_bDisposed )
return 1;
//modify for i33668 by shizhoubo:2008:04
- GetToolBarCustomMenu(pToolBar);
+ 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 );
+ }
+ }
//end
return 0;
}