summaryrefslogtreecommitdiff
path: root/i18npool
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2018-03-18 10:34:42 +0100
committerJulien Nabet <serval2412@yahoo.fr>2018-03-18 11:33:16 +0100
commit1e3a5bb9e92aea074d7350ccde0dae5c123e885d (patch)
tree1244921df6b85b0e7ba81e74043a72251be5070f /i18npool
parent2980e65d9728cfee73c1c49d64e19af50f756521 (diff)
Use for-range loops in hwpfilter, i18n*, idl* and io
Change-Id: I980464162b73ed9ee0a09acbca1b9050af8d1027 Reviewed-on: https://gerrit.libreoffice.org/51492 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'i18npool')
-rw-r--r--i18npool/source/collator/collatorImpl.cxx4
-rw-r--r--i18npool/source/indexentry/indexentrysupplier.cxx4
-rw-r--r--i18npool/source/localedata/LocaleNode.cxx17
-rw-r--r--i18npool/source/textconversion/textconversionImpl.cxx4
4 files changed, 15 insertions, 14 deletions
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx
index 27737270a7f0..bd1cd1774ebd 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -182,9 +182,9 @@ CollatorImpl::loadCachedCollator(const lang::Locale& rLocale, const OUString& rS
if (!bLoaded)
{
::std::vector< OUString > aFallbacks( LocaleDataImpl::getFallbackLocaleServiceNames( rLocale));
- for (::std::vector< OUString >::const_iterator it( aFallbacks.begin()); it != aFallbacks.end(); ++it)
+ for (auto const& fallback : aFallbacks)
{
- bLoaded = createCollator( rLocale, *it + "_" + rSortAlgorithm, rSortAlgorithm);
+ bLoaded = createCollator( rLocale, fallback + "_" + rSortAlgorithm, rSortAlgorithm);
if (bLoaded)
break;
}
diff --git a/i18npool/source/indexentry/indexentrysupplier.cxx b/i18npool/source/indexentry/indexentrysupplier.cxx
index 7acb0069da32..368fcba116c4 100644
--- a/i18npool/source/indexentry/indexentrysupplier.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier.cxx
@@ -133,9 +133,9 @@ IndexEntrySupplier::getLocaleSpecificIndexEntrySupplier(const Locale& rLocale, c
if (!bLoaded)
{
::std::vector< OUString > aFallbacks( LocaleDataImpl::getFallbackLocaleServiceNames( rLocale));
- for (::std::vector< OUString >::const_iterator it( aFallbacks.begin()); it != aFallbacks.end(); ++it)
+ for (auto const& fallback : aFallbacks)
{
- bLoaded = createLocaleSpecificIndexEntrySupplier( *it + "_" + aSortAlgorithm);
+ bLoaded = createLocaleSpecificIndexEntrySupplier(fallback + "_" + aSortAlgorithm);
if (bLoaded)
break;
}
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 57eab24382da..19554017041e 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -920,11 +920,13 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
else
{
bool bHaveAbbr = false;
- for (::std::vector< OUString >::const_iterator it( theDateAcceptancePatterns.begin());
- !bHaveAbbr && it != theDateAcceptancePatterns.end(); ++it)
+ for (auto const& elem : theDateAcceptancePatterns)
{
- if ((*it).indexOf('D') > -1 && (*it).indexOf('M') > -1 && (*it).indexOf('Y') <= -1)
+ if (elem.indexOf('D') > -1 && elem.indexOf('M') > -1 && elem.indexOf('Y') <= -1)
+ {
bHaveAbbr = true;
+ break;
+ }
}
if (!bHaveAbbr)
incError( "No abbreviated DateAcceptancePattern present. For example M/D or D.M.\n");
@@ -1257,17 +1259,16 @@ void LCFormatNode::generateCode (const OFileWriter &of) const
{
nIndex = 0;
sal_uInt32 cDecSep = aDecSep.iterateCodePoints( &nIndex);
- for (vector<OUString>::const_iterator aIt = theDateAcceptancePatterns.begin();
- aIt != theDateAcceptancePatterns.end(); ++aIt)
+ for (auto const& elem : theDateAcceptancePatterns)
{
- if ((*aIt).getLength() == (cDecSep <= 0xffff ? 3 : 4))
+ if (elem.getLength() == (cDecSep <= 0xffff ? 3 : 4))
{
nIndex = 1;
- if ((*aIt).iterateCodePoints( &nIndex) == cDecSep)
+ if (elem.iterateCodePoints( &nIndex) == cDecSep)
{
++nError;
fprintf( stderr, "Error: Date acceptance pattern '%s' matches decimal number '#%s#'\n",
- OSTR( *aIt), OSTR( aDecSep));
+ OSTR(elem), OSTR( aDecSep));
}
}
}
diff --git a/i18npool/source/textconversion/textconversionImpl.cxx b/i18npool/source/textconversion/textconversionImpl.cxx
index 990e59f112b4..fa9af75ff839 100644
--- a/i18npool/source/textconversion/textconversionImpl.cxx
+++ b/i18npool/source/textconversion/textconversionImpl.cxx
@@ -87,9 +87,9 @@ TextConversionImpl::getLocaleSpecificTextConversion(const Locale& rLocale)
if (!xI.is())
{
::std::vector< OUString > aFallbacks( LocaleDataImpl::getFallbackLocaleServiceNames( aLocale));
- for (::std::vector< OUString >::const_iterator it( aFallbacks.begin()); it != aFallbacks.end(); ++it)
+ for (auto const& fallback : aFallbacks)
{
- xI = m_xContext->getServiceManager()->createInstanceWithContext( aPrefix + *it, m_xContext);
+ xI = m_xContext->getServiceManager()->createInstanceWithContext( aPrefix + fallback, m_xContext);
if (xI.is())
break;
}