diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-30 12:43:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-31 06:58:26 +0000 |
commit | 97844a113fcaf7e2a0c52203e6792c71e2389f39 (patch) | |
tree | 8e2404052912959edb41d08562eef3e3c8d1bdf7 /include | |
parent | a5a571307fb3306b74ab46b085cde6388270a770 (diff) |
use actual UNO enums in i18nutil
Change-Id: I959b26471fe69c4ee8ecb7e2fd57a53e24187112
Reviewed-on: https://gerrit.libreoffice.org/35905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/i18nutil/transliteration.hxx | 80 | ||||
-rw-r--r-- | include/i18nutil/unicode.hxx | 6 |
2 files changed, 43 insertions, 43 deletions
diff --git a/include/i18nutil/transliteration.hxx b/include/i18nutil/transliteration.hxx index b8cafa68f14f..92709690ac27 100644 --- a/include/i18nutil/transliteration.hxx +++ b/include/i18nutil/transliteration.hxx @@ -31,96 +31,96 @@ enum class TransliterationFlags { NONE = 0, /// Transliterate a string from upper case to lower case - UPPERCASE_LOWERCASE = css::i18n::TransliterationModules_UPPERCASE_LOWERCASE, + UPPERCASE_LOWERCASE = (int)css::i18n::TransliterationModules_UPPERCASE_LOWERCASE, /// Transliterate a string from lower case to upper case - LOWERCASE_UPPERCASE = css::i18n::TransliterationModules_LOWERCASE_UPPERCASE, + LOWERCASE_UPPERCASE = (int)css::i18n::TransliterationModules_LOWERCASE_UPPERCASE, /// Transliterate a string from half width character to full width character - HALFWIDTH_FULLWIDTH = css::i18n::TransliterationModules_HALFWIDTH_FULLWIDTH, + HALFWIDTH_FULLWIDTH = (int)css::i18n::TransliterationModules_HALFWIDTH_FULLWIDTH, /// Transliterate a string from full width character to half width character - FULLWIDTH_HALFWIDTH = css::i18n::TransliterationModules_FULLWIDTH_HALFWIDTH, + FULLWIDTH_HALFWIDTH = (int)css::i18n::TransliterationModules_FULLWIDTH_HALFWIDTH, /// Transliterate a Japanese string from Katakana to Hiragana - KATAKANA_HIRAGANA = css::i18n::TransliterationModules_KATAKANA_HIRAGANA, + KATAKANA_HIRAGANA = (int)css::i18n::TransliterationModules_KATAKANA_HIRAGANA, /// Transliterate a Japanese string from Hiragana to Katakana - HIRAGANA_KATAKANA = css::i18n::TransliterationModules_HIRAGANA_KATAKANA, + HIRAGANA_KATAKANA = (int)css::i18n::TransliterationModules_HIRAGANA_KATAKANA, /// Transliterate an ASCII number string to Simplified Chinese lower case number string in spellout format - NumToTextLower_zh_CN = css::i18n::TransliterationModules_NumToTextLower_zh_CN, + NumToTextLower_zh_CN = (int)css::i18n::TransliterationModules_NumToTextLower_zh_CN, /// Transliterate an ASCII number string to Simplified Chinese upper case number string in spellout format - NumToTextUpper_zh_CN = css::i18n::TransliterationModules_NumToTextUpper_zh_CN, + NumToTextUpper_zh_CN = (int)css::i18n::TransliterationModules_NumToTextUpper_zh_CN, /// Transliterate an ASCII number string to Traditional Chinese lower case number string in spellout format - NumToTextLower_zh_TW = css::i18n::TransliterationModules_NumToTextLower_zh_TW, + NumToTextLower_zh_TW = (int)css::i18n::TransliterationModules_NumToTextLower_zh_TW, /// Transliterate an ASCII number string to Traditional Chinese upper case number string in spellout format - NumToTextUpper_zh_TW = css::i18n::TransliterationModules_NumToTextUpper_zh_TW, + NumToTextUpper_zh_TW = (int)css::i18n::TransliterationModules_NumToTextUpper_zh_TW, /// Transliterate an ASCII number string to formal Korean Hangul number string in spellout format - NumToTextFormalHangul_ko = css::i18n::TransliterationModules_NumToTextFormalHangul_ko, + NumToTextFormalHangul_ko = (int)css::i18n::TransliterationModules_NumToTextFormalHangul_ko, /// Transliterate an ASCII number string to formal Korean Hanja lower case number string in spellout format - NumToTextFormalLower_ko = css::i18n::TransliterationModules_NumToTextFormalLower_ko, + NumToTextFormalLower_ko = (int)css::i18n::TransliterationModules_NumToTextFormalLower_ko, /// Transliterate an ASCII number string to formal Korean Hanja upper case number string in spellout format - NumToTextFormalUpper_ko = css::i18n::TransliterationModules_NumToTextFormalUpper_ko, + NumToTextFormalUpper_ko = (int)css::i18n::TransliterationModules_NumToTextFormalUpper_ko, /** The first character of the sentence is put in upper case */ - SENTENCE_CASE = css::i18n::TransliterationModulesExtra::SENTENCE_CASE, + SENTENCE_CASE = (int)css::i18n::TransliterationModulesExtra::SENTENCE_CASE, /** The first character of the word is put in upper case. * This one is part */ - TITLE_CASE = css::i18n::TransliterationModulesExtra::TITLE_CASE, + TITLE_CASE = (int)css::i18n::TransliterationModulesExtra::TITLE_CASE, /** All characters of the word are to change their case from small letters * to capital letters and vice versa. */ - TOGGLE_CASE = css::i18n::TransliterationModulesExtra::TOGGLE_CASE, + TOGGLE_CASE = (int)css::i18n::TransliterationModulesExtra::TOGGLE_CASE, - NON_IGNORE_MASK = css::i18n::TransliterationModules_NON_IGNORE_MASK, + NON_IGNORE_MASK = (int)css::i18n::TransliterationModules_NON_IGNORE_MASK, IGNORE_MASK = 0x7fffff00, /// Ignore case when comparing strings by transliteration service - IGNORE_CASE = css::i18n::TransliterationModules_IGNORE_CASE, + IGNORE_CASE = (int)css::i18n::TransliterationModules_IGNORE_CASE, /// Ignore Hiragana and Katakana when comparing strings by transliteration service - IGNORE_KANA = css::i18n::TransliterationModules_IGNORE_KANA, // ja_JP + IGNORE_KANA = (int)css::i18n::TransliterationModules_IGNORE_KANA, // ja_JP /// Ignore full width and half width character when comparing strings by transliteration service - IGNORE_WIDTH = css::i18n::TransliterationModules_IGNORE_WIDTH, // ja_JP + IGNORE_WIDTH = (int)css::i18n::TransliterationModules_IGNORE_WIDTH, // ja_JP /// Ignore Japanese traditional Kanji character in Japanese fuzzy search - ignoreTraditionalKanji_ja_JP = css::i18n::TransliterationModules_ignoreTraditionalKanji_ja_JP, + ignoreTraditionalKanji_ja_JP = (int)css::i18n::TransliterationModules_ignoreTraditionalKanji_ja_JP, /// Ignore Japanese traditional Katakana and Hiragana character in Japanese fuzzy search - ignoreTraditionalKana_ja_JP = css::i18n::TransliterationModules_ignoreTraditionalKana_ja_JP, + ignoreTraditionalKana_ja_JP = (int)css::i18n::TransliterationModules_ignoreTraditionalKana_ja_JP, /// Ignore dash or minus sign in Japanese fuzzy search - ignoreMinusSign_ja_JP = css::i18n::TransliterationModules_ignoreMinusSign_ja_JP, + ignoreMinusSign_ja_JP = (int)css::i18n::TransliterationModules_ignoreMinusSign_ja_JP, /// Ignore Hiragana and Katakana iteration mark in Japanese fuzzy search - ignoreIterationMark_ja_JP = css::i18n::TransliterationModules_ignoreIterationMark_ja_JP, + ignoreIterationMark_ja_JP = (int)css::i18n::TransliterationModules_ignoreIterationMark_ja_JP, /// Ignore separator punctuations in Japanese fuzzy search - ignoreSeparator_ja_JP = css::i18n::TransliterationModules_ignoreSeparator_ja_JP, + ignoreSeparator_ja_JP = (int)css::i18n::TransliterationModules_ignoreSeparator_ja_JP, /// Ignore Katakana and Hiragana Zi/Zi and Zu/Zu in Japanese fuzzy search - ignoreZiZu_ja_JP = css::i18n::TransliterationModules_ignoreZiZu_ja_JP, + ignoreZiZu_ja_JP = (int)css::i18n::TransliterationModules_ignoreZiZu_ja_JP, /// Ignore Katakana and Hiragana Ba/Gua and Ha/Fa in Japanese fuzzy search - ignoreBaFa_ja_JP = css::i18n::TransliterationModules_ignoreBaFa_ja_JP, + ignoreBaFa_ja_JP = (int)css::i18n::TransliterationModules_ignoreBaFa_ja_JP, /// Ignore Katakana and Hiragana Tsui/Tea/Ti and Dyi/Ji in Japanese fuzzy search - ignoreTiJi_ja_JP = css::i18n::TransliterationModules_ignoreTiJi_ja_JP, + ignoreTiJi_ja_JP = (int)css::i18n::TransliterationModules_ignoreTiJi_ja_JP, /// Ignore Katakana and Hiragana Hyu/Fyu and Byu/Gyu in Japanese fuzzy search - ignoreHyuByu_ja_JP = css::i18n::TransliterationModules_ignoreHyuByu_ja_JP, + ignoreHyuByu_ja_JP = (int)css::i18n::TransliterationModules_ignoreHyuByu_ja_JP, /// Ignore Katakana and Hiragana Se/Sye and Ze/Je in Japanese fuzzy search - ignoreSeZe_ja_JP = css::i18n::TransliterationModules_ignoreSeZe_ja_JP, + ignoreSeZe_ja_JP = (int)css::i18n::TransliterationModules_ignoreSeZe_ja_JP, /// Ignore Katakana YA/A which follows the character in either I or E row in Japanese fuzzy search - ignoreIandEfollowedByYa_ja_JP = css::i18n::TransliterationModules_ignoreIandEfollowedByYa_ja_JP, + ignoreIandEfollowedByYa_ja_JP = (int)css::i18n::TransliterationModules_ignoreIandEfollowedByYa_ja_JP, /// Ignore Katakana KI/KU which follows the character in SA column in Japanese fuzzy search - ignoreKiKuFollowedBySa_ja_JP = css::i18n::TransliterationModules_ignoreKiKuFollowedBySa_ja_JP, + ignoreKiKuFollowedBySa_ja_JP = (int)css::i18n::TransliterationModules_ignoreKiKuFollowedBySa_ja_JP, /// Ignore Japanese normal and small sized character in Japanese fuzzy search - ignoreSize_ja_JP = css::i18n::TransliterationModules_ignoreSize_ja_JP, + ignoreSize_ja_JP = (int)css::i18n::TransliterationModules_ignoreSize_ja_JP, /// Ignore Japanese prolonged sound mark in Japanese fuzzy search - ignoreProlongedSoundMark_ja_JP = css::i18n::TransliterationModules_ignoreProlongedSoundMark_ja_JP, + ignoreProlongedSoundMark_ja_JP = (int)css::i18n::TransliterationModules_ignoreProlongedSoundMark_ja_JP, /// Ignore middle dot in Japanese fuzzy search - ignoreMiddleDot_ja_JP = css::i18n::TransliterationModules_ignoreMiddleDot_ja_JP, + ignoreMiddleDot_ja_JP = (int)css::i18n::TransliterationModules_ignoreMiddleDot_ja_JP, /// Ignore white space characters, include space, TAB, return, etc. in Japanese fuzzy search - ignoreSpace_ja_JP = css::i18n::TransliterationModules_ignoreSpace_ja_JP, + ignoreSpace_ja_JP = (int)css::i18n::TransliterationModules_ignoreSpace_ja_JP, /// transliterate Japanese small sized character to normal sized character - smallToLarge_ja_JP = css::i18n::TransliterationModules_smallToLarge_ja_JP, + smallToLarge_ja_JP = (int)css::i18n::TransliterationModules_smallToLarge_ja_JP, /// transliterate Japanese normal sized character to small sized character - largeToSmall_ja_JP = css::i18n::TransliterationModules_largeToSmall_ja_JP, + largeToSmall_ja_JP = (int)css::i18n::TransliterationModules_largeToSmall_ja_JP, - IGNORE_DIACRITICS_CTL = css::i18n::TransliterationModulesExtra::IGNORE_DIACRITICS_CTL, - IGNORE_KASHIDA_CTL = css::i18n::TransliterationModulesExtra::IGNORE_KASHIDA_CTL + IGNORE_DIACRITICS_CTL = (int)css::i18n::TransliterationModulesExtra::IGNORE_DIACRITICS_CTL, + IGNORE_KASHIDA_CTL = (int)css::i18n::TransliterationModulesExtra::IGNORE_KASHIDA_CTL }; namespace o3tl { template<> struct typed_flags<TransliterationFlags> : is_typed_flags<TransliterationFlags, 0x7fffffff> {}; diff --git a/include/i18nutil/unicode.hxx b/include/i18nutil/unicode.hxx index ec517161f4dd..3380c69ad4c7 100644 --- a/include/i18nutil/unicode.hxx +++ b/include/i18nutil/unicode.hxx @@ -28,8 +28,8 @@ class LanguageTag; struct ScriptTypeList { - sal_Int16 from; - sal_Int16 to; + css::i18n::UnicodeScript from; + css::i18n::UnicodeScript to; sal_Int16 value; }; @@ -38,7 +38,7 @@ class I18NUTIL_DLLPUBLIC unicode public: static sal_Int16 SAL_CALL getUnicodeType( const sal_Unicode ch ); - static sal_Int16 SAL_CALL getUnicodeScriptType( const sal_Unicode ch, const ScriptTypeList *typeList = nullptr, sal_Int16 unknownType = 0 ); + static sal_Int16 SAL_CALL getUnicodeScriptType( const sal_Unicode ch, const ScriptTypeList *typeList, sal_Int16 unknownType = 0 ); static sal_Unicode SAL_CALL getUnicodeScriptStart(css::i18n::UnicodeScript type); static sal_Unicode SAL_CALL getUnicodeScriptEnd(css::i18n::UnicodeScript type); static sal_uInt8 SAL_CALL getUnicodeDirection( const sal_Unicode ch ); |