vbahelper/source/msforms/vbacontrol.cxx | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
New commits: commit 3a06db0af05294e0b5db6f07daf35bec7371d4cc Author: Stephan Bergmann <sberg...@redhat.com> AuthorDate: Tue May 31 15:38:29 2022 +0200 Commit: Stephan Bergmann <sberg...@redhat.com> CommitDate: Tue May 31 19:14:49 2022 +0200 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 <sberg...@redhat.com> 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; } }