From: David Tardon Date: Sun, 12 Nov 2017 17:46:48 +0000 (+0100) Subject: Upgrade to ICU 60.1 X-Git-Tag: archive/raspbian/1%5.4.3-4+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=f102f71c13e8935b687384a786cec54da76ebae3;p=libreoffice.git Upgrade to ICU 60.1 Change-Id: I07837be7faac0b2238b0cba8fb981e4c4d24c498 Gbp-Pq: Name icu-60.diff --- diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index 1a2606551ce..6c660ab5d19 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -543,6 +543,27 @@ LineBreakResults SAL_CALL BreakIterator_Unicode::getLineBreak( } else { //word boundary break lbr.breakIndex = pLineBI->preceding(nStartPos); lbr.breakType = BreakType::WORDBOUNDARY; + + // Special case for Slash U+002F SOLIDUS in URI and path names. + // TR14 defines that as SY: Symbols Allowing Break After (A). + // This is unwanted in paths, see also i#17155 + if (lbr.breakIndex > 0 && Text[lbr.breakIndex-1] == '/') + { + // Look backward and take any whitespace before as a break + // opportunity. This also glues something like "w/o". + // Avoid an overly long path and break it as was indicated. + // Overly long here is arbitrarily defined. + const sal_Int32 nOverlyLong = 66; + sal_Int32 nPos = lbr.breakIndex - 1; + while (nPos > 0 && lbr.breakIndex - nPos < nOverlyLong) + { + if (u_isWhitespace(Text.iterateCodePoints( &nPos, -1))) + { + lbr.breakIndex = nPos + 1; + break; + } + } + } } #define WJ 0x2060 // Word Joiner diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx index 94abe5220f8..0173a4ad5fb 100644 --- a/i18nutil/source/utility/unicode.cxx +++ b/i18nutil/source/utility/unicode.cxx @@ -715,6 +715,17 @@ OString SAL_CALL unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript) case USCRIPT_SYMBOLS_EMOJI: sRet = "mis"; // Zsye - Emoji variant break; +#endif +#if (U_ICU_VERSION_MAJOR_NUM >= 60) + case USCRIPT_MASARAM_GONDI: + sRet = "gon-Gonm"; // macro language code, could be wsg,esg,gno + break; + case USCRIPT_SOYOMBO: + sRet = "mn-Soyo"; // abugida to write Mongolian, also Tibetan and Sanskrit + break; + case USCRIPT_ZANABAZAR_SQUARE: + sRet = "mn-Zanb"; // abugida to write Mongolian + break; #endif } return sRet; diff --git a/include/svx/ucsubset.hrc b/include/svx/ucsubset.hrc index 1157a7e8d70..92443a93194 100644 --- a/include/svx/ucsubset.hrc +++ b/include/svx/ucsubset.hrc @@ -302,6 +302,13 @@ #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) +#define RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F (RID_SUBSET_START + 277) +#define RID_SUBSETSTR_KANA_EXTENDED_A (RID_SUBSET_START + 278) +#define RID_SUBSETSTR_MASARAM_GONDI (RID_SUBSET_START + 279) +#define RID_SUBSETSTR_NUSHU (RID_SUBSET_START + 280) +#define RID_SUBSETSTR_SOYOMBO (RID_SUBSET_START + 281) +#define RID_SUBSETSTR_SYRIAC_SUPPLEMENT (RID_SUBSET_START + 282) +#define RID_SUBSETSTR_ZANABAZAR_SQUARE (RID_SUBSET_START + 283) // RID_SUBSET_END (RID_SUBSET_START + 299) diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index e1b298df858..7a7aeed7ad7 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -1631,6 +1631,29 @@ void SubsetMap::InitList() aAllSubsets.push_back( Subset( 0x18800, 0x18AFF, aStringList.GetString(aStringList.FindIndex(RID_SUBSETSTR_TANGUT_COMPONENTS)) ) ); break; #endif +#if (U_ICU_VERSION_MAJOR_NUM >= 60) + case UBLOCK_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F: + aAllSubsets.push_back( Subset( 0x2CEB0, 0x2EBE0, aStringList.GetString(aStringList.FindIndex(RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F)) ) ); + break; + case UBLOCK_KANA_EXTENDED_A: + aAllSubsets.push_back( Subset( 0x1B100, 0x1B12F, aStringList.GetString(aStringList.FindIndex(RID_SUBSETSTR_KANA_EXTENDED_A)) ) ); + break; + case UBLOCK_MASARAM_GONDI: + aAllSubsets.push_back( Subset( 0x11D00, 0x11D5F, aStringList.GetString(aStringList.FindIndex(RID_SUBSETSTR_MASARAM_GONDI)) ) ); + break; + case UBLOCK_NUSHU: + aAllSubsets.push_back( Subset( 0x1B170, 0x1B2FF, aStringList.GetString(aStringList.FindIndex(RID_SUBSETSTR_NUSHU)) ) ); + break; + case UBLOCK_SOYOMBO: + aAllSubsets.push_back( Subset( 0x11A50, 0x11AAF, aStringList.GetString(aStringList.FindIndex(RID_SUBSETSTR_SOYOMBO)) ) ); + break; + case UBLOCK_SYRIAC_SUPPLEMENT: + aAllSubsets.push_back( Subset( 0x0860, 0x086f, aStringList.GetString(aStringList.FindIndex(RID_SUBSETSTR_SYRIAC_SUPPLEMENT)) ) ); + break; + case UBLOCK_ZANABAZAR_SQUARE: + aAllSubsets.push_back( Subset( 0x11A00, 0x11A4F, aStringList.GetString(aStringList.FindIndex(RID_SUBSETSTR_ZANABAZAR_SQUARE)) ) ); + break; +#endif } diff --git a/svx/source/dialog/ucsubset.src b/svx/source/dialog/ucsubset.src index 9234b6a2646..49e900faa68 100644 --- a/svx/source/dialog/ucsubset.src +++ b/svx/source/dialog/ucsubset.src @@ -302,6 +302,13 @@ StringArray RID_SUBSETMAP < "Osage"; RID_SUBSETSTR_OSAGE ; > ; < "Tangut"; RID_SUBSETSTR_TANGUT ; > ; < "Tangut Components"; RID_SUBSETSTR_TANGUT_COMPONENTS ; > ; + < "CJK Unified Ideographs Extension F"; RID_SUBSETSTR_CJK_UNIFIED_IDEOGRAPHS_EXTENSION_F ; > ; + < "Kana Extended-A"; RID_SUBSETSTR_KANA_EXTENDED_A ; > ; + < "Masaram Gondi"; RID_SUBSETSTR_MASARAM_GONDI ; > ; + < "Nushu"; RID_SUBSETSTR_NUSHU ; > ; + < "Soyombo"; RID_SUBSETSTR_SOYOMBO ; > ; + < "Syriac Supplement"; RID_SUBSETSTR_SYRIAC_SUPPLEMENT ; > ; + < "Zanabazar Square"; RID_SUBSETSTR_ZANABAZAR_SQUARE ; > ; }; };