summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2020-08-10 21:33:22 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2020-08-11 09:15:27 +0200
commitc2b655bb60e23f3849b8b653e74aa1b00269e113 (patch)
treea04cda95033f1f343151792d8f6f6f055dcf43c8 /framework
parent0de191e1d201d691c2196cf1aef412a98affb66f (diff)
Menu methods take item id not position
Problem can be seen when experimental features turned off and Groupedbar Compact is active, but its menu item isn't checked. Change-Id: I0386fccd0f64cde678c78d9f15dd853a6247e3ab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100446 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/toolbarmodemenucontroller.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/framework/source/uielement/toolbarmodemenucontroller.cxx b/framework/source/uielement/toolbarmodemenucontroller.cxx
index 738ae72cab06..c2f48162145d 100644
--- a/framework/source/uielement/toolbarmodemenucontroller.cxx
+++ b/framework/source/uielement/toolbarmodemenucontroller.cxx
@@ -327,7 +327,10 @@ void SAL_CALL ToolbarModeMenuController::itemActivated( const css::awt::MenuEven
OUString aMode = comphelper::getString( aModesNode.getNodeValue( "Active" ) );
for ( int i = 0; i < m_xPopupMenu->getItemCount(); ++i )
- m_xPopupMenu->checkItem( i+1, aMode == m_xPopupMenu->getCommand( i+1 ) );
+ {
+ sal_Int16 nItemId(m_xPopupMenu->getItemId(i));
+ m_xPopupMenu->checkItem(nItemId, aMode == m_xPopupMenu->getCommand(nItemId));
+ }
}
// XPopupMenuController