configure.ac | 2 - download.lst | 8 +++--- external/icu/icu4c-android.patch.1 | 8 +++--- external/icu/icu4c-build.patch.1 | 24 +++++++++---------- external/icu/icu4c-khmerbreakengine.patch.1 | 34 ++++++++++++++-------------- external/icu/no-python.patch | 4 +-- i18nutil/source/utility/unicode.cxx | 23 ++++++++++++++++++ include/svx/strings.hrc | 10 ++++++++ svx/source/dialog/charmap.cxx | 32 ++++++++++++++++++++++++++ 9 files changed, 105 insertions(+), 40 deletions(-)
New commits: commit 5d09908418767a541977acae348654af8239e9db Author: Taichi Haradaguchi <[email protected]> AuthorDate: Wed Oct 30 14:47:03 2024 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Fri Mar 14 09:54:11 2025 +0100 Update ICU to 77.1 Downloaded from https://github.com/unicode-org/icu/releases/tag/release-77-1 Change-Id: I05060c281b70ad7e9733268796b695d1cf4ea30a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175841 Tested-by: Xisco Fauli <[email protected]> Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins diff --git a/configure.ac b/configure.ac index 37d1a5064370..a9e63fd288e9 100644 --- a/configure.ac +++ b/configure.ac @@ -11284,7 +11284,7 @@ fi dnl =================================================================== dnl Check for system icu dnl =================================================================== -ICU_MAJOR=75 +ICU_MAJOR=77 ICU_MINOR=1 ICU_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/icu/source/i18n -I${WORKDIR}/UnpackedTarball/icu/source/common" ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib -licuuc" diff --git a/download.lst b/download.lst index e6e87ff3f258..7110bca04877 100644 --- a/download.lst +++ b/download.lst @@ -352,10 +352,10 @@ IACCESSIBLE2_TARBALL := IAccessible2-1.3+git20231013.3d8c7f0.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts -ICU_SHA256SUM := cb968df3e4d2e87e8b11c49a5d01c787bd13b9545280fc6642f826527618caef -ICU_TARBALL := icu4c-75_1-src.tgz -ICU_DATA_SHA256SUM := a5104212dc317a64f9b035723ea706f2f4fd5a0f37b7923fae7aeb9d1d0061b1 -ICU_DATA_TARBALL := icu4c-75_1-data.zip +ICU_SHA256SUM := 588e431f77327c39031ffbb8843c0e3bc122c211374485fa87dc5f3faff24061 +ICU_TARBALL := icu4c-77_1-src.tgz +ICU_DATA_SHA256SUM := 1e08bfafa442260ccabf9a872d4eab12de813d42b90769df056bab032b37e1d3 +ICU_DATA_TARBALL := icu4c-77_1-data.zip # three static lines # so that git cherry-pick # will not run into conflicts diff --git a/external/icu/icu4c-android.patch.1 b/external/icu/icu4c-android.patch.1 index 9ba252b402d1..192042d45750 100644 --- a/external/icu/icu4c-android.patch.1 +++ b/external/icu/icu4c-android.patch.1 @@ -1,10 +1,10 @@ diff -ur icu.org/source/common/unicode/platform.h icu/source/common/unicode/platform.h ---- icu.org/source/common/unicode/platform.h 2021-10-28 18:04:57.000000000 +0200 -+++ icu/source/common/unicode/platform.h 2021-11-15 21:03:11.474638494 +0100 -@@ -818,7 +818,7 @@ +--- icu.org/source/common/unicode/platform.h 2024-10-25 03:24:00.000000000 +0900 ++++ icu/source/common/unicode/platform.h 2024-11-04 20:40:39.757438800 +0900 +@@ -779,7 +779,7 @@ UPRV_HAS_DECLSPEC_ATTRIBUTE(__dllimport__)) # define U_EXPORT __declspec(dllexport) - #elif defined(__GNUC__) + #elif defined(__GNUC__) || defined(__open_xl__) -# define U_EXPORT __attribute__((visibility("default"))) +# define U_EXPORT #elif (defined(__SUNPRO_CC) && __SUNPRO_CC >= 0x550) \ diff --git a/external/icu/icu4c-build.patch.1 b/external/icu/icu4c-build.patch.1 index a878de732322..c126dec29c18 100644 --- a/external/icu/icu4c-build.patch.1 +++ b/external/icu/icu4c-build.patch.1 @@ -1,3 +1,15 @@ +diff -ur icu.org/source/configure.ac icu/source/configure.ac +--- icu.org/source/configure.ac 2024-10-25 03:24:00.000000000 +0900 ++++ icu/source/configure.ac 2024-11-11 07:54:15.090673278 +0900 +@@ -8,7 +8,7 @@ + + # Check for minimum autoconf version. Use exactly this version when rebuilding + # 'aclocal.m4' and 'configure' for merging upstream, to avoid spurious diffs. +-AC_PREREQ([2.72]) ++AC_PREREQ([2.69]) + + # Process this file with autoreconf to produce a configure script + AC_INIT([ICU], diff -ur icu.org/source/config/mh-darwin icu/source/config/mh-darwin --- icu.org/source/config/mh-darwin 2016-06-15 20:58:17.000000000 +0200 +++ icu/source/config/mh-darwin 2017-04-21 21:30:23.584568210 +0200 @@ -77,15 +89,3 @@ diff -ur icu.org/source/tools/toolutil/pkg_genc.cpp icu/source/tools/toolutil/pk /* 16 bytes alignment. */ /* http://docs.oracle.com/cd/E19641-01/802-1947/802-1947.pdf */ {"sun", -diff -ur icu.org/source/tools/toolutil/pkg_genc.h icu/source/tools/toolutil/pkg_genc.h ---- icu.org/source/tools/toolutil/pkg_genc.h 2017-01-20 01:20:31.000000000 +0100 -+++ icu/source/tools/toolutil/pkg_genc.h 2017-04-21 21:30:23.582568215 +0200 -@@ -60,7 +60,7 @@ - #endif - - #define LARGE_BUFFER_MAX_SIZE 2048 --#define SMALL_BUFFER_MAX_SIZE 512 -+#define SMALL_BUFFER_MAX_SIZE 2048 - #define SMALL_BUFFER_FLAG_NAMES 32 - #define BUFFER_PADDING_SIZE 20 - diff --git a/external/icu/icu4c-khmerbreakengine.patch.1 b/external/icu/icu4c-khmerbreakengine.patch.1 index db8ac50e6f75..6eb3f142b394 100644 --- a/external/icu/icu4c-khmerbreakengine.patch.1 +++ b/external/icu/icu4c-khmerbreakengine.patch.1 @@ -1,6 +1,6 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp ---- icu.org/source/common/dictbe.cpp 2023-06-14 06:23:55.000000000 +0900 -+++ icu/source/common/dictbe.cpp 2023-06-26 17:43:53.034173100 +0900 +--- icu.org/source/common/dictbe.cpp 2024-10-25 03:24:00.000000000 +0900 ++++ icu/source/common/dictbe.cpp 2024-11-05 20:38:59.457423900 +0900 @@ -35,7 +35,19 @@ ****************************************************************** */ @@ -208,7 +208,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp -int32_t PossibleWord::candidates( UText *text, DictionaryMatcher *dict, int32_t rangeEnd ) { +int32_t PossibleWord::candidates( UText *text, DictionaryMatcher *dict, int32_t rangeEnd, UnicodeSet const *ignoreSet, int32_t minLength) { // TODO: If getIndex is too slow, use offset < 0 and add discardAll() - int32_t start = (int32_t)utext_getNativeIndex(text); + int32_t start = static_cast<int32_t>(utext_getNativeIndex(text)); if (start != offset) { offset = start; - count = dict->matches(text, rangeEnd-start, UPRV_LENGTHOF(cuLengths), cuLengths, cpLengths, nullptr, &prefix); @@ -324,7 +324,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp + return foundBreaks.size() - wordsFound; + } -- while (U_SUCCESS(status) && (current = (int32_t)utext_getNativeIndex(text)) < rangeEnd) { +- while (U_SUCCESS(status) && (current = static_cast<int32_t>(utext_getNativeIndex(text))) < rangeEnd) { - cuWordLength = 0; - cpWordLength = 0; - @@ -351,7 +351,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - // If there was more than one, see which one can take us forward the most words - else if (candidates > 1) { - // If we're already at the end of the range, we're done -- if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) { +- if (static_cast<int32_t>(utext_getNativeIndex(text)) >= rangeEnd) { - goto foundBest; - } - do { @@ -369,7 +369,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp + } - // If we're already at the end of the range, we're done -- if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) { +- if (static_cast<int32_t>(utext_getNativeIndex(text)) >= rangeEnd) { - goto foundBest; - } + // prev[i] is the index of the last code point in the previous word in @@ -437,7 +437,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - // just found (if there is one), but only if the preceding word does not exceed - // the threshold. - // The text iterator should now be positioned at the end of the word we found. -- if ((int32_t)utext_getNativeIndex(text) < rangeEnd && cpWordLength < KHMER_ROOT_COMBINE_THRESHOLD) { +- if (static_cast<int32_t>(utext_getNativeIndex(text)) < rangeEnd && cpWordLength < KHMER_ROOT_COMBINE_THRESHOLD) { - // if it is a dictionary word, do nothing. If it isn't, then if there is - // no preceding word, or the non-word shares less than the minimum threshold - // of characters with a dictionary word, then scan to resynchronize @@ -450,9 +450,9 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - UChar32 uc; - int32_t chars = 0; - for (;;) { -- int32_t pcIndex = (int32_t)utext_getNativeIndex(text); +- int32_t pcIndex = static_cast<int32_t>(utext_getNativeIndex(text)); - pc = utext_next32(text); -- int32_t pcSize = (int32_t)utext_getNativeIndex(text) - pcIndex; +- int32_t pcSize = static_cast<int32_t>(utext_getNativeIndex(text)) - pcIndex; - chars += pcSize; - remaining -= pcSize; - if (remaining <= 0) { @@ -536,9 +536,9 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - - // Never stop before a combining mark. - int32_t currPos; -- while ((currPos = (int32_t)utext_getNativeIndex(text)) < rangeEnd && fMarkSet.contains(utext_current32(text))) { +- while ((currPos = static_cast<int32_t>(utext_getNativeIndex(text))) < rangeEnd && fMarkSet.contains(utext_current32(text))) { - utext_next32(text); -- cuWordLength += (int32_t)utext_getNativeIndex(text) - currPos; +- cuWordLength += static_cast<int32_t>(utext_getNativeIndex(text)) - currPos; + } + // Start pushing the optimal offset index into t_boundary (t for tentative). + // prev[numCodePts] is guaranteed to be meaningful. @@ -748,8 +748,8 @@ diff -ur icu.org/source/common/dictbe.h icu/source/common/dictbe.h public: diff -ur icu.org/source/common/dictionarydata.cpp icu/source/common/dictionarydata.cpp ---- icu.org/source/common/dictionarydata.cpp 2023-06-14 06:23:55.000000000 +0900 -+++ icu/source/common/dictionarydata.cpp 2023-06-26 02:18:05.709454400 +0900 +--- icu.org/source/common/dictionarydata.cpp 2024-10-25 03:24:00.000000000 +0900 ++++ icu/source/common/dictionarydata.cpp 2024-11-04 20:38:59.462426800 +0900 @@ -44,7 +44,7 @@ int32_t UCharsDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t limit, @@ -758,10 +758,10 @@ diff -ur icu.org/source/common/dictionarydata.cpp icu/source/common/dictionaryda + int32_t *prefix, UnicodeSet const* ignoreSet, int32_t minLength) const { UCharsTrie uct(characters); - int32_t startingTextIndex = (int32_t)utext_getNativeIndex(text); + int32_t startingTextIndex = static_cast<int32_t>(utext_getNativeIndex(text)); @@ -55,7 +55,13 @@ UStringTrieResult result = (codePointsMatched == 0) ? uct.first(c) : uct.next(c); - int32_t lengthMatched = (int32_t)utext_getNativeIndex(text) - startingTextIndex; + int32_t lengthMatched = static_cast<int32_t>(utext_getNativeIndex(text)) - startingTextIndex; codePointsMatched += 1; + if (ignoreSet != NULL && ignoreSet->contains(c)) { + continue; @@ -780,11 +780,11 @@ diff -ur icu.org/source/common/dictionarydata.cpp icu/source/common/dictionaryda - int32_t *prefix) const { + int32_t *prefix, UnicodeSet const* ignoreSet, int32_t minLength) const { BytesTrie bt(characters); - int32_t startingTextIndex = (int32_t)utext_getNativeIndex(text); + int32_t startingTextIndex = static_cast<int32_t>(utext_getNativeIndex(text)); int32_t wordCount = 0; @@ -122,7 +128,13 @@ UStringTrieResult result = (codePointsMatched == 0) ? bt.first(transform(c)) : bt.next(transform(c)); - int32_t lengthMatched = (int32_t)utext_getNativeIndex(text) - startingTextIndex; + int32_t lengthMatched = static_cast<int32_t>(utext_getNativeIndex(text)) - startingTextIndex; codePointsMatched += 1; + if (ignoreSet != NULL && ignoreSet->contains(c)) { + continue; diff --git a/external/icu/no-python.patch b/external/icu/no-python.patch index 2d07215a17da..b550576ed970 100644 --- a/external/icu/no-python.patch +++ b/external/icu/no-python.patch @@ -1,7 +1,7 @@ --- source/configure.ac +++ source/configure.ac -@@ -213,7 +213,7 @@ - #AC_CHECK_PROG(STRIP, strip, strip, true) +@@ -195,7 +195,7 @@ + fi # TODO(ICU-20301): Remove fallback to Python 2. -AC_CHECK_PROGS(PYTHON, python3 "py -3" python "py") diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx index c9bfbeeb0a80..e8476dd8bbe6 100644 --- a/i18nutil/source/utility/unicode.cxx +++ b/i18nutil/source/utility/unicode.cxx @@ -1005,6 +1005,29 @@ OString unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript) case USCRIPT_ARABIC_NASTALIQ: sRet = "fa-Aran"_ostr; break; +#endif +#if (U_ICU_VERSION_MAJOR_NUM >= 76) + case USCRIPT_GARAY: + sRet = "wo-Gara"_ostr; + break; + case USCRIPT_GURUNG_KHEMA: + sRet = "gvr-Gukh"_ostr; + break; + case USCRIPT_KIRAT_RAI: + sRet = "bap-Krai"_ostr; + break; + case USCRIPT_OL_ONAL: + sRet = "unr-Onao"_ostr; + break; + case USCRIPT_SUNUWAR: + sRet = "suz-Sunu"_ostr; + break; + case USCRIPT_TODHRI: + sRet = "sq-Todr"_ostr; + break; + case USCRIPT_TULU_TIGALARI: + sRet = "sa-Tutg"_ostr; + break; #endif } return sRet; diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 04ce906e7222..90d5f3ebab79 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1801,6 +1801,16 @@ #define RID_SUBSETSTR_KAWI NC_("RID_SUBSETMAP", "Kawi") #define RID_SUBSETSTR_NAG_MUNDARI NC_("RID_SUBSETMAP", "Nag Mundari") #define RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I NC_("RID_SUBSETMAP", "CJK Unified Ideographs Extension I") +#define RID_SUBSETSTR_EGYPTIAN_HIEROGLYPHS_EXTENDED_A NC_("RID_SUBSETMAP", "Egyptian Hieroglyphs Extended-A") +#define RID_SUBSETSTR_GARAY NC_("RID_SUBSETMAP", "Garay") +#define RID_SUBSETSTR_GURUNG_KHEMA NC_("RID_SUBSETMAP", "Gurung Khema") +#define RID_SUBSETSTR_KIRAT_RAI NC_("RID_SUBSETMAP", "Kirat Rai") +#define RID_SUBSETSTR_MYANMAR_EXTENDED_C NC_("RID_SUBSETMAP", "Myanmar Extended-C") +#define RID_SUBSETSTR_OL_ONAL NC_("RID_SUBSETMAP", "Ol Onal") +#define RID_SUBSETSTR_SUNUWAR NC_("RID_SUBSETMAP", "Sunuwar") +#define RID_SUBSETSTR_SYMBOLS_FOR_LEGACY_COMPUTING_SUPPLEMENT NC_("RID_SUBSETMAP", "Symbols for Legacy Computing Supplement") +#define RID_SUBSETSTR_TODHRI NC_("RID_SUBSETMAP", "Todhri") +#define RID_SUBSETSTR_TULU_TIGALARI NC_("RID_SUBSETMAP", "Tulu-Tigalari") #define RID_SVXSTR_FRAMEDIR_LTR NC_("RID_SVXSTR_FRAMEDIR_LTR", "Left-to-right (LTR)") #define RID_SVXSTR_FRAMEDIR_RTL NC_("RID_SVXSTR_FRAMEDIR_RTL", "Right-to-left (RTL)") diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index adb2749b11f8..acdfbf9f490f 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -1928,6 +1928,38 @@ void SubsetMap::InitList() case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I: aAllSubsets.emplace_back( 0x2EBF0, 0x2EE5F, SvxResId(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_I) ); break; +#endif +#if (U_ICU_VERSION_MAJOR_NUM >= 76) + case UBLOCK_EGYPTIAN_HIEROGLYPHS_EXTENDED_A: + aAllSubsets.emplace_back( 0x13460, 0x1355F, SvxResId(RID_SUBSETSTR_EGYPTIAN_HIEROGLYPHS_EXTENDED_A) ); + break; + case UBLOCK_GARAY: + aAllSubsets.emplace_back( 0x10D40, 0x10D8F, SvxResId(RID_SUBSETSTR_GARAY) ); + break; + case UBLOCK_GURUNG_KHEMA: + aAllSubsets.emplace_back( 0x16100, 0x1613F, SvxResId(RID_SUBSETSTR_GURUNG_KHEMA) ); + break; + case UBLOCK_KIRAT_RAI: + aAllSubsets.emplace_back( 0x16D40, 0x16D7F, SvxResId(RID_SUBSETSTR_KIRAT_RAI) ); + break; + case UBLOCK_MYANMAR_EXTENDED_C: + aAllSubsets.emplace_back( 0x116D0, 0x116FF, SvxResId(RID_SUBSETSTR_MYANMAR_EXTENDED_C) ); + break; + case UBLOCK_OL_ONAL: + aAllSubsets.emplace_back( 0x1E5D0, 0x1E5FF, SvxResId(RID_SUBSETSTR_OL_ONAL) ); + break; + case UBLOCK_SUNUWAR: + aAllSubsets.emplace_back( 0x11BC0, 0x11BFF, SvxResId(RID_SUBSETSTR_SUNUWAR) ); + break; + case UBLOCK_SYMBOLS_FOR_LEGACY_COMPUTING_SUPPLEMENT: + aAllSubsets.emplace_back( 0x1CC00, 0x1CEBF, SvxResId(RID_SUBSETSTR_SYMBOLS_FOR_LEGACY_COMPUTING_SUPPLEMENT) ); + break; + case UBLOCK_TODHRI: + aAllSubsets.emplace_back( 0x105C0, 0x105FF, SvxResId(RID_SUBSETSTR_TODHRI) ); + break; + case UBLOCK_TULU_TIGALARI: + aAllSubsets.emplace_back( 0x11380, 0x113FF, SvxResId(RID_SUBSETSTR_TULU_TIGALARI) ); + break; #endif }
