summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-05-31 15:38:29 +0200
committerStephan Bergmann <sbergman@redhat.com>2022-05-31 19:14:49 +0200
commit3a06db0af05294e0b5db6f07daf35bec7371d4cc (patch)
tree3ab34a25c574fd653ad20b9fce39090654decab4
parent66500b5041135dbca62f10c8b20ce000a2ae43ff (diff)
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 <sbergman@redhat.com>
-rw-r--r--vbahelper/source/msforms/vbacontrol.cxx12
1 files changed, 6 insertions, 6 deletions
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;
}
}