From 3a06db0af05294e0b5db6f07daf35bec7371d4cc Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 31 May 2022 15:38:29 +0200 Subject: Use a range-based for loop Change-Id: Id3c358e0a7f11a4a203b1acbd42b9b09c7f7a2fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135193 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- vbahelper/source/msforms/vbacontrol.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'vbahelper') diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index 937793c3ec23..5cbea01a4dd3 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -465,11 +465,11 @@ PointerStyles const styles[] = { static tools::Long lcl_loPointerToMsoPointer( PointerStyle eType ) { tools::Long nRet = msforms::fmMousePointer::fmMousePointerDefault; - for ( int i = 0; i < int(SAL_N_ELEMENTS( styles )); ++i ) + for ( auto const & i: styles ) { - if ( styles[ i ].loPointStyle == eType ) + if ( i.loPointStyle == eType ) { - nRet = styles[ i ].msoPointerStyle; + nRet = i.msoPointerStyle; break; } } @@ -479,11 +479,11 @@ static tools::Long lcl_loPointerToMsoPointer( PointerStyle eType ) static PointerStyle lcl_msoPointerToLOPointer( tools::Long msoPointerStyle ) { PointerStyle aPointer( PointerStyle::Arrow ); - for ( int i = 0; i < int(SAL_N_ELEMENTS( styles )); ++i ) + for ( auto const & i: styles ) { - if ( styles[ i ].msoPointerStyle == msoPointerStyle ) + if ( i.msoPointerStyle == msoPointerStyle ) { - aPointer = styles[ i ].loPointStyle; + aPointer = i.loPointStyle; break; } } -- cgit