diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2021-06-14 13:17:37 +0200 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2021-06-14 15:26:23 +0200 |
commit | a21fa7312c45b7b0eb331593f1a6fbeb4d27666f (patch) | |
tree | 28f909735b3d7e14cbac73653ee00ff2960b490a | |
parent | 900506c9060415ab890a9169c4cb7997d0ba8217 (diff) |
We only support ICU version 4.6 or newer, so drop these checks
The minimal ICU version check is in configure.ac.
Change-Id: Ib6480cd3290dabb45d87c6dcbcc9b5513d172e21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117119
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r-- | i18npool/qa/cppunit/test_breakiterator.cxx | 6 | ||||
-rw-r--r-- | i18npool/source/collator/collator_unicode.cxx | 4 | ||||
-rw-r--r-- | i18nutil/source/utility/unicode.cxx | 2 | ||||
-rw-r--r-- | svx/source/dialog/charmap.cxx | 4 |
4 files changed, 0 insertions, 16 deletions
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx index a12949c952e1..a341c712f704 100644 --- a/i18npool/qa/cppunit/test_breakiterator.cxx +++ b/i18npool/qa/cppunit/test_breakiterator.cxx @@ -276,12 +276,6 @@ void TestBreakIterator::testWordBoundaries() //make sure that in all cases isBeginWord and isEndWord matches getWordBoundary for (size_t i = 0; i < SAL_N_ELEMENTS(aBreakTests); ++i) { -#if (U_ICU_VERSION_MAJOR_NUM == 4) && (U_ICU_VERSION_MINOR_NUM <= 2) - //Note the breakiterator test is known to fail on older icu - //versions (4.2.1) for the 200B (ZWSP) Zero Width Space testcase. - if (aBreakTests[i] == 0x200B) - continue; -#endif OUString aTest = "Word" + OUStringChar(aBreakTests[i]) + "Word"; aBounds = m_xBreak->getWordBoundary(aTest, 0, aLocale, mode, true); switch (mode) diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx index 2cff45a6d68d..fc99879759e8 100644 --- a/i18npool/source/collator/collator_unicode.cxx +++ b/i18npool/source/collator/collator_unicode.cxx @@ -360,9 +360,6 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: const sal_uInt8* ruleImage=func(); size_t ruleImageSize = funclen(); -#if (U_ICU_VERSION_MAJOR_NUM == 4) && (U_ICU_VERSION_MINOR_NUM <= 2) - uca_base = new icu::RuleBasedCollator(static_cast<UChar*>(NULL), status); -#else // Not only changed ICU 53.1 the API behavior that a negative // length (ruleImageSize) now leads to failure, but also that // the base RuleBasedCollator passed as uca_base here needs to @@ -374,7 +371,6 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: // NULL (default) locale does not. uca_base.reset( static_cast<icu::RuleBasedCollator*>(icu::Collator::createInstance( icu::Locale::getRoot(), status)) ); -#endif if (! U_SUCCESS(status)) { OUString message = "icu::Collator::createInstance() failed: " + OUString::createFromAscii(u_errorName(status)); SAL_WARN("i18npool", message); diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx index 6a4fdd061f9d..2b8d0a256e99 100644 --- a/i18nutil/source/utility/unicode.cxx +++ b/i18nutil/source/utility/unicode.cxx @@ -572,7 +572,6 @@ OString unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript) case USCRIPT_MANDAEAN: /* Aliased to USCRIPT_MANDAIC in icu 4.6. */ sRet = "mic"; break; -#if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 4) case USCRIPT_NABATAEAN: //no language with an assigned code yet sRet = "mis"; break; @@ -624,7 +623,6 @@ OString unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript) case USCRIPT_WARANG_CITI: sRet = "hoc"; break; -#endif #if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 8) case USCRIPT_AFAKA: sRet = "djk"; diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index a31c1fff1b68..501c85d6b55d 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -1393,7 +1393,6 @@ void SubsetMap::InitList() case UBLOCK_DOMINO_TILES: aAllSubsets.emplace_back( 0x1F030, 0x1F09F, SvxResId(RID_SUBSETSTR_DOMINO_TILES) ); break; -#if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 4) case UBLOCK_SAMARITAN: aAllSubsets.emplace_back( 0x0800, 0x083F, SvxResId(RID_SUBSETSTR_SAMARITAN) ); break; @@ -1472,8 +1471,6 @@ void SubsetMap::InitList() case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C: aAllSubsets.emplace_back( 0x2A700, 0x2B73F, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_C) ); break; -#endif -#if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >= 6) case UBLOCK_MANDAIC: aAllSubsets.emplace_back( 0x0840, 0x085F, SvxResId(RID_SUBSETSTR_MANDAIC) ); break; @@ -1510,7 +1507,6 @@ void SubsetMap::InitList() case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D: aAllSubsets.emplace_back( 0x2B740, 0x2B81F, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_D) ); break; -#endif // Note ICU version 49 (NOT 4.9), so the MAJOR_NUM is two digits. #if U_ICU_VERSION_MAJOR_NUM >= 49 case UBLOCK_ARABIC_EXTENDED_A: |