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.
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to