From f7961456d81c3ee6ee4c13eac9ef7add6c7ea6b5 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Mon, 18 Dec 2017 20:28:07 +0100 Subject: Explicitly qualify ICU types with icu:: namespace It will be required by ICU 61 anyway, see https://ssl.icu-project.org/repos/icu/trunk/icu4c/readme.html#RecBuild Change-Id: I16b6bc8b8c49713f32424df5fc6db494df7b6892 Reviewed-on: https://gerrit.libreoffice.org/46738 Reviewed-by: Eike Rathke Tested-by: Eike Rathke --- i18npool/source/collator/collator_unicode.cxx | 16 ++++++++-------- i18npool/source/collator/gencoll_rule.cxx | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'i18npool/source/collator') diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index 71bc4ed..37dc7ee 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -138,7 +138,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: UErrorCode status = U_ZERO_ERROR; OUString rule = LocaleDataImpl::get()->getCollatorRuleByAlgorithm(rLocale, rAlgorithm); if (!rule.isEmpty()) { - collator = new RuleBasedCollator(reinterpret_cast(rule.getStr()), status); + collator = new icu::RuleBasedCollator(reinterpret_cast(rule.getStr()), status); if (! U_SUCCESS(status)) throw RuntimeException(); } if (!collator && OUString(LOCAL_RULE_LANGS).indexOf(rLocale.Language) >= 0) { @@ -343,7 +343,7 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: size_t ruleImageSize = funclen(); #if (U_ICU_VERSION_MAJOR_NUM == 4) && (U_ICU_VERSION_MINOR_NUM <= 2) - uca_base = new RuleBasedCollator(static_cast(NULL), status); + uca_base = new icu::RuleBasedCollator(static_cast(NULL), status); #else // Not only changed ICU 53.1 the API behavior that a negative // length (ruleImageSize) now leads to failure, but also that @@ -354,11 +354,11 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: // The default collator of the en-US locale would also fulfill // the requirement. The collator of the actual locale or the // NULL (default) locale does not. - uca_base = static_cast(icu::Collator::createInstance( + uca_base = static_cast(icu::Collator::createInstance( icu::Locale::getRoot(), status)); #endif if (! U_SUCCESS(status)) throw RuntimeException(); - collator = new RuleBasedCollator( + collator = new icu::RuleBasedCollator( reinterpret_cast(ruleImage), ruleImageSize, uca_base, status); if (! U_SUCCESS(status)) throw RuntimeException(); } @@ -372,17 +372,17 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: */ icu::Locale icuLocale( LanguageTagIcu::getIcuLocale( LanguageTag( rLocale), rAlgorithm)); // load ICU collator - collator = static_cast( icu::Collator::createInstance(icuLocale, status) ); + collator = static_cast( icu::Collator::createInstance(icuLocale, status) ); if (! U_SUCCESS(status)) throw RuntimeException(); } } if (options & CollatorOptions::CollatorOptions_IGNORE_CASE_ACCENT) - collator->setStrength(Collator::PRIMARY); + collator->setStrength(icu::Collator::PRIMARY); else if (options & CollatorOptions::CollatorOptions_IGNORE_CASE) - collator->setStrength(Collator::SECONDARY); + collator->setStrength(icu::Collator::SECONDARY); else - collator->setStrength(Collator::TERTIARY); + collator->setStrength(icu::Collator::TERTIARY); return 0; } diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx index 7d795b5..3048d12 100644 --- a/i18npool/source/collator/gencoll_rule.cxx +++ b/i18npool/source/collator/gencoll_rule.cxx @@ -113,7 +113,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) //UCollator *coll = ucol_openRules(Obuf.getStr(), Obuf.getLength(), UCOL_OFF, // UCOL_DEFAULT_STRENGTH, &parseError, &status); - auto coll = o3tl::make_unique(reinterpret_cast(Obuf.getStr()), status); + auto coll = o3tl::make_unique(reinterpret_cast(Obuf.getStr()), status); if (U_SUCCESS(status)) { std::vector data; -- cgit v1.1