[Libreoffice-commits] core.git: i18nlangtag/source include/i18nlangtag vcl/generic
Noel Grandin
noel at peralex.com
Sun Apr 19 23:13:43 PDT 2015
i18nlangtag/source/languagetag/languagetag.cxx | 236 ++++++++++++------------
include/i18nlangtag/applelangid.hxx | 240 ++++++++++++-------------
vcl/generic/fontmanager/fontmanager.cxx | 5
3 files changed, 242 insertions(+), 239 deletions(-)
New commits:
commit 20ce82d5d5f936438d5e9c08d308754d39037ede
Author: Noel Grandin <noel at peralex.com>
Date: Sat Apr 18 17:20:22 2015 +0200
convert AppleLanguageId to scoped enum
Change-Id: I6646872f76bb9365a8c2ef809bc942f28b690a32
Reviewed-on: https://gerrit.libreoffice.org/15378
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
Tested-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 2ac7ca4..c5366f7 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -2762,358 +2762,358 @@ LanguageTag makeLanguageTagFromAppleLanguageId(AppleLanguageId nLanguage)
switch (nLanguage)
{
- case APPLE_LANG_ENGLISH:
+ case AppleLanguageId::ENGLISH:
nLang = LANGUAGE_ENGLISH;
break;
- case APPLE_LANG_FRENCH:
+ case AppleLanguageId::FRENCH:
nLang = LANGUAGE_FRENCH;
break;
- case APPLE_LANG_GERMAN:
+ case AppleLanguageId::GERMAN:
nLang = LANGUAGE_GERMAN;
break;
- case APPLE_LANG_ITALIAN:
+ case AppleLanguageId::ITALIAN:
nLang = LANGUAGE_ITALIAN;
break;
- case APPLE_LANG_DUTCH:
+ case AppleLanguageId::DUTCH:
nLang = LANGUAGE_DUTCH;
break;
- case APPLE_LANG_SWEDISH:
+ case AppleLanguageId::SWEDISH:
nLang = LANGUAGE_SWEDISH;
break;
- case APPLE_LANG_SPANISH:
+ case AppleLanguageId::SPANISH:
nLang = LANGUAGE_SPANISH;
break;
- case APPLE_LANG_DANISH:
+ case AppleLanguageId::DANISH:
nLang = LANGUAGE_DANISH;
break;
- case APPLE_LANG_PORTUGUESE:
+ case AppleLanguageId::PORTUGUESE:
nLang = LANGUAGE_PORTUGUESE;
break;
- case APPLE_LANG_NORWEGIAN:
+ case AppleLanguageId::NORWEGIAN:
nLang = LANGUAGE_NORWEGIAN;
break;
- case APPLE_LANG_HEBREW:
+ case AppleLanguageId::HEBREW:
nLang = LANGUAGE_HEBREW;
break;
- case APPLE_LANG_JAPANESE:
+ case AppleLanguageId::JAPANESE:
nLang = LANGUAGE_JAPANESE;
break;
- case APPLE_LANG_ARABIC:
+ case AppleLanguageId::ARABIC:
nLang = LANGUAGE_ARABIC_PRIMARY_ONLY;
break;
- case APPLE_LANG_FINNISH:
+ case AppleLanguageId::FINNISH:
nLang = LANGUAGE_FINNISH;
break;
- case APPLE_LANG_GREEK:
+ case AppleLanguageId::GREEK:
nLang = LANGUAGE_GREEK;
break;
- case APPLE_LANG_ICELANDIC:
+ case AppleLanguageId::ICELANDIC:
nLang = LANGUAGE_ICELANDIC;
break;
- case APPLE_LANG_MALTESE:
+ case AppleLanguageId::MALTESE:
nLang = LANGUAGE_MALTESE;
break;
- case APPLE_LANG_TURKISH:
+ case AppleLanguageId::TURKISH:
nLang = LANGUAGE_TURKISH;
break;
- case APPLE_LANG_CROATIAN:
+ case AppleLanguageId::CROATIAN:
nLang = LANGUAGE_CROATIAN;
break;
- case APPLE_LANG_CHINESE_TRADITIONAL:
+ case AppleLanguageId::CHINESE_TRADITIONAL:
nLang = LANGUAGE_CHINESE_TRADITIONAL;
break;
- case APPLE_LANG_URDU:
+ case AppleLanguageId::URDU:
nLang = LANGUAGE_URDU_PAKISTAN; //probably, otherwise we need a LANGUAGE_URDU_PRIMARY_ONLY
break;
- case APPLE_LANG_HINDI:
+ case AppleLanguageId::HINDI:
nLang = LANGUAGE_HINDI;
break;
- case APPLE_LANG_THAI:
+ case AppleLanguageId::THAI:
nLang = LANGUAGE_THAI;
break;
- case APPLE_LANG_KOREAN:
+ case AppleLanguageId::KOREAN:
nLang = LANGUAGE_KOREAN;
break;
- case APPLE_LANG_LITHUANIAN:
+ case AppleLanguageId::LITHUANIAN:
nLang = LANGUAGE_LITHUANIAN;
break;
- case APPLE_LANG_POLISH:
+ case AppleLanguageId::POLISH:
nLang = LANGUAGE_POLISH;
break;
- case APPLE_LANG_HUNGARIAN:
+ case AppleLanguageId::HUNGARIAN:
nLang = LANGUAGE_HUNGARIAN;
break;
- case APPLE_LANG_ESTONIAN:
+ case AppleLanguageId::ESTONIAN:
nLang = LANGUAGE_ESTONIAN;
break;
- case APPLE_LANG_LATVIAN:
+ case AppleLanguageId::LATVIAN:
nLang = LANGUAGE_LATVIAN;
break;
- case APPLE_LANG_SAMI:
+ case AppleLanguageId::SAMI:
nLang = LANGUAGE_SAMI_NORTHERN_NORWAY; //maybe
break;
- case APPLE_LANG_FAROESE:
+ case AppleLanguageId::FAROESE:
nLang = LANGUAGE_FAEROESE;
break;
- case APPLE_LANG_FARSI:
+ case AppleLanguageId::FARSI:
nLang = LANGUAGE_FARSI;
break;
- case APPLE_LANG_RUSSIAN:
+ case AppleLanguageId::RUSSIAN:
nLang = LANGUAGE_RUSSIAN;
break;
- case APPLE_LANG_CHINESE_SIMPLIFIED:
+ case AppleLanguageId::CHINESE_SIMPLIFIED:
nLang = LANGUAGE_CHINESE_SIMPLIFIED;
break;
- case APPLE_LANG_FLEMISH:
+ case AppleLanguageId::FLEMISH:
nLang = LANGUAGE_DUTCH_BELGIAN;
break;
- case APPLE_LANG_IRISH_GAELIC:
+ case AppleLanguageId::IRISH_GAELIC:
nLang = LANGUAGE_GAELIC_IRELAND;
break;
- case APPLE_LANG_ALBANIAN:
+ case AppleLanguageId::ALBANIAN:
nLang = LANGUAGE_ALBANIAN;
break;
- case APPLE_LANG_ROMANIAN:
+ case AppleLanguageId::ROMANIAN:
nLang = LANGUAGE_ROMANIAN;
break;
- case APPLE_LANG_CZECH:
+ case AppleLanguageId::CZECH:
nLang = LANGUAGE_CZECH;
break;
- case APPLE_LANG_SLOVAK:
+ case AppleLanguageId::SLOVAK:
nLang = LANGUAGE_SLOVAK;
break;
- case APPLE_LANG_SLOVENIAN:
+ case AppleLanguageId::SLOVENIAN:
nLang = LANGUAGE_SLOVENIAN;
break;
- case APPLE_LANG_YIDDISH:
+ case AppleLanguageId::YIDDISH:
nLang = LANGUAGE_YIDDISH;
break;
- case APPLE_LANG_SERBIAN:
+ case AppleLanguageId::SERBIAN:
nLang = LANGUAGE_SERBIAN_CYRILLIC_SERBIA; //maybe
break;
- case APPLE_LANG_MACEDONIAN:
+ case AppleLanguageId::MACEDONIAN:
nLang = LANGUAGE_MACEDONIAN;
break;
- case APPLE_LANG_BULGARIAN:
+ case AppleLanguageId::BULGARIAN:
nLang = LANGUAGE_BULGARIAN;
break;
- case APPLE_LANG_UKRAINIAN:
+ case AppleLanguageId::UKRAINIAN:
nLang = LANGUAGE_UKRAINIAN;
break;
- case APPLE_LANG_BYELORUSSIAN:
+ case AppleLanguageId::BYELORUSSIAN:
nLang = LANGUAGE_BELARUSIAN;
break;
- case APPLE_LANG_UZBEK:
+ case AppleLanguageId::UZBEK:
nLang = LANGUAGE_UZBEK_CYRILLIC; //maybe
break;
- case APPLE_LANG_KAZAKH:
+ case AppleLanguageId::KAZAKH:
nLang = LANGUAGE_KAZAKH;
break;
- case APPLE_LANG_AZERI_CYRILLIC:
+ case AppleLanguageId::AZERI_CYRILLIC:
nLang = LANGUAGE_AZERI_CYRILLIC;
break;
- case APPLE_LANG_AZERI_ARABIC:
+ case AppleLanguageId::AZERI_ARABIC:
return LanguageTag("az-Arab");
break;
- case APPLE_LANG_ARMENIAN:
+ case AppleLanguageId::ARMENIAN:
nLang = LANGUAGE_ARMENIAN;
break;
- case APPLE_LANG_GEORGIAN:
+ case AppleLanguageId::GEORGIAN:
nLang = LANGUAGE_GEORGIAN;
break;
- case APPLE_LANG_MOLDAVIAN:
+ case AppleLanguageId::MOLDAVIAN:
nLang = LANGUAGE_ROMANIAN_MOLDOVA;
break;
- case APPLE_LANG_KIRGHIZ:
+ case AppleLanguageId::KIRGHIZ:
nLang = LANGUAGE_KIRGHIZ;
break;
- case APPLE_LANG_TAJIKI:
+ case AppleLanguageId::TAJIKI:
nLang = LANGUAGE_TAJIK;
break;
- case APPLE_LANG_TURKMEN:
+ case AppleLanguageId::TURKMEN:
nLang = LANGUAGE_TURKMEN;
break;
- case APPLE_LANG_MONGOLIAN_MONGOLIAN:
+ case AppleLanguageId::MONGOLIAN_MONGOLIAN:
nLang = LANGUAGE_MONGOLIAN_MONGOLIAN_MONGOLIA;
break;
- case APPLE_LANG_MONGOLIAN_CYRILLIC:
+ case AppleLanguageId::MONGOLIAN_CYRILLIC:
nLang = LANGUAGE_MONGOLIAN_CYRILLIC_MONGOLIA;
break;
- case APPLE_LANG_PASHTO:
+ case AppleLanguageId::PASHTO:
nLang = LANGUAGE_PASHTO;
break;
- case APPLE_LANG_KURDISH:
+ case AppleLanguageId::KURDISH:
nLang = LANGUAGE_USER_KURDISH_TURKEY; //maybe
break;
- case APPLE_LANG_KASHMIRI:
+ case AppleLanguageId::KASHMIRI:
nLang = LANGUAGE_KASHMIRI;
break;
- case APPLE_LANG_SINDHI:
+ case AppleLanguageId::SINDHI:
nLang = LANGUAGE_SINDHI;
break;
- case APPLE_LANG_TIBETAN:
+ case AppleLanguageId::TIBETAN:
nLang = LANGUAGE_TIBETAN;
break;
- case APPLE_LANG_NEPALI:
+ case AppleLanguageId::NEPALI:
nLang = LANGUAGE_NEPALI;
break;
- case APPLE_LANG_SANSKRIT:
+ case AppleLanguageId::SANSKRIT:
nLang = LANGUAGE_SANSKRIT;
break;
- case APPLE_LANG_MARATHI:
+ case AppleLanguageId::MARATHI:
nLang = LANGUAGE_MARATHI;
break;
- case APPLE_LANG_BENGALI:
+ case AppleLanguageId::BENGALI:
nLang = LANGUAGE_BENGALI;
break;
- case APPLE_LANG_ASSAMESE:
+ case AppleLanguageId::ASSAMESE:
nLang = LANGUAGE_ASSAMESE;
break;
- case APPLE_LANG_GUJARATI:
+ case AppleLanguageId::GUJARATI:
nLang = LANGUAGE_GUJARATI;
break;
- case APPLE_LANG_PUNJABI:
+ case AppleLanguageId::PUNJABI:
nLang = LANGUAGE_PUNJABI;
break;
- case APPLE_LANG_ORIYA:
+ case AppleLanguageId::ORIYA:
nLang = LANGUAGE_ODIA;
break;
- case APPLE_LANG_MALAYALAM:
+ case AppleLanguageId::MALAYALAM:
nLang = LANGUAGE_MALAYALAM;
break;
- case APPLE_LANG_KANNADA:
+ case AppleLanguageId::KANNADA:
nLang = LANGUAGE_KANNADA;
break;
- case APPLE_LANG_TAMIL:
+ case AppleLanguageId::TAMIL:
nLang = LANGUAGE_TAMIL;
break;
- case APPLE_LANG_TELUGU:
+ case AppleLanguageId::TELUGU:
nLang = LANGUAGE_TELUGU;
break;
- case APPLE_LANG_SINHALESE:
+ case AppleLanguageId::SINHALESE:
nLang = LANGUAGE_SINHALESE_SRI_LANKA;
break;
- case APPLE_LANG_BURMESE:
+ case AppleLanguageId::BURMESE:
nLang = LANGUAGE_BURMESE;
break;
- case APPLE_LANG_KHMER:
+ case AppleLanguageId::KHMER:
nLang = LANGUAGE_KHMER;
break;
- case APPLE_LANG_LAO:
+ case AppleLanguageId::LAO:
nLang = LANGUAGE_LAO;
break;
- case APPLE_LANG_VIETNAMESE:
+ case AppleLanguageId::VIETNAMESE:
nLang = LANGUAGE_VIETNAMESE;
break;
- case APPLE_LANG_INDONESIAN:
+ case AppleLanguageId::INDONESIAN:
nLang = LANGUAGE_INDONESIAN;
break;
- case APPLE_LANG_TAGALONG:
+ case AppleLanguageId::TAGALONG:
nLang = LANGUAGE_USER_TAGALOG;
break;
- case APPLE_LANG_MALAY_LATIN:
+ case AppleLanguageId::MALAY_LATIN:
nLang = LANGUAGE_MALAY_MALAYSIA;
break;
- case APPLE_LANG_MALAY_ARABIC:
+ case AppleLanguageId::MALAY_ARABIC:
return LanguageTag("ms-Arab");
break;
- case APPLE_LANG_AMHARIC:
+ case AppleLanguageId::AMHARIC:
nLang = LANGUAGE_AMHARIC_ETHIOPIA;
break;
- case APPLE_LANG_TIGRINYA:
+ case AppleLanguageId::TIGRINYA:
nLang = LANGUAGE_TIGRIGNA_ETHIOPIA;
break;
- case APPLE_LANG_GALLA:
+ case AppleLanguageId::GALLA:
nLang = LANGUAGE_OROMO;
break;
- case APPLE_LANG_SOMALI:
+ case AppleLanguageId::SOMALI:
nLang = LANGUAGE_SOMALI;
break;
- case APPLE_LANG_SWAHILI:
+ case AppleLanguageId::SWAHILI:
nLang = LANGUAGE_SWAHILI;
break;
- case APPLE_LANG_KINYARWANDA:
+ case AppleLanguageId::KINYARWANDA:
nLang = LANGUAGE_KINYARWANDA_RWANDA;
break;
- case APPLE_LANG_RUNDI:
+ case AppleLanguageId::RUNDI:
return LanguageTag("rn");
break;
- case APPLE_LANG_NYANJA:
+ case AppleLanguageId::NYANJA:
nLang = LANGUAGE_USER_NYANJA;
break;
- case APPLE_LANG_MALAGASY:
+ case AppleLanguageId::MALAGASY:
nLang = LANGUAGE_MALAGASY_PLATEAU;
break;
- case APPLE_LANG_ESPERANTO:
+ case AppleLanguageId::ESPERANTO:
nLang = LANGUAGE_USER_ESPERANTO;
break;
- case APPLE_LANG_WELSH:
+ case AppleLanguageId::WELSH:
nLang = LANGUAGE_WELSH;
break;
- case APPLE_LANG_BASQUE:
+ case AppleLanguageId::BASQUE:
nLang = LANGUAGE_BASQUE;
break;
- case APPLE_LANG_CATALAN:
+ case AppleLanguageId::CATALAN:
nLang = LANGUAGE_CATALAN;
break;
- case APPLE_LANG_LATIN:
+ case AppleLanguageId::LATIN:
nLang = LANGUAGE_USER_LATIN;
break;
- case APPLE_LANG_QUENCHUA:
+ case AppleLanguageId::QUENCHUA:
nLang = LANGUAGE_QUECHUA_BOLIVIA; //maybe
break;
- case APPLE_LANG_GUARANI:
+ case AppleLanguageId::GUARANI:
nLang = LANGUAGE_GUARANI_PARAGUAY;
break;
- case APPLE_LANG_AYMARA:
+ case AppleLanguageId::AYMARA:
return LanguageTag("ay");
break;
- case APPLE_LANG_TATAR:
+ case AppleLanguageId::TATAR:
nLang = LANGUAGE_TATAR;
break;
- case APPLE_LANG_UIGHUR:
+ case AppleLanguageId::UIGHUR:
nLang = LANGUAGE_UIGHUR_CHINA;
break;
- case APPLE_LANG_DZONGKHA:
+ case AppleLanguageId::DZONGKHA:
nLang = LANGUAGE_DZONGKHA;
break;
- case APPLE_LANG_JAVANESE_LATIN:
+ case AppleLanguageId::JAVANESE_LATIN:
return LanguageTag("jv-Latn");
break;
- case APPLE_LANG_SUNDANESE_LATIN:
+ case AppleLanguageId::SUNDANESE_LATIN:
return LanguageTag("su-Latn");
break;
- case APPLE_LANG_GALICIAN:
+ case AppleLanguageId::GALICIAN:
nLang = LANGUAGE_GALICIAN;
break;
- case APPLE_LANG_AFRIKAANS:
+ case AppleLanguageId::AFRIKAANS:
nLang = LANGUAGE_AFRIKAANS;
break;
- case APPLE_LANG_BRETON:
+ case AppleLanguageId::BRETON:
nLang = LANGUAGE_BRETON_FRANCE;
break;
- case APPLE_LANG_INUKTITUT:
+ case AppleLanguageId::INUKTITUT:
nLang = LANGUAGE_INUKTITUT_LATIN_CANADA; //probably
break;
- case APPLE_LANG_SCOTTISH_GAELIC:
+ case AppleLanguageId::SCOTTISH_GAELIC:
nLang = LANGUAGE_GAELIC_SCOTLAND;
break;
- case APPLE_LANG_MANX_GAELIC:
+ case AppleLanguageId::MANX_GAELIC:
nLang = LANGUAGE_USER_MANX;
break;
- case APPLE_LANG_IRISH_GAELIC_WITH_DOT_ABOVE:
+ case AppleLanguageId::IRISH_GAELIC_WITH_DOT_ABOVE:
return LanguageTag("ga-Latg");
break;
- case APPLE_LANG_TONGAN:
+ case AppleLanguageId::TONGAN:
return LanguageTag("to");
break;
- case APPLE_LANG_GREEK_POLYTONIC:
+ case AppleLanguageId::GREEK_POLYTONIC:
nLang = LANGUAGE_USER_ANCIENT_GREEK;
break;
- case APPLE_LANG_GREENLANDIC:
+ case AppleLanguageId::GREENLANDIC:
nLang = LANGUAGE_KALAALLISUT_GREENLAND;
break;
- case APPLE_LANG_AZERI_LATIN:
+ case AppleLanguageId::AZERI_LATIN:
nLang = LANGUAGE_AZERI_LATIN;
break;
}
diff --git a/include/i18nlangtag/applelangid.hxx b/include/i18nlangtag/applelangid.hxx
index 5dc164a..0733d92 100644
--- a/include/i18nlangtag/applelangid.hxx
+++ b/include/i18nlangtag/applelangid.hxx
@@ -14,129 +14,131 @@
#include <i18nlangtag/languagetag.hxx>
-typedef unsigned short AppleLanguageId;
+enum class AppleLanguageId : unsigned short
+{
+ ENGLISH =0,
+ FRENCH =1,
+ GERMAN =2,
+ ITALIAN =3,
+ DUTCH =4,
+ SWEDISH =5,
+ SPANISH =6,
+ DANISH =7,
+ PORTUGUESE =8,
+ NORWEGIAN =9,
+ HEBREW =10,
+ JAPANESE =11,
+ ARABIC =12,
+ FINNISH =13,
+ GREEK =14,
+ ICELANDIC =15,
+ MALTESE =16,
+ TURKISH =17,
+ CROATIAN =18,
+ CHINESE_TRADITIONAL =19,
+ URDU =20,
+ HINDI =21,
+ THAI =22,
+ KOREAN =23,
+ LITHUANIAN =24,
+ POLISH =25,
+ HUNGARIAN =26,
+ ESTONIAN =27,
+ LATVIAN =28,
+ SAMI =29,
+ FAROESE =30,
+ FARSI =31,
+ RUSSIAN =32,
+ CHINESE_SIMPLIFIED =33,
+ FLEMISH =34,
+ IRISH_GAELIC =35,
+ ALBANIAN =36,
+ ROMANIAN =37,
+ CZECH =38,
+ SLOVAK =39,
+ SLOVENIAN =40,
+ YIDDISH =41,
+ SERBIAN =42,
+ MACEDONIAN =43,
+ BULGARIAN =44,
+ UKRAINIAN =45,
+ BYELORUSSIAN =46,
+ UZBEK =47,
+ KAZAKH =48,
+ AZERI_CYRILLIC =49,
+ AZERI_ARABIC =50,
+ ARMENIAN =51,
+ GEORGIAN =52,
+ MOLDAVIAN =53,
+ KIRGHIZ =54,
+ TAJIKI =55,
+ TURKMEN =56,
+ MONGOLIAN_MONGOLIAN =57,
+ MONGOLIAN_CYRILLIC =58,
+ PASHTO =59,
+ KURDISH =60,
+ KASHMIRI =61,
+ SINDHI =62,
+ TIBETAN =63,
+ NEPALI =64,
+ SANSKRIT =65,
+ MARATHI =66,
+ BENGALI =67,
+ ASSAMESE =68,
+ GUJARATI =69,
+ PUNJABI =70,
+ ORIYA =71,
+ MALAYALAM =72,
+ KANNADA =73,
+ TAMIL =74,
+ TELUGU =75,
+ SINHALESE =76,
+ BURMESE =77,
+ KHMER =78,
+ LAO =79,
+ VIETNAMESE =80,
+ INDONESIAN =81,
+ TAGALONG =82,
+ MALAY_LATIN =83,
+ MALAY_ARABIC =84,
+ AMHARIC =85,
+ TIGRINYA =86,
+ GALLA =87,
+ SOMALI =88,
+ SWAHILI =89,
+ KINYARWANDA =90,
+ RUNDI =91,
+ NYANJA =92,
+ MALAGASY =93,
+ ESPERANTO =94,
+ WELSH =128,
+ BASQUE =129,
+ CATALAN =130,
+ LATIN =131,
+ QUENCHUA =132,
+ GUARANI =133,
+ AYMARA =134,
+ TATAR =135,
+ UIGHUR =136,
+ DZONGKHA =137,
+ JAVANESE_LATIN =138,
+ SUNDANESE_LATIN =139,
+ GALICIAN =140,
+ AFRIKAANS =141,
+ BRETON =142,
+ INUKTITUT =143,
+ SCOTTISH_GAELIC =144,
+ MANX_GAELIC =145,
+ IRISH_GAELIC_WITH_DOT_ABOVE =146,
+ TONGAN =147,
+ GREEK_POLYTONIC =148,
+ GREENLANDIC =149,
+ AZERI_LATIN =150,
+};
/** Init LanguageTag with Apple LanguageId */
I18NLANGTAG_DLLPUBLIC LanguageTag makeLanguageTagFromAppleLanguageId(AppleLanguageId nLanguage);
-#define APPLE_LANG_ENGLISH 0
-#define APPLE_LANG_FRENCH 1
-#define APPLE_LANG_GERMAN 2
-#define APPLE_LANG_ITALIAN 3
-#define APPLE_LANG_DUTCH 4
-#define APPLE_LANG_SWEDISH 5
-#define APPLE_LANG_SPANISH 6
-#define APPLE_LANG_DANISH 7
-#define APPLE_LANG_PORTUGUESE 8
-#define APPLE_LANG_NORWEGIAN 9
-#define APPLE_LANG_HEBREW 10
-#define APPLE_LANG_JAPANESE 11
-#define APPLE_LANG_ARABIC 12
-#define APPLE_LANG_FINNISH 13
-#define APPLE_LANG_GREEK 14
-#define APPLE_LANG_ICELANDIC 15
-#define APPLE_LANG_MALTESE 16
-#define APPLE_LANG_TURKISH 17
-#define APPLE_LANG_CROATIAN 18
-#define APPLE_LANG_CHINESE_TRADITIONAL 19
-#define APPLE_LANG_URDU 20
-#define APPLE_LANG_HINDI 21
-#define APPLE_LANG_THAI 22
-#define APPLE_LANG_KOREAN 23
-#define APPLE_LANG_LITHUANIAN 24
-#define APPLE_LANG_POLISH 25
-#define APPLE_LANG_HUNGARIAN 26
-#define APPLE_LANG_ESTONIAN 27
-#define APPLE_LANG_LATVIAN 28
-#define APPLE_LANG_SAMI 29
-#define APPLE_LANG_FAROESE 30
-#define APPLE_LANG_FARSI 31
-#define APPLE_LANG_RUSSIAN 32
-#define APPLE_LANG_CHINESE_SIMPLIFIED 33
-#define APPLE_LANG_FLEMISH 34
-#define APPLE_LANG_IRISH_GAELIC 35
-#define APPLE_LANG_ALBANIAN 36
-#define APPLE_LANG_ROMANIAN 37
-#define APPLE_LANG_CZECH 38
-#define APPLE_LANG_SLOVAK 39
-#define APPLE_LANG_SLOVENIAN 40
-#define APPLE_LANG_YIDDISH 41
-#define APPLE_LANG_SERBIAN 42
-#define APPLE_LANG_MACEDONIAN 43
-#define APPLE_LANG_BULGARIAN 44
-#define APPLE_LANG_UKRAINIAN 45
-#define APPLE_LANG_BYELORUSSIAN 46
-#define APPLE_LANG_UZBEK 47
-#define APPLE_LANG_KAZAKH 48
-#define APPLE_LANG_AZERI_CYRILLIC 49
-#define APPLE_LANG_AZERI_ARABIC 50
-#define APPLE_LANG_ARMENIAN 51
-#define APPLE_LANG_GEORGIAN 52
-#define APPLE_LANG_MOLDAVIAN 53
-#define APPLE_LANG_KIRGHIZ 54
-#define APPLE_LANG_TAJIKI 55
-#define APPLE_LANG_TURKMEN 56
-#define APPLE_LANG_MONGOLIAN_MONGOLIAN 57
-#define APPLE_LANG_MONGOLIAN_CYRILLIC 58
-#define APPLE_LANG_PASHTO 59
-#define APPLE_LANG_KURDISH 60
-#define APPLE_LANG_KASHMIRI 61
-#define APPLE_LANG_SINDHI 62
-#define APPLE_LANG_TIBETAN 63
-#define APPLE_LANG_NEPALI 64
-#define APPLE_LANG_SANSKRIT 65
-#define APPLE_LANG_MARATHI 66
-#define APPLE_LANG_BENGALI 67
-#define APPLE_LANG_ASSAMESE 68
-#define APPLE_LANG_GUJARATI 69
-#define APPLE_LANG_PUNJABI 70
-#define APPLE_LANG_ORIYA 71
-#define APPLE_LANG_MALAYALAM 72
-#define APPLE_LANG_KANNADA 73
-#define APPLE_LANG_TAMIL 74
-#define APPLE_LANG_TELUGU 75
-#define APPLE_LANG_SINHALESE 76
-#define APPLE_LANG_BURMESE 77
-#define APPLE_LANG_KHMER 78
-#define APPLE_LANG_LAO 79
-#define APPLE_LANG_VIETNAMESE 80
-#define APPLE_LANG_INDONESIAN 81
-#define APPLE_LANG_TAGALONG 82
-#define APPLE_LANG_MALAY_LATIN 83
-#define APPLE_LANG_MALAY_ARABIC 84
-#define APPLE_LANG_AMHARIC 85
-#define APPLE_LANG_TIGRINYA 86
-#define APPLE_LANG_GALLA 87
-#define APPLE_LANG_SOMALI 88
-#define APPLE_LANG_SWAHILI 89
-#define APPLE_LANG_KINYARWANDA 90
-#define APPLE_LANG_RUNDI 91
-#define APPLE_LANG_NYANJA 92
-#define APPLE_LANG_MALAGASY 93
-#define APPLE_LANG_ESPERANTO 94
-#define APPLE_LANG_WELSH 128
-#define APPLE_LANG_BASQUE 129
-#define APPLE_LANG_CATALAN 130
-#define APPLE_LANG_LATIN 131
-#define APPLE_LANG_QUENCHUA 132
-#define APPLE_LANG_GUARANI 133
-#define APPLE_LANG_AYMARA 134
-#define APPLE_LANG_TATAR 135
-#define APPLE_LANG_UIGHUR 136
-#define APPLE_LANG_DZONGKHA 137
-#define APPLE_LANG_JAVANESE_LATIN 138
-#define APPLE_LANG_SUNDANESE_LATIN 139
-#define APPLE_LANG_GALICIAN 140
-#define APPLE_LANG_AFRIKAANS 141
-#define APPLE_LANG_BRETON 142
-#define APPLE_LANG_INUKTITUT 143
-#define APPLE_LANG_SCOTTISH_GAELIC 144
-#define APPLE_LANG_MANX_GAELIC 145
-#define APPLE_LANG_IRISH_GAELIC_WITH_DOT_ABOVE 146
-#define APPLE_LANG_TONGAN 147
-#define APPLE_LANG_GREEK_POLYTONIC 148
-#define APPLE_LANG_GREENLANDIC 149
-#define APPLE_LANG_AZERI_LATIN 150
#endif /* INCLUDED_I18NLANGTAG_APPLELANGID_H */
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index ca9651e..a357c78 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1156,10 +1156,11 @@ void PrintFontManager::analyzeTrueTypeFamilyName( void* pTTFont, ::std::list< OU
}
else if (pNameRecords[i].platformID == 1)
{
- LanguageTag aApple(makeLanguageTagFromAppleLanguageId(pNameRecords[i].languageID));
+ AppleLanguageId aAppleId = static_cast<AppleLanguageId>(pNameRecords[i].languageID);
+ LanguageTag aApple(makeLanguageTagFromAppleLanguageId(aAppleId));
if (aApple == aSystem)
nMatch = 8000;
- else if (pNameRecords[i].languageID == APPLE_LANG_ENGLISH)
+ else if (aAppleId == AppleLanguageId::ENGLISH)
nMatch = 2000;
else
nMatch = 1000;
More information about the Libreoffice-commits
mailing list