summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-04-26 08:23:10 +0100
committerAndrzej Hunt <andrzej.hunt@collabora.com>2014-04-26 08:26:32 +0100
commit3dc6808532d86c4b00a6cb81e0adb74878c13fdd (patch)
tree52997a063843130dd25b0a5f6a4f197cc2a42eaf /framework
parent944c78ecb91608f4c3e9bab32fdbc90c67326525 (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. Change-Id: I8444f4814fea64be1d8f8790445ad6aa01532e70
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 13919fcbabf7..fba6752fc13f 100644
--- a/framework/source/uielement/toolbarmanager.cxx
+++ b/framework/source/uielement/toolbarmanager.cxx
@@ -1601,7 +1601,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++;