framework/source/uielement/newmenucontroller.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 8e53f220ff7c13cccc388f1de3a92f82079c227f Author: Takeshi Abe <t...@fixedpoint.jp> Date: Mon Feb 6 11:44:59 2017 +0900 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 <c...@libreoffice.org> Reviewed-by: Maxim Monastirsky <momonas...@gmail.com> Tested-by: Maxim Monastirsky <momonas...@gmail.com> diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index b371e26..7ee1e56 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits