diff options
Diffstat (limited to 'toolkit/source/helper/vclunohelper.cxx')
-rw-r--r-- | toolkit/source/helper/vclunohelper.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index bfe0e51613f6..dda017297fb2 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -544,19 +544,19 @@ namespace { FUNIT_FOOT, MeasureUnit::FOOT, 1 }, { FUNIT_MILE, MeasureUnit::MILE, 1 }, }; - for ( size_t i = 0; i < SAL_N_ELEMENTS( aUnits ); ++i ) + for (auto & aUnit : aUnits) { if ( eDirection == FieldUnitToMeasurementUnit ) { - if ( ( aUnits[ i ].eFieldUnit == (FieldUnit)_nUnit ) && ( aUnits[ i ].nFieldToMeasureFactor == _rFieldToUNOValueFactor ) ) - return aUnits[ i ].nMeasurementUnit; + if ( ( aUnit.eFieldUnit == (FieldUnit)_nUnit ) && ( aUnit.nFieldToMeasureFactor == _rFieldToUNOValueFactor ) ) + return aUnit.nMeasurementUnit; } else { - if ( aUnits[ i ].nMeasurementUnit == _nUnit ) + if ( aUnit.nMeasurementUnit == _nUnit ) { - _rFieldToUNOValueFactor = aUnits[ i ].nFieldToMeasureFactor; - return (sal_Int16)aUnits[ i ].eFieldUnit; + _rFieldToUNOValueFactor = aUnit.nFieldToMeasureFactor; + return (sal_Int16)aUnit.eFieldUnit; } } } |