Bug 38276 - EasyHack: Make the toolbar menu easier
iain billett
iainbillett at gmail.com
Wed Apr 11 06:53:30 PDT 2012
My previous fix was incorrect. The fixed diff is now :
diff --git a/framework/source/uielement/toolbarmanager.cxx
b/framework/source/uielement/toolbarmanager.cxx
index 80adbd7..90ab2a8 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_DOCKTOOLouBAR ,
+ 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;
}
If you're happy with this I could foward it to the list.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libreoffice/attachments/20120411/2c89de9f/attachment.htm>
More information about the LibreOffice
mailing list