[Libreoffice-commits] core.git: i18npool/qa i18npool/source i18nutil/source svx/source

Mike Kaganski (via logerrit) logerrit at kemper.freedesktop.org
Mon Jun 14 13:26:59 UTC 2021


 i18npool/qa/cppunit/test_breakiterator.cxx    |    6 ------
 i18npool/source/collator/collator_unicode.cxx |    4 ----
 i18nutil/source/utility/unicode.cxx           |    2 --
 svx/source/dialog/charmap.cxx                 |    4 ----
 4 files changed, 16 deletions(-)

New commits:
commit a21fa7312c45b7b0eb331593f1a6fbeb4d27666f
Author:     Mike Kaganski <mike.kaganski at collabora.com>
AuthorDate: Mon Jun 14 13:17:37 2021 +0200
Commit:     Mike Kaganski <mike.kaganski at collabora.com>
CommitDate: Mon Jun 14 15:26:23 2021 +0200

    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 at collabora.com>

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:


More information about the Libreoffice-commits mailing list