framework/source/uielement/toolbarmanager.cxx | 9 +++++++++ 1 file changed, 9 insertions(+)
New commits: commit 9e3d6ec6e5333bf1fa4bd151a9897dad20d11a14 Author: Andrzej Hunt <andrzej.h...@collabora.com> Date: Fri Apr 25 20:25:48 2014 +0100 fdo#75489 Pass toolbar context menu commands to toolbar for handling. The toolbar context menu is handled by the toolbar manager, however the items are provided and managed by the toolbar itself -- previously any events on the list of toolbar items in the context menu were silently discarded, whereas now we pass them on to the owning toolbar. Change-Id: Ia17718c3ff8acfba1b6d655022dd9469932f3493 (cherry picked from commit 944c78ecb91608f4c3e9bab32fdbc90c67326525) Reviewed-on: https://gerrit.libreoffice.org/9170 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 3a2617b..288f20d 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1914,6 +1914,7 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) { sal_uInt16 nId = pMenu->GetCurItemId(); if(( nId > 0 ) && ( nId < TOOLBOX_MENUITEM_START )) + // Items in the "enable/disable" sub-menu { // toggle toolbar button visibility OUString aCommand = pMenu->GetItemCommand( nId ); @@ -1976,6 +1977,14 @@ IMPL_LINK( ToolBarManager, MenuSelect, Menu*, pMenu ) } } } + else + // The list of "hidden items", i.e. items which are disabled on + // the toolbar hence shown in the context menu for easier access, + // which are managed by the owning toolbar. + { + m_pToolBar->TriggerItem( pMenu->GetCurItemId() + - TOOLBOX_MENUITEM_START ); + } break; } }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits