summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMartin Hosken <martin_hosken@sil.org>2016-11-16 00:53:59 +0000
committerStephan Bergmann <sbergman@redhat.com>2016-11-17 17:16:52 +0000
commit6b35e804198ac45386805e80a3d413ed3405c3b4 (patch)
tree1132517e5e139e6387016e04d20a5660e8c39064 /include
parent3b94229fb74dfe43e2b7349d6f580dc375f28814 (diff)
Fix tdf#103855 add language codes and names to language lists from extensions
Rationale for changes to languagetag.hxx can be found in the bug tdf#103855. Change-Id: I7fa7c8a3f7b219ce08df69a3965f544ae156beab Reviewed-on: https://gerrit.libreoffice.org/30882 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/i18nlangtag/languagetag.hxx24
1 files changed, 24 insertions, 0 deletions
diff --git a/include/i18nlangtag/languagetag.hxx b/include/i18nlangtag/languagetag.hxx
index a1b1bb9104f7..14de1eeaed42 100644
--- a/include/i18nlangtag/languagetag.hxx
+++ b/include/i18nlangtag/languagetag.hxx
@@ -55,6 +55,24 @@ class I18NLANGTAG_DLLPUBLIC LanguageTag
public:
+ /** ScriptType for a language.
+
+ Used only in onTheFly languages as a way of marking key script behaviours
+ for the script of the language without having to store and analyse the
+ script each time. Used primarily from msLangId.
+
+ These need to correspond to the ExtraLanguages.ScriptType template
+ property in officecfg/registry/schema/org/openoffice/VCL.xcs
+ */
+ enum ScriptType
+ {
+ UNKNOWN = 0,
+ WESTERN = 1, // Copies css::i18n::ScriptType for strong types
+ CJK = 2,
+ CTL = 3,
+ RTL = 4 // implies CTL
+ };
+
/** Init LanguageTag with existing BCP 47 language tag string.
@param bCanonicalize
@@ -237,6 +255,11 @@ public:
*/
bool isSystemLocale() const { return mbSystemLocale;}
+ /** Returns the script type for this language, UNKNOWN if not set */
+ ScriptType getScriptType() const;
+
+ /** Sets the script type for this language */
+ void setScriptType(ScriptType st);
/** Reset with existing BCP 47 language tag string. See ctor. */
LanguageTag & reset( const OUString & rBcp47LanguageTag );
@@ -496,6 +519,7 @@ public:
/** If nLang is a generated on-the-fly LangID */
static bool isOnTheFlyID( LanguageType nLang );
+ static ScriptType getOnTheFlyScriptType( LanguageType nLang );
/** @ATTENTION: _ONLY_ to be called by the application's configuration! */
static void setConfiguredSystemLanguage( LanguageType nLang );