You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
290 lines
12 KiB
290 lines
12 KiB
From 3e42714c76b1347babfdea0564009d8d82a83af4 Mon Sep 17 00:00:00 2001
|
|
From: Eike Rathke <erack@redhat.com>
|
|
Date: Wed, 2 Nov 2016 13:07:48 +0100
|
|
Subject: [PATCH] upgrade to ICU 58
|
|
|
|
Change-Id: I4a992447df65b337721a2a2627d974172a14cba5
|
|
Reviewed-on: https://gerrit.libreoffice.org/30487
|
|
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Tested-by: Eike Rathke <erack@redhat.com>
|
|
---
|
|
configure.ac | 2 +-
|
|
download.lst | 2 +-
|
|
external/icu/icu-ubsan.patch.0 | 11 ------
|
|
external/icu/icu4c-warnings.patch | 12 ------
|
|
.../source/breakiterator/breakiterator_unicode.cxx | 12 ++++++
|
|
i18nutil/source/utility/unicode.cxx | 26 +++++++++++++
|
|
include/svx/ucsubset.hrc | 11 ++++++
|
|
svx/source/dialog/charmap.cxx | 35 +++++++++++++++++
|
|
svx/source/dialog/ucsubset.src | 44 ++++++++++++++++++++++
|
|
9 files changed, 130 insertions(+), 25 deletions(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index f06ef8e..66a11a9 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -9136,7 +9136,7 @@ SYSTEM_GENBRK=
|
|
SYSTEM_GENCCODE=
|
|
SYSTEM_GENCMN=
|
|
|
|
-ICU_MAJOR=57
|
|
+ICU_MAJOR=58
|
|
ICU_MINOR=1
|
|
ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
|
|
ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
|
|
diff --git a/download.lst b/download.lst
|
|
index 4571338..0770a4d 100644
|
|
--- a/download.lst
|
|
+++ b/download.lst
|
|
@@ -62,7 +62,7 @@ export HARFBUZZ_TARBALL := harfbuzz-1.3.2.tar.bz2
|
|
export HSQLDB_TARBALL := 17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
|
|
export HUNSPELL_TARBALL := 33d370f7fe5a030985e445a5672b2067-hunspell-1.4.1.tar.gz
|
|
export HYPHEN_TARBALL := 5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz
|
|
-export ICU_TARBALL := 976734806026a4ef8bdd17937c8898b9-icu4c-57_1-src.tgz
|
|
+export ICU_TARBALL := 1901302aaff1c1633ef81862663d2917-icu4c-58_1-src.tgz
|
|
export JFREEREPORT_FLOW_ENGINE_TARBALL := ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
|
|
export JFREEREPORT_FLUTE_TARBALL := d8bd5eed178db6e2b18eeed243f85aa8-flute-1.1.6.zip
|
|
export JFREEREPORT_LIBBASE_TARBALL := eeb2c7ddf0d302fba4bfc6e97eac9624-libbase-1.1.6.zip
|
|
diff --git a/external/icu/icu-ubsan.patch.0 b/external/icu/icu-ubsan.patch.0
|
|
index 6d1d3bc..8a47242 100644
|
|
--- a/external/icu/icu-ubsan.patch.0
|
|
+++ b/external/icu/icu-ubsan.patch.0
|
|
@@ -151,14 +151,3 @@
|
|
length(len), next(subNode) {}
|
|
virtual UBool operator==(const Node &other) const;
|
|
virtual int32_t markRightEdgesFirst(int32_t edgeNumber);
|
|
---- source/common/unifiedcache.h
|
|
-+++ source/common/unifiedcache.h
|
|
-@@ -139,7 +139,7 @@
|
|
- : CacheKey<T>(other), fLoc(other.fLoc) { }
|
|
- virtual ~LocaleCacheKey() { }
|
|
- virtual int32_t hashCode() const {
|
|
-- return 37 *CacheKey<T>::hashCode() + fLoc.hashCode();
|
|
-+ return 37U *CacheKey<T>::hashCode() + fLoc.hashCode();
|
|
- }
|
|
- virtual UBool operator == (const CacheKeyBase &other) const {
|
|
- // reflexive
|
|
diff --git a/external/icu/icu4c-warnings.patch b/external/icu/icu4c-warnings.patch
|
|
index d146093..96608d7 100644
|
|
--- a/external/icu/icu4c-warnings.patch
|
|
+++ b/external/icu/icu4c-warnings.patch
|
|
@@ -8,15 +8,3 @@
|
|
} \
|
|
}
|
|
|
|
---- misc/icu/source/common/unicode/utypes.h
|
|
-+++ misc/build/icu/source/common/unicode/utypes.h
|
|
-@@ -399,7 +399,7 @@
|
|
- * some Linux/Unix compilers have problems with defining global new/delete.
|
|
- * On Windows, it is _MSC_VER>=1200 for MSVC 6.0 and higher.
|
|
- */
|
|
--#if defined(__cplusplus) && U_DEBUG && U_OVERRIDE_CXX_ALLOCATION && (_MSC_VER>=1200) && !defined(U_STATIC_IMPLEMENTATION) && (defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION))
|
|
-+#if defined(__cplusplus) && U_DEBUG && U_OVERRIDE_CXX_ALLOCATION && defined (_MSC_VER) && (_MSC_VER>=1200) && !defined(U_STATIC_IMPLEMENTATION) && (defined(U_COMMON_IMPLEMENTATION) || defined(U_I18N_IMPLEMENTATION) || defined(U_IO_IMPLEMENTATION) || defined(U_LAYOUT_IMPLEMENTATION) || defined(U_LAYOUTEX_IMPLEMENTATION))
|
|
-
|
|
- #ifndef U_HIDE_INTERNAL_API
|
|
- /**
|
|
-
|
|
diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx
|
|
index 3b0b227..76ae209 100644
|
|
--- a/i18npool/source/breakiterator/breakiterator_unicode.cxx
|
|
+++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx
|
|
@@ -63,10 +63,13 @@ BreakIterator_Unicode::~BreakIterator_Unicode()
|
|
class OOoRuleBasedBreakIterator : public RuleBasedBreakIterator
|
|
{
|
|
public:
|
|
+#if (U_ICU_VERSION_MAJOR_NUM < 58)
|
|
+ // RuleBasedBreakIterator::setBreakType() is private as of ICU 58.
|
|
inline void publicSetBreakType(int32_t type)
|
|
{
|
|
setBreakType(type);
|
|
};
|
|
+#endif
|
|
OOoRuleBasedBreakIterator(UDataMemory* image,
|
|
UErrorCode &status)
|
|
: RuleBasedBreakIterator(image, status)
|
|
@@ -142,12 +145,21 @@ void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const css::lang::Local
|
|
}
|
|
}
|
|
if (rbi) {
|
|
+#if (U_ICU_VERSION_MAJOR_NUM < 58)
|
|
+ // ICU 58 made RuleBasedBreakIterator::setBreakType() private
|
|
+ // instead of protected, so the old workaround of
|
|
+ // https://ssl.icu-project.org/trac/ticket/5498
|
|
+ // doesn't work anymore. However, they also claim to have fixed
|
|
+ // the cause that an initial fBreakType==-1 would lead to an
|
|
+ // endless loop under some circumstances.
|
|
+ // Let's see ...
|
|
switch (rBreakType) {
|
|
case LOAD_CHARACTER_BREAKITERATOR: rbi->publicSetBreakType(UBRK_CHARACTER); break;
|
|
case LOAD_WORD_BREAKITERATOR: rbi->publicSetBreakType(UBRK_WORD); break;
|
|
case LOAD_SENTENCE_BREAKITERATOR: rbi->publicSetBreakType(UBRK_SENTENCE); break;
|
|
case LOAD_LINE_BREAKITERATOR: rbi->publicSetBreakType(UBRK_LINE); break;
|
|
}
|
|
+#endif
|
|
icuBI->aBreakIterator = rbi;
|
|
}
|
|
}
|
|
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
|
|
index bb82bbf..984c5f7 100644
|
|
--- a/i18nutil/source/utility/unicode.cxx
|
|
+++ b/i18nutil/source/utility/unicode.cxx
|
|
@@ -957,6 +957,32 @@ OString SAL_CALL unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript)
|
|
sRet = "sa-Sidd";
|
|
break;
|
|
#endif
|
|
+#if (U_ICU_VERSION_MAJOR_NUM >= 58)
|
|
+ case USCRIPT_ADLAM:
|
|
+ sRet = "mis"; // Adlm - Adlam for Fulani, no language code
|
|
+ break;
|
|
+ case USCRIPT_BHAIKSUKI:
|
|
+ sRet = "mis"; // Bhks - Bhaiksuki for some Buddhist texts, no language code
|
|
+ break;
|
|
+ case USCRIPT_MARCHEN:
|
|
+ sRet = "bo-Marc";
|
|
+ break;
|
|
+ case USCRIPT_NEWA:
|
|
+ sRet = "new-Newa";
|
|
+ break;
|
|
+ case USCRIPT_OSAGE:
|
|
+ sRet = "osa-Osge";
|
|
+ break;
|
|
+ case USCRIPT_HAN_WITH_BOPOMOFO:
|
|
+ sRet = "mis"; // Hanb - Han with Bopomofo, zh-Hanb ?
|
|
+ break;
|
|
+ case USCRIPT_JAMO:
|
|
+ sRet = "mis"; // Jamo - Jamo subset of Hangul, ko-Jamo ?
|
|
+ break;
|
|
+ case USCRIPT_SYMBOLS_EMOJI:
|
|
+ sRet = "mis"; // Zsye - Emoji variant
|
|
+ break;
|
|
+#endif
|
|
}
|
|
return sRet;
|
|
}
|
|
diff --git a/include/svx/ucsubset.hrc b/include/svx/ucsubset.hrc
|
|
index adf1cf6..1157a7e 100644
|
|
--- a/include/svx/ucsubset.hrc
|
|
+++ b/include/svx/ucsubset.hrc
|
|
@@ -291,6 +291,17 @@
|
|
#define RID_SUBSETSTR_OLD_HUNGARIAN (RID_SUBSET_START + 263)
|
|
#define RID_SUBSETSTR_SUPPLEMENTAL_SYMBOLS_AND_PICTOGRAPHS (RID_SUBSET_START + 264)
|
|
#define RID_SUBSETSTR_SUTTON_SIGNWRITING (RID_SUBSET_START + 265)
|
|
+#define RID_SUBSETSTR_ADLAM (RID_SUBSET_START + 266)
|
|
+#define RID_SUBSETSTR_BHAIKSUKI (RID_SUBSET_START + 267)
|
|
+#define RID_SUBSETSTR_CYRILLIC_EXTENDED_C (RID_SUBSET_START + 268)
|
|
+#define RID_SUBSETSTR_GLAGOLITIC_SUPPLEMENT (RID_SUBSET_START + 269)
|
|
+#define RID_SUBSETSTR_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION (RID_SUBSET_START + 270)
|
|
+#define RID_SUBSETSTR_MARCHEN (RID_SUBSET_START + 271)
|
|
+#define RID_SUBSETSTR_MONGOLIAN_SUPPLEMENT (RID_SUBSET_START + 272)
|
|
+#define RID_SUBSETSTR_NEWA (RID_SUBSET_START + 273)
|
|
+#define RID_SUBSETSTR_OSAGE (RID_SUBSET_START + 274)
|
|
+#define RID_SUBSETSTR_TANGUT (RID_SUBSET_START + 275)
|
|
+#define RID_SUBSETSTR_TANGUT_COMPONENTS (RID_SUBSET_START + 276)
|
|
|
|
// RID_SUBSET_END (RID_SUBSET_START + 299)
|
|
|
|
diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx
|
|
index bcc7cef..ff201a6 100644
|
|
--- a/svx/source/dialog/charmap.cxx
|
|
+++ b/svx/source/dialog/charmap.cxx
|
|
@@ -1594,6 +1594,41 @@ void SubsetMap::InitList()
|
|
aAllSubsets.push_back( Subset( 0x1D800, 0x1DAAF, RID_SUBSETSTR_SUTTON_SIGNWRITING ) );
|
|
break;
|
|
#endif
|
|
+#if (U_ICU_VERSION_MAJOR_NUM >= 58)
|
|
+ case UBLOCK_ADLAM:
|
|
+ aAllSubsets.push_back( Subset( 0x1E900, 0x1E95F, RID_SUBSETSTR_ADLAM ) );
|
|
+ break;
|
|
+ case UBLOCK_BHAIKSUKI:
|
|
+ aAllSubsets.push_back( Subset( 0x11C00, 0x11C6F, RID_SUBSETSTR_BHAIKSUKI ) );
|
|
+ break;
|
|
+ case UBLOCK_CYRILLIC_EXTENDED_C:
|
|
+ aAllSubsets.push_back( Subset( 0x1C80, 0x1C8F, RID_SUBSETSTR_CYRILLIC_EXTENDED_C ) );
|
|
+ break;
|
|
+ case UBLOCK_GLAGOLITIC_SUPPLEMENT:
|
|
+ aAllSubsets.push_back( Subset( 0x1E000, 0x1E02F, RID_SUBSETSTR_GLAGOLITIC_SUPPLEMENT ) );
|
|
+ break;
|
|
+ case UBLOCK_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION:
|
|
+ aAllSubsets.push_back( Subset( 0x16FE0, 0x16FFF, RID_SUBSETSTR_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION ) );
|
|
+ break;
|
|
+ case UBLOCK_MARCHEN:
|
|
+ aAllSubsets.push_back( Subset( 0x11C70, 0x11CBF, RID_SUBSETSTR_MARCHEN ) );
|
|
+ break;
|
|
+ case UBLOCK_MONGOLIAN_SUPPLEMENT:
|
|
+ aAllSubsets.push_back( Subset( 0x11660, 0x1167F, RID_SUBSETSTR_MONGOLIAN_SUPPLEMENT ) );
|
|
+ break;
|
|
+ case UBLOCK_NEWA:
|
|
+ aAllSubsets.push_back( Subset( 0x11400, 0x1147F, RID_SUBSETSTR_NEWA ) );
|
|
+ break;
|
|
+ case UBLOCK_OSAGE:
|
|
+ aAllSubsets.push_back( Subset( 0x104B0, 0x104FF, RID_SUBSETSTR_OSAGE ) );
|
|
+ break;
|
|
+ case UBLOCK_TANGUT:
|
|
+ aAllSubsets.push_back( Subset( 0x17000, 0x187FF, RID_SUBSETSTR_TANGUT ) );
|
|
+ break;
|
|
+ case UBLOCK_TANGUT_COMPONENTS:
|
|
+ aAllSubsets.push_back( Subset( 0x18800, 0x18AFF, RID_SUBSETSTR_TANGUT_COMPONENTS ) );
|
|
+ break;
|
|
+#endif
|
|
|
|
}
|
|
|
|
diff --git a/svx/source/dialog/ucsubset.src b/svx/source/dialog/ucsubset.src
|
|
index 06630cc..a7765c3 100644
|
|
--- a/svx/source/dialog/ucsubset.src
|
|
+++ b/svx/source/dialog/ucsubset.src
|
|
@@ -1079,6 +1079,50 @@ Resource RID_SUBSETMAP
|
|
{
|
|
Text [ en-US ] = "Sutton Signwriting";
|
|
};
|
|
+ String RID_SUBSETSTR_ADLAM
|
|
+ {
|
|
+ Text [ en-US ] = "Adlam";
|
|
+ };
|
|
+ String RID_SUBSETSTR_BHAIKSUKI
|
|
+ {
|
|
+ Text [ en-US ] = "Bhaiksuki";
|
|
+ };
|
|
+ String RID_SUBSETSTR_CYRILLIC_EXTENDED_C
|
|
+ {
|
|
+ Text [ en-US ] = "Cyrillic Extended-C";
|
|
+ };
|
|
+ String RID_SUBSETSTR_GLAGOLITIC_SUPPLEMENT
|
|
+ {
|
|
+ Text [ en-US ] = "Glagolitic Supplement";
|
|
+ };
|
|
+ String RID_SUBSETSTR_IDEOGRAPHIC_SYMBOLS_AND_PUNCTUATION
|
|
+ {
|
|
+ Text [ en-US ] = "Ideographic Symbols and Punctuation";
|
|
+ };
|
|
+ String RID_SUBSETSTR_MARCHEN
|
|
+ {
|
|
+ Text [ en-US ] = "Marchen";
|
|
+ };
|
|
+ String RID_SUBSETSTR_MONGOLIAN_SUPPLEMENT
|
|
+ {
|
|
+ Text [ en-US ] = "Mongolian Supplement";
|
|
+ };
|
|
+ String RID_SUBSETSTR_NEWA
|
|
+ {
|
|
+ Text [ en-US ] = "Newa";
|
|
+ };
|
|
+ String RID_SUBSETSTR_OSAGE
|
|
+ {
|
|
+ Text [ en-US ] = "Osage";
|
|
+ };
|
|
+ String RID_SUBSETSTR_TANGUT
|
|
+ {
|
|
+ Text [ en-US ] = "Tangut";
|
|
+ };
|
|
+ String RID_SUBSETSTR_TANGUT_COMPONENTS
|
|
+ {
|
|
+ Text [ en-US ] = "Tangut Components";
|
|
+ };
|
|
};
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
|
--
|
|
2.10.2
|
|
|