summaryrefslogtreecommitdiff
blob: 57fe6dcbd00d543c577c307724727e7436c382f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
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