diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-10 14:39:07 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-11 06:54:34 +0000 |
commit | 265068d65b39688b8a4756dfbcd46453dd1f9b70 (patch) | |
tree | 6936185b2f2f46b99646d00e542cdde845ef073d /svl/source/numbers | |
parent | 9e0335d1db22bd3ad3f4bb249b30a00fd55558f4 (diff) |
clang-tidy modernize-loop-convert in scripting to svtools
Change-Id: I98229d14109cf243839d632feabde1391ea9bad5
Reviewed-on: https://gerrit.libreoffice.org/24847
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'svl/source/numbers')
-rw-r--r-- | svl/source/numbers/zforlist.cxx | 12 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 14 |
2 files changed, 13 insertions, 13 deletions
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx index 3d00f07520af..91037ff09f86 100644 --- a/svl/source/numbers/zforlist.cxx +++ b/svl/source/numbers/zforlist.cxx @@ -207,19 +207,19 @@ void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBro if ( nHint & SYSLOCALEOPTIONS_HINT_LOCALE ) { - for( size_t i = 0, n = aFormatters.size(); i < n; ++i ) - aFormatters[ i ]->ReplaceSystemCL( eSysLanguage ); + for(SvNumberFormatter* pFormatter : aFormatters) + pFormatter->ReplaceSystemCL( eSysLanguage ); eSysLanguage = MsLangId::getRealLanguage( LANGUAGE_SYSTEM ); } if ( nHint & SYSLOCALEOPTIONS_HINT_CURRENCY ) { - for( size_t i = 0, n = aFormatters.size(); i < n; ++i ) - aFormatters[ i ]->ResetDefaultSystemCurrency(); + for(SvNumberFormatter* pFormatter : aFormatters) + pFormatter->ResetDefaultSystemCurrency(); } if ( nHint & SYSLOCALEOPTIONS_HINT_DATEPATTERNS ) { - for( size_t i = 0, n = aFormatters.size(); i < n; ++i ) - aFormatters[ i ]->InvalidateDateAcceptancePatterns(); + for(SvNumberFormatter* pFormatter : aFormatters) + pFormatter->InvalidateDateAcceptancePatterns(); } } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index bd1e21e9e33f..0529f271979c 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -1635,20 +1635,20 @@ void SvNumberformat::ConvertLanguage( SvNumberFormatter& rConverter, ImpCopyNumberformat( *pFormat ); // Reset values taken over from Formatter/Scanner // pColor still points to table in temporary Formatter/Scanner - for ( sal_uInt16 i = 0; i < 4; i++ ) + for (ImpSvNumFor & rFormatter : NumFor) { - OUString aColorName = NumFor[i].GetColorName(); + OUString aColorName = rFormatter.GetColorName(); Color* pColor = rScan.GetColor( aColorName ); - NumFor[i].SetColor( pColor, aColorName ); + rFormatter.SetColor( pColor, aColorName ); } } } bool SvNumberformat::HasNewCurrency() const { - for ( sal_uInt16 j=0; j<4; j++ ) + for (const auto & j : NumFor) { - if ( NumFor[j].HasNewCurrency() ) + if ( j.HasNewCurrency() ) { return true; } @@ -1659,9 +1659,9 @@ bool SvNumberformat::HasNewCurrency() const bool SvNumberformat::GetNewCurrencySymbol( OUString& rSymbol, OUString& rExtension ) const { - for ( sal_uInt16 j=0; j<4; j++ ) + for (const auto & j : NumFor) { - if ( NumFor[j].GetNewCurrencySymbol( rSymbol, rExtension ) ) + if ( j.GetNewCurrencySymbol( rSymbol, rExtension ) ) { return true; } |