summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2017-02-06 11:44:59 +0900
committerMaxim Monastirsky <momonasmon@gmail.com>2017-02-06 10:32:42 +0000
commit8e53f220ff7c13cccc388f1de3a92f82079c227f (patch)
treea13eb1ccdd43fc5e3b483de8982753730271da36 /framework
parentd8662a69503a99604810fed0c61d3ea9295e47e1 (diff)
framework: Pass Item ID to Menu::GetUserValue() instead of index
This also avoids needless cast. Change-Id: I3fd1517657b489115f20e26f4f75f3e3a5b7c9b7 Reviewed-on: https://gerrit.libreoffice.org/33944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'framework')
-rw-r--r--framework/source/uielement/newmenucontroller.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx
index b371e26515e4..7ee1e564da7d 100644
--- a/framework/source/uielement/newmenucontroller.cxx
+++ b/framework/source/uielement/newmenucontroller.cxx
@@ -76,14 +76,14 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, bool bSetImages )
for ( sal_uInt16 i = 0; i < nItemCount; i++ )
{
- sal_uInt16 nItemId = pPopupMenu->GetItemId( sal::static_int_cast<sal_uInt16>( i ));
+ sal_uInt16 nItemId = pPopupMenu->GetItemId( i );
if ( nItemId != 0 )
{
if ( bSetImages )
{
OUString aImageId;
OUString aCmd( pPopupMenu->GetItemCommand( nItemId ) );
- sal_uLong nAttributePtr = pPopupMenu->GetUserValue(sal::static_int_cast<sal_uInt16>(i));
+ sal_uLong nAttributePtr = pPopupMenu->GetUserValue( nItemId );
MenuAttributes* pAttributes = reinterpret_cast<MenuAttributes *>(nAttributePtr);
if (pAttributes)
aImageId = pAttributes->aImageId;