Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


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.

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.