[Libreoffice-commits] .: framework/inc framework/source
Jan Holesovsky
kendy at kemper.freedesktop.org
Fri Jun 10 09:23:01 PDT 2011
framework/inc/uielement/toolbarmanager.hxx | 2 +-
framework/source/uielement/toolbarmanager.cxx | 9 ++++++---
2 files changed, 7 insertions(+), 4 deletions(-)
New commits:
commit a7af5bcf5b50e7228cb0a2637a082cbe8f1e139d
Author: Jan Holesovsky <kendy at suse.cz>
Date: Fri Jun 10 18:20:18 2011 +0200
Update the toolbar's popup menu hidden items.
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx
index 27f87db..c4859d0 100644
--- a/framework/inc/uielement/toolbarmanager.hxx
+++ b/framework/inc/uielement/toolbarmanager.hxx
@@ -163,7 +163,7 @@ class ToolBarManager : public ::com::sun::star::frame::XFrameActionListener
protected:
//added for 33668 by shizhoubo : 2008:04
DECL_LINK( Command, CommandEvent * );
- PopupMenu * GetToolBarCustomMeun(ToolBox* pToolBar);
+ PopupMenu * GetToolBarCustomMenu(ToolBox* pToolBar);
//end
DECL_LINK( Click, ToolBox * );
DECL_LINK( DropdownClick, ToolBox * );
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 8a0578f..a3f431b 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1725,8 +1725,11 @@ bool ToolBarManager::MenuItemAllowed( sal_uInt16 ) const
}
//added for i33668 by shizhoubo : 200804
-PopupMenu * ToolBarManager::GetToolBarCustomMeun(ToolBox* pToolBar)
+PopupMenu * ToolBarManager::GetToolBarCustomMenu(ToolBox* pToolBar)
{
+ // update the list of hidden tool items first
+ pToolBar->UpdateCustomMenu();
+
PopupMenu *pMenu = pToolBar->GetMenu();
// remove all entries before inserting new ones
ImplClearPopupMenu( pToolBar );
@@ -1857,7 +1860,7 @@ IMPL_LINK( ToolBarManager, Command, CommandEvent*, pCmdEvt )
if ( pCmdEvt->GetCommand() != COMMAND_CONTEXTMENU )
return 0;
- PopupMenu * pMenu = GetToolBarCustomMeun(m_pToolBar);
+ PopupMenu * pMenu = GetToolBarCustomMenu(m_pToolBar);
if (pMenu)
{
// make sure all disabled entries will be shown
@@ -1877,7 +1880,7 @@ IMPL_LINK( ToolBarManager, MenuButton, ToolBox*, pToolBar )
if ( m_bDisposed )
return 1;
//modify for i33668 by shizhoubo:2008:04
- GetToolBarCustomMeun(pToolBar);
+ GetToolBarCustomMenu(pToolBar);
//end
return 0;
}
More information about the Libreoffice-commits
mailing list