summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-04-26 08:23:10 +0100
committerAndras Timar <andras.timar@collabora.com>2014-04-30 14:57:04 +0200
commitb5f89e04c3fcdd4217f962e8d3644e8235591264 (patch)
tree22e391ea8220415659af9dab6c2cc5a4ff480af5 /framework
parent44666ffdffc559efed0ce0822200aeb6b15059dd (diff)
Toolbar overflow/context menu: keep ordering and don't discard separator.
Previously the overflow/context menu should have had a separator shown between the overflow items and the hidden items, however these were inadvertently removed by ImplClearPopupMenu which filters the items before the menu is displayed. The previous ordering of items was also the REVERSE of the ordering in the toolbar -- the overflow menu is a logical extension of the toolbar hence items should be in the same order as they were in the toolbar. (cherry picked from commit 3dc6808532d86c4b00a6cb81e0adb74878c13fdd) Conflicts: vcl/source/window/toolbox2.cxx Change-Id: I8444f4814fea64be1d8f8790445ad6aa01532e70 Reviewed-on: https://gerrit.libreoffice.org/9171 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/toolbarmanager.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx
index 288f20dbd290..4137de3da049 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1610,7 +1610,8 @@ void ToolBarManager::ImplClearPopupMenu( ToolBox *pToolBar )
sal_uInt16 i;
for( i=0; i<pMenu->GetItemCount(); )
{
- if( pMenu->GetItemId( i ) < TOOLBOX_MENUITEM_START )
+ if( pMenu->GetItemId( i ) < TOOLBOX_MENUITEM_START
+ && pMenu->GetItemId( i ) != 0 ) // Don't remove separators (Id == 0)
pMenu->RemoveItem( i );
else
i++;