diff options
author | Jan Holesovsky <kendy@suse.cz> | 2011-06-10 18:20:18 +0200 |
---|---|---|
committer | Jan Holesovsky <kendy@suse.cz> | 2011-06-10 18:22:53 +0200 |
commit | bd8585dcd5128616d3ca7005d5b4297cea1643a5 (patch) | |
tree | 427c4cb4318b86d341a74574461f0ea8ab5f9780 | |
parent | 105350c622575c2cbf978feef983324aa9b19ff4 (diff) |
Update the toolbar's popup menu hidden items.
-rw-r--r-- | framework/inc/uielement/toolbarmanager.hxx | 2 | ||||
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/framework/inc/uielement/toolbarmanager.hxx b/framework/inc/uielement/toolbarmanager.hxx index d42c40ad9eb7..e34913d0ddbb 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 fceaf63305fb..62f6a06d98b7 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; } |