From bccd83ea5434f945c22d0c45dbc2c3d13efdffee Mon Sep 17 00:00:00 2001 From: Johannes Hauf Date: Thu, 31 Dec 2015 10:58:37 +0100 Subject: Some cleanup for sal_uIntPtr usage Change-Id: Ia9779e6477d8848588f3543d09ea6b4477f594a2 Reviewed-on: https://gerrit.libreoffice.org/21022 Reviewed-by: Stephan Bergmann Tested-by: Stephan Bergmann --- framework/source/uielement/newmenucontroller.cxx | 6 +++--- framework/source/uielement/toolbarsmenucontroller.cxx | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'framework') diff --git a/framework/source/uielement/newmenucontroller.cxx b/framework/source/uielement/newmenucontroller.cxx index 3bf73430f0cc..b9f64b67f4ef 100644 --- a/framework/source/uielement/newmenucontroller.cxx +++ b/framework/source/uielement/newmenucontroller.cxx @@ -83,7 +83,7 @@ void NewMenuController::setMenuImages( PopupMenu* pPopupMenu, bool bSetImages ) bool bImageSet( false ); OUString aImageId; - sal_uIntPtr nAttributePtr = pPopupMenu->GetUserValue(sal::static_int_cast(i)); + sal_uLong nAttributePtr = pPopupMenu->GetUserValue(sal::static_int_cast(i)); MenuAttributes* pAttributes = reinterpret_cast(nAttributePtr); if (pAttributes) aImageId = pAttributes->aImageId; @@ -346,7 +346,7 @@ void NewMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& rPopup if (( nItemId != 0 ) && ( pSubMenu->GetItemType( nItemId ) != MenuItemType::SEPARATOR )) { - sal_uIntPtr nAttributePtr = pSubMenu->GetUserValue(nItemId); + sal_uLong nAttributePtr = pSubMenu->GetUserValue(nItemId); if (nAttributePtr) { MenuAttributes* pAttributes = reinterpret_cast(nAttributePtr); @@ -411,7 +411,7 @@ void SAL_CALL NewMenuController::itemSelected( const css::awt::MenuEvent& rEvent SolarMutexGuard aSolarMutexGuard; PopupMenu* pVCLPopupMenu = static_cast(pPopupMenu->GetMenu()); aTargetURL.Complete = pVCLPopupMenu->GetItemCommand(rEvent.MenuId); - sal_uIntPtr nAttributePtr = pVCLPopupMenu->GetUserValue(rEvent.MenuId); + sal_uLong nAttributePtr = pVCLPopupMenu->GetUserValue(rEvent.MenuId); MenuAttributes* pAttributes = reinterpret_cast(nAttributePtr); if (pAttributes) aTargetFrame = pAttributes->aTargetFrame; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index 0353c89f67ee..a963e9e15ac5 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -446,7 +446,7 @@ void ToolbarsMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r PopupMenu* pVCLPopupMenu = pXPopupMenu ? static_cast(pXPopupMenu->GetMenu()) : nullptr; assert(pVCLPopupMenu); if (pVCLPopupMenu) - pVCLPopupMenu->SetUserValue( nIndex, sal_uIntPtr( aSortedTbs[i].bContextSensitive ? 1L : 0L )); + pVCLPopupMenu->SetUserValue( nIndex, sal_uLong( aSortedTbs[i].bContextSensitive ? 1L : 0L )); } // use VCL popup menu pointer to set vital information that are not part of the awt implementation -- cgit