From: Eike Rathke Date: Tue, 29 Oct 2019 19:31:41 +0000 (+0100) Subject: Prepare for builds against ICU 64 X-Git-Tag: archive/raspbian/1%6.3.3-3+rpi1^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7a63939f3f9545abb8c8b31828ba3e24b4c31cfb;p=libreoffice.git Prepare for builds against ICU 64 ICU 64 adds new scripts and Unicode blocks from Unicode 12 that need to be handled. This adds 9 new resource strings that will show up for translators, but are not really necessary to be translated; unless a distribution actually builds against ICU 64 they won't be displayed and even then only in very rare circumstances (in Special Characters for fonts containing the glyphs of these new Unicode blocks, unlikely). TDF builds will not be affected as they are built against internal ICU 63. Change-Id: I3cfdf6d2a4c6a56deb72ef837175ad48b1f521b5 Reviewed-on: https://gerrit.libreoffice.org/81714 Tested-by: Jenkins Reviewed-by: Sophie Gautier Reviewed-by: Michael Stahl Gbp-Pq: Name Prepare-for-builds-against-ICU-64.diff --- diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx index 7e0c425368b..ad3305aa0fc 100644 --- a/i18nutil/source/utility/unicode.cxx +++ b/i18nutil/source/utility/unicode.cxx @@ -748,6 +748,20 @@ OString unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript) case USCRIPT_OLD_SOGDIAN: sRet = "sog"; break; +#endif +#if (U_ICU_VERSION_MAJOR_NUM >= 64) + case USCRIPT_ELYMAIC: + sRet = "arc-Elym"; + break; + case USCRIPT_NYIAKENG_PUACHUE_HMONG: + sRet = "hmn-Hmnp"; // macrolanguage code + break; + case USCRIPT_NANDINAGARI: + sRet = "sa-Nand"; + break; + case USCRIPT_WANCHO: + sRet = "nnp-Wcho"; + break; #endif } return sRet; diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc index 7434d1e3f89..eaaf61abfc0 100644 --- a/include/svx/strings.hrc +++ b/include/svx/strings.hrc @@ -1657,6 +1657,15 @@ #define RID_SUBSETSTR_MEDEFAIDRIN NC_("RID_SUBSETMAP", "Medefaidrin") #define RID_SUBSETSTR_OLD_SOGDIAN NC_("RID_SUBSETMAP", "Old Sogdian") #define RID_SUBSETSTR_SOGDIAN NC_("RID_SUBSETMAP", "Sogdian") +#define RID_SUBSETSTR_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS NC_("RID_SUBSETMAP", "Egyptian Hieroglyph Format Controls") +#define RID_SUBSETSTR_ELYMAIC NC_("RID_SUBSETMAP", "Elymaic") +#define RID_SUBSETSTR_NANDINAGARI NC_("RID_SUBSETMAP", "Nandinagari") +#define RID_SUBSETSTR_NYIAKENG_PUACHUE_HMONG NC_("RID_SUBSETMAP", "Nyiakeng Puachue Hmong") +#define RID_SUBSETSTR_OTTOMAN_SIYAQ_NUMBERS NC_("RID_SUBSETMAP", "Ottoman Siyaq Numbers") +#define RID_SUBSETSTR_SMALL_KANA_EXTENSION NC_("RID_SUBSETMAP", "Small Kana Extension") +#define RID_SUBSETSTR_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A NC_("RID_SUBSETMAP", "Symbols and Pictographs Extended-A") +#define RID_SUBSETSTR_TAMIL_SUPPLEMENT NC_("RID_SUBSETMAP", "Tamil Supplement") +#define RID_SUBSETSTR_WANCHO NC_("RID_SUBSETMAP", "Wancho") #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 52401b486bc..bf91c73dd6a 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -1783,6 +1783,35 @@ void SubsetMap::InitList() aAllSubsets.emplace_back( 0x10F30, 0x10F6F, SvxResId(RID_SUBSETSTR_SOGDIAN) ); break; #endif +#if (U_ICU_VERSION_MAJOR_NUM >= 64) + case UBLOCK_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS: + aAllSubsets.emplace_back( 0x13430, 0x1343F, SvxResId(RID_SUBSETSTR_EGYPTIAN_HIEROGLYPH_FORMAT_CONTROLS) ); + break; + case UBLOCK_ELYMAIC: + aAllSubsets.emplace_back( 0x10FE0, 0x10FFF, SvxResId(RID_SUBSETSTR_ELYMAIC) ); + break; + case UBLOCK_NANDINAGARI: + aAllSubsets.emplace_back( 0x119A0, 0x119FF, SvxResId(RID_SUBSETSTR_NANDINAGARI) ); + break; + case UBLOCK_NYIAKENG_PUACHUE_HMONG: + aAllSubsets.emplace_back( 0x1E100, 0x1E14F, SvxResId(RID_SUBSETSTR_NYIAKENG_PUACHUE_HMONG) ); + break; + case UBLOCK_OTTOMAN_SIYAQ_NUMBERS: + aAllSubsets.emplace_back( 0x1ED00, 0x1ED4F, SvxResId(RID_SUBSETSTR_OTTOMAN_SIYAQ_NUMBERS) ); + break; + case UBLOCK_SMALL_KANA_EXTENSION: + aAllSubsets.emplace_back( 0x1B130, 0x1B16F, SvxResId(RID_SUBSETSTR_SMALL_KANA_EXTENSION) ); + break; + case UBLOCK_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A: + aAllSubsets.emplace_back( 0x1FA70, 0x1FAFF, SvxResId(RID_SUBSETSTR_SYMBOLS_AND_PICTOGRAPHS_EXTENDED_A) ); + break; + case UBLOCK_TAMIL_SUPPLEMENT: + aAllSubsets.emplace_back( 0x11FC0, 0x11FFF, SvxResId(RID_SUBSETSTR_TAMIL_SUPPLEMENT) ); + break; + case UBLOCK_WANCHO: + aAllSubsets.emplace_back( 0x1E2C0, 0x1E2FF, SvxResId(RID_SUBSETSTR_WANCHO) ); + break; +#endif }