diff options
author | Martin Hosken <martin_hosken@sil.org> | 2016-11-16 00:53:59 +0000 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-11-17 17:16:52 +0000 |
commit | 6b35e804198ac45386805e80a3d413ed3405c3b4 (patch) | |
tree | 1132517e5e139e6387016e04d20a5660e8c39064 /i18nlangtag/qa | |
parent | 3b94229fb74dfe43e2b7349d6f580dc375f28814 (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 'i18nlangtag/qa')
-rw-r--r-- | i18nlangtag/qa/cppunit/test_languagetag.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/i18nlangtag/qa/cppunit/test_languagetag.cxx b/i18nlangtag/qa/cppunit/test_languagetag.cxx index 74d93cc5de2f..c7a8001e4ad7 100644 --- a/i18nlangtag/qa/cppunit/test_languagetag.cxx +++ b/i18nlangtag/qa/cppunit/test_languagetag.cxx @@ -23,6 +23,7 @@ #include <osl/file.hxx> #include <com/sun/star/lang/Locale.hpp> +#include <com/sun/star/i18n/ScriptType.hpp> using namespace com::sun::star; @@ -518,6 +519,17 @@ void TestLanguageTag::testAllTags() CPPUNIT_ASSERT( LanguageTag::isOnTheFlyID( qty.getLanguageType()) ); } + // 'qtx' is an unknown new mslangid + { + OUString s_qtx( "qtx" ); + LanguageTag qtx( s_qtx ); + qtx.setScriptType( LanguageTag::ScriptType::RTL ); + LanguageType n_qtx = qtx.getLanguageType(); + CPPUNIT_ASSERT_EQUAL( MsLangId::getScriptType(n_qtx), css::i18n::ScriptType::COMPLEX ); + CPPUNIT_ASSERT( MsLangId::isRightToLeft(n_qtx) ); + CPPUNIT_ASSERT( !MsLangId::isCJK(n_qtx) ); + } + // 'x-comment' is a privateuse known "locale" { OUString s_xcomment( "x-comment" ); |