[Libreoffice-commits] .: i18npool/inc
i18npool/inc/collator_unicode.hxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 5275fabcb0c3941e32c23b9a9f66f395ab10b251 Author: Tor Lillqvist Date: Tue Jan 1 11:31:05 2013 +0200 WaE: private field 'hModule' is not used Change-Id: If3fc6937e66e9261255a9b197f995d923cc31132 diff --git a/i18npool/inc/collator_unicode.hxx b/i18npool/inc/collator_unicode.hxx index e8257ed..c3a5491 100644 --- a/i18npool/inc/collator_unicode.hxx +++ b/i18npool/inc/collator_unicode.hxx @@ -69,7 +69,9 @@ protected: const sal_Char *implementationName; private: RuleBasedCollator *uca_base, *collator; +#ifndef DISABLE_DYNLOADING oslModule hModule; +#endif }; } } } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/source
i18npool/inc/breakiterator_unicode.hxx |7 - i18npool/source/breakiterator/breakiterator_unicode.cxx | 80 +++- 2 files changed, 41 insertions(+), 46 deletions(-) New commits: commit 9c6006b961f690728f4035c10f8b9fe9fdb6f332 Author: Michael Meeks Date: Thu Dec 20 23:04:15 2012 + fdo#58590 - cleanup and accelerate break-iterators. Doing word-count by switching per-word between two different kinds of word iterator was insanely slow. This preserves an ICU break-iterator for each type of word-breaking. diff --git a/i18npool/inc/breakiterator_unicode.hxx b/i18npool/inc/breakiterator_unicode.hxx index 26046ea..fe226d4 100644 --- a/i18npool/inc/breakiterator_unicode.hxx +++ b/i18npool/inc/breakiterator_unicode.hxx @@ -80,6 +80,7 @@ protected: rtl::OUString aICUText; UText *ut; icu::BreakIterator *aBreakIterator; +com::sun::star::lang::Locale maLocale; BI_Data() : ut(NULL) @@ -91,10 +92,10 @@ protected: utext_close(ut); } -} character, word, sentence, line, *icuBI; +} character, sentence, line, *icuBI; +BI_Data words[4]; // 4 is css::i18n::WordType enumeration size -com::sun::star::lang::Locale aLocale; -sal_Int16 aBreakType, aWordType; +sal_Int16 aBreakType; void SAL_CALL loadICUBreakIterator(const com::sun::star::lang::Locale& rLocale, sal_Int16 rBreakType, sal_Int16 rWordType, const sal_Char* name, const rtl::OUString& rText) throw(com::sun::star::uno::RuntimeException); diff --git a/i18npool/source/breakiterator/breakiterator_unicode.cxx b/i18npool/source/breakiterator/breakiterator_unicode.cxx index 242cfa6..77ca831 100644 --- a/i18npool/source/breakiterator/breakiterator_unicode.cxx +++ b/i18npool/source/breakiterator/breakiterator_unicode.cxx @@ -44,29 +44,17 @@ BreakIterator_Unicode::BreakIterator_Unicode() : cBreakIterator( "com.sun.star.i18n.BreakIterator_Unicode" ),// implementation name wordRule( "word" ), lineRule( "line" ), -result(), -character(), -word(), -sentence(), -line(), -icuBI( NULL ), -aLocale(), -aBreakType(), -aWordType() +icuBI( NULL ) { } - BreakIterator_Unicode::~BreakIterator_Unicode() { -if (icuBI && icuBI->aBreakIterator) { -delete icuBI->aBreakIterator; -icuBI->aBreakIterator=NULL; -} -if (character.aBreakIterator) delete character.aBreakIterator; -if (word.aBreakIterator) delete word.aBreakIterator; -if (sentence.aBreakIterator) delete sentence.aBreakIterator; -if (line.aBreakIterator) delete line.aBreakIterator; +delete character.aBreakIterator; +delete sentence.aBreakIterator; +delete line.aBreakIterator; +for (size_t i = 0; i < SAL_N_ELEMENTS(words); i++) +delete words[i].aBreakIterator; } /* @@ -86,26 +74,34 @@ class OOoRuleBasedBreakIterator : public RuleBasedBreakIterator { // loading ICU breakiterator on demand. void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const com::sun::star::lang::Locale& rLocale, -sal_Int16 rBreakType, sal_Int16 rWordType, const sal_Char *rule, const OUString& rText) throw(uno::RuntimeException) +sal_Int16 rBreakType, sal_Int16 nWordType, const sal_Char *rule, const OUString& rText) throw(uno::RuntimeException) { sal_Bool newBreak = sal_False; UErrorCode status = U_ZERO_ERROR; sal_Int16 breakType = 0; switch (rBreakType) { case LOAD_CHARACTER_BREAKITERATOR: icuBI=&character; breakType = 3; break; -case LOAD_WORD_BREAKITERATOR: icuBI=&word; -switch (rWordType) { -case WordType::ANYWORD_IGNOREWHITESPACES: breakType = 0; rule=wordRule = "edit_word"; break; -case WordType::DICTIONARY_WORD: breakType = 1; rule=wordRule = "dict_word"; break; -case WordType::WORD_COUNT: breakType = 2; rule=wordRule = "count_word"; break; +case LOAD_WORD_BREAKITERATOR: +assert (nWordType >= 0 && nWordType<= WordType::WORD_COUNT); +icuBI=&words[nWordType]; +switch (nWordType) { +case WordType::ANY_WORD: break; // odd but previous behavior +case WordType::ANYWORD_IGNOREWHITESPACES: +breakType = 0; rule = wordRule = "edit_word"; break; +case WordType::DICTIONARY_WORD: +breakType = 1; rule = wordRule = "dict_word"; break; +default: +case WordType::WORD_COUNT: +breakType = 2; rule = wordRule = "count_word"; break; } break; case LOAD_SENTENCE_BREAKITERATOR: icuBI=&sentence; breakType = 5; break; case LOAD_LINE_BREAKITERATOR: icuBI=&line; breakType = 4; break; } -if (!icuBI->aBreakIterator || rWordType != aWordType || -rLocale.Language != aLocale.La
[Libreoffice-commits] .: i18npool/inc i18npool/source
i18npool/inc/i18npool/lang.h|2 ++ i18npool/source/isolang/isolang.cxx |2 ++ 2 files changed, 4 insertions(+) New commits: commit 09bc1464ec9dde61e69cca393e65e72143bdd383 Author: Eike Rathke Date: Thu Dec 13 13:45:14 2012 +0100 introduced [mul] multiple and [und] undetermined language codes Various places use an empty locale or string to indicate different meanings and/or variants of "this is not a real locale but I didn't know what to use else" or abuse LANGUAGE_DONTKNOW in one or the other way. In preparation of changing that awkward situation now offer the ISO 639 codes for multiple languages [mul] and language undetermined [und], mapping to LANGUAGE_MULTIPLE and LANGUAGE_UNDETERMINED. Change-Id: I687de23ffc00a9a056f2837b024e0a62658e3df2 diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index cf4ec6b..932f92b 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -566,6 +566,8 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_YOMBE 0x0684 #define LANGUAGE_USER_YOMBE_CONGO 0x8284 /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_USER_YOMBE)) */ #define LANGUAGE_USER_SIDAMA0x0685 +#define LANGUAGE_MULTIPLE 0xFFEF /* multiple languages, primary 0x3ef, sub 0x3f */ +#define LANGUAGE_UNDETERMINED 0xFFF0 /* undetermined language, primary 0x3f0, sub 0x3f */ #define LANGUAGE_USER_SYSTEM_CONFIG 0xFFFE /* not a locale, to be used only in configuration context to obtain system default, primary 0x3fe, sub 0x3f */ #endif /* INCLUDED_I18NPOOL_LANG_H */ diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 439590a..bbe3e0f 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -511,6 +511,8 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_YOMBE, "yom", "CD" }, { LANGUAGE_USER_YOMBE_CONGO, "yom", "CG" }, { LANGUAGE_USER_SIDAMA,"sid", "ET" }, +{ LANGUAGE_MULTIPLE, "mul", "" }, // multiple languages, many languages are used +{ LANGUAGE_UNDETERMINED, "und", "" }, // undetermined language, language cannot be identified { LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information { LANGUAGE_DONTKNOW,"", "" }// marks end of table }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/source l10ntools/source scp2/source solenv/inc svtools/source
i18npool/inc/i18npool/lang.h |1 + i18npool/source/isolang/isolang.cxx |1 + l10ntools/source/ulfconv/msi-encodinglist.txt |1 + scp2/source/ooo/module_helppack.ulf |6 ++ scp2/source/ooo/module_langpack.ulf |6 ++ solenv/inc/langlist.mk|1 + svtools/source/misc/langtab.src |1 + 7 files changed, 17 insertions(+) New commits: commit 14569b316aec7b778caeeb55cba21af023dc4780 Author: Andras Timar Date: Fri Nov 30 14:33:35 2012 +0100 add Sidama (sid) language Change-Id: I7c7fb38d7df5aecda8e81443aa7045479e0efceb diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index 2114fc6..cf4ec6b 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -565,6 +565,7 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_YAKA 0x0683 #define LANGUAGE_USER_YOMBE 0x0684 #define LANGUAGE_USER_YOMBE_CONGO 0x8284 /* makeLangID( 0x20, getPrimaryLanguage( LANGUAGE_USER_YOMBE)) */ +#define LANGUAGE_USER_SIDAMA0x0685 #define LANGUAGE_USER_SYSTEM_CONFIG 0xFFFE /* not a locale, to be used only in configuration context to obtain system default, primary 0x3fe, sub 0x3f */ #endif /* INCLUDED_I18NPOOL_LANG_H */ diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index ea2279b..439590a 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -510,6 +510,7 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_YAKA, "iyx", "CG" }, { LANGUAGE_USER_YOMBE, "yom", "CD" }, { LANGUAGE_USER_YOMBE_CONGO, "yom", "CG" }, +{ LANGUAGE_USER_SIDAMA,"sid", "ET" }, { LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information { LANGUAGE_DONTKNOW,"", "" }// marks end of table }; diff --git a/l10ntools/source/ulfconv/msi-encodinglist.txt b/l10ntools/source/ulfconv/msi-encodinglist.txt index 113f4a4..7d88f08 100644 --- a/l10ntools/source/ulfconv/msi-encodinglist.txt +++ b/l10ntools/source/ulfconv/msi-encodinglist.txt @@ -134,6 +134,7 @@ sc 0 3047 sd 0 1113 # Sindhi sh 0 2074 # Serbian Latin si 0 2133 +sid 0 1669 # Sidama, fake LCID sk 0 1051 # Slovak sl 0 1060 # Slovenian sq 0 1052 # Albanian diff --git a/scp2/source/ooo/module_helppack.ulf b/scp2/source/ooo/module_helppack.ulf index 269054e..fd0e144 100644 --- a/scp2/source/ooo/module_helppack.ulf +++ b/scp2/source/ooo/module_helppack.ulf @@ -673,6 +673,12 @@ en-US = "Telugu" [STR_DESC_MODULE_HELPPACK_TE] en-US = "Installs Telugu help in %PRODUCTNAME %PRODUCTVERSION" +[STR_NAME_MODULE_HELPPACK_SID] +en-US = "Sidama" + +[STR_DESC_MODULE_HELPPACK_SID] +en-US = "Installs Sidama help in %PRODUCTNAME %PRODUCTVERSION" + [STR_NAME_MODULE_HELPPACK_QTZ] en-US = "KeyID" diff --git a/scp2/source/ooo/module_langpack.ulf b/scp2/source/ooo/module_langpack.ulf index d321988..e8f25e6 100644 --- a/scp2/source/ooo/module_langpack.ulf +++ b/scp2/source/ooo/module_langpack.ulf @@ -685,6 +685,12 @@ en-US = "Amharic" [STR_DESC_MODULE_LANGPACK_AM] en-US = "Installs the Amharic user interface" +[STR_NAME_MODULE_LANGPACK_SID] +en-US = "Sidama" + +[STR_DESC_MODULE_LANGPACK_SID] +en-US = "Installs the Sidama user interface" + [STR_NAME_MODULE_LANGPACK_QTZ] en-US = "KeyID" diff --git a/solenv/inc/langlist.mk b/solenv/inc/langlist.mk index 3f81446..9c28a90 100644 --- a/solenv/inc/langlist.mk +++ b/solenv/inc/langlist.mk @@ -110,6 +110,7 @@ sat \ sd \ sh \ si \ +sid \ sk \ sl \ sq \ diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index 1f1a73e..316b3d6 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -156,6 +156,7 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Serbian Latin (Serbia)" ; LANGUAGE_USER_SERBIAN_LATIN_SERBIA ; > ; < "Serbian Cyrillic (Montenegro)" ; LANGUAGE_USER_SERBIAN_CYRILLIC_MONTENEGRO ; > ; < "Serbian Latin (Montenegro)" ; LANGUAGE_USER_SERBIAN_LATIN_MONTENEGRO ; > ; +< "Sidama" ; LANGUAGE_USER_SIDAMA ; > ; < "Sindhi" ; LANGUAGE_SINDHI ; > ; < "Slovak" ; LANGUAGE_SLOVAK ; > ; < "Slovenian" ; LANGUAGE_SLOVENIAN ; > ; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/source
i18npool/inc/i18npool/mslangid.hxx | 10 +- i18npool/source/isolang/mslangid.cxx |4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) New commits: commit b1d3900317bba8f3d0ab773e517a40b40934e0f7 Author: Eike Rathke Date: Tue Nov 27 20:32:10 2012 +0100 do not resolve LANGUAGE_NONE in MsLangId::getRealLanguage() LANGUAGE_NONE was resolved to UI language, don't do that, if desired use LANGUAGE_HID_HUMAN_INTERFACE_DEVICE instead. Change-Id: I4a45653c9dfef7cc2cddb941ea1174189708cea2 diff --git a/i18npool/inc/i18npool/mslangid.hxx b/i18npool/inc/i18npool/mslangid.hxx index eba15ad..c1682c3 100644 --- a/i18npool/inc/i18npool/mslangid.hxx +++ b/i18npool/inc/i18npool/mslangid.hxx @@ -68,11 +68,11 @@ public: application's configuration. @returns -case LANGUAGE_PROCESS_OR_USER_DEFAULT : configured or system language -case LANGUAGE_SYSTEM_DEFAULT : configured or system language -case LANGUAGE_SYSTEM : configured or system language -case LANGUAGE_NONE :configured or system UI language -case LANGUAGE_DONTKNOW :LANGUAGE_ENGLISH_US +case LANGUAGE_PROCESS_OR_USER_DEFAULT : configured or system language +case LANGUAGE_SYSTEM_DEFAULT : configured or system language +case LANGUAGE_SYSTEM : configured or system language +case LANGUAGE_HID_HUMAN_INTERFACE_DEVICE : configured or system UI language +case LANGUAGE_DONTKNOW :LANGUAGE_ENGLISH_US else: nLang In case the configured language is LANGUAGE_SYSTEM, which is also diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx index 405ce29..2395d35 100644 --- a/i18npool/source/isolang/mslangid.cxx +++ b/i18npool/source/isolang/mslangid.cxx @@ -90,7 +90,7 @@ LanguageType MsLangId::getRealLanguage( LanguageType nLang ) else nLang = nConfiguredSystemLanguage; break; -case LANGUAGE_NONE : +case LANGUAGE_HID_HUMAN_INTERFACE_DEVICE : if (nConfiguredSystemUILanguage == LANGUAGE_SYSTEM) nLang = getSystemUILanguage(); else @@ -161,7 +161,7 @@ void MsLangId::Conversion::convertLanguageToLocale( LanguageType nLang, else { // Still resolve LANGUAGE_DONTKNOW if resolving is not requested, -// but not LANGUAGE_NONE or others. +// but not LANGUAGE_SYSTEM or others. if (bResolveSystem || nLang == LANGUAGE_DONTKNOW) nLang = MsLangId::getRealLanguage( nLang); convertLanguageToLocale( nLang, aLocale); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/source
i18npool/inc/i18npool/languagetag.hxx |6 ++ i18npool/source/languagetag/languagetag.cxx | 13 + 2 files changed, 19 insertions(+) New commits: commit 6a05d3f816df5cbcaa88bed5bce445c6a78f9ca6 Author: Eike Rathke Date: Wed Nov 21 19:11:56 2012 +0100 added operator==() and operator!=() to LanguageTag Change-Id: I4f339ecaeb147a05f8882065e859902f8c14ac47 diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx index c5ce232..cefb0de 100644 --- a/i18npool/inc/i18npool/languagetag.hxx +++ b/i18npool/inc/i18npool/languagetag.hxx @@ -196,6 +196,12 @@ public: */ LanguageTag & makeFallback(); +/* Test equality of two LangageTag. */ +booloperator==( const LanguageTag & rLanguageTag ) const; + +/* Test inequality of two LangageTag. */ +booloperator!=( const LanguageTag & rLanguageTag ) const; + private: enum Decision diff --git a/i18npool/source/languagetag/languagetag.cxx b/i18npool/source/languagetag/languagetag.cxx index 07b494f..cc9fc55 100644 --- a/i18npool/source/languagetag/languagetag.cxx +++ b/i18npool/source/languagetag/languagetag.cxx @@ -839,4 +839,17 @@ LanguageTag & LanguageTag::makeFallback() } +bool LanguageTag::operator==( const LanguageTag & rLanguageTag ) const +{ +// Compare full language tag strings but SYSTEM unresolved. +return getBcp47( false) == rLanguageTag.getBcp47( false); +} + + +bool LanguageTag::operator!=( const LanguageTag & rLanguageTag ) const +{ +return !operator==( rLanguageTag); +} + + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/source
i18npool/inc/i18npool/languagetag.hxx | 10 ++ i18npool/inc/i18npool/mslangid.hxx | 11 +-- i18npool/source/languagetag/languagetag.cxx | 43 3 files changed, 56 insertions(+), 8 deletions(-) New commits: commit 15e274a37c75eedb6e2fae07e4689cef67cdf2d7 Author: Eike Rathke Date: Fri Nov 16 22:31:09 2012 +0100 added LanguageTag::makeFallback() Change-Id: I6a89dd2c5e34035ac1e6c9b7e4723d881c5ceaa9 diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx index 552110d..c5ce232 100644 --- a/i18npool/inc/i18npool/languagetag.hxx +++ b/i18npool/inc/i18npool/languagetag.hxx @@ -187,6 +187,15 @@ public: /** Reset with LanguageType MS-LangID. */ voidreset( LanguageType nLanguage ); + +/** Fall back to a known locale. + +If the current tag does not represent a known (by us) locale, fall back +to the most likely locale possible known. +If the current tag is known, no change occurs. + */ +LanguageTag & makeFallback(); + private: enum Decision @@ -213,6 +222,7 @@ private: mutable boolmbCachedLanguage: 1; mutable boolmbCachedScript : 1; mutable boolmbCachedCountry : 1; +boolmbIsFallback: 1; voidconvertLocaleToBcp47(); voidconvertLocaleToLang(); diff --git a/i18npool/inc/i18npool/mslangid.hxx b/i18npool/inc/i18npool/mslangid.hxx index 574a07d..120d9c6 100644 --- a/i18npool/inc/i18npool/mslangid.hxx +++ b/i18npool/inc/i18npool/mslangid.hxx @@ -149,6 +149,14 @@ private: const ::com::sun::star::lang::Locale & rLocale ); +/** To be used only by LanguageTag. */ +I18NISOLANG_DLLPRIVATE static LanguageType lookupFallbackLanguage( LanguageType nLang ); + +/** To be used only by LanguageTag. */ +I18NISOLANG_DLLPRIVATE static ::com::sun::star::lang::Locale lookupFallbackLocale( +const ::com::sun::star::lang::Locale & rLocale ); + + #if I18NPOOL_FORCE_LANGUAGETAG public: #endif @@ -317,12 +325,9 @@ private: I18NISOLANG_DLLPRIVATE static inline LanguageType simplifySystemLanguages( LanguageType nLang ); // Several locale lookups with fall-back -I18NISOLANG_DLLPRIVATE static LanguageType lookupFallbackLanguage( LanguageType nLang ); I18NISOLANG_DLLPRIVATE static LanguageType lookupFallbackLanguage( const ::com::sun::star::lang::Locale & rLocale ); I18NISOLANG_DLLPRIVATE static ::com::sun::star::lang::Locale lookupFallbackLocale( LanguageType nLang ); -I18NISOLANG_DLLPRIVATE static ::com::sun::star::lang::Locale lookupFallbackLocale( -const ::com::sun::star::lang::Locale & rLocale ); }; diff --git a/i18npool/source/languagetag/languagetag.cxx b/i18npool/source/languagetag/languagetag.cxx index f863ae2..1dcc6bf 100644 --- a/i18npool/source/languagetag/languagetag.cxx +++ b/i18npool/source/languagetag/languagetag.cxx @@ -162,7 +162,8 @@ LanguageTag::LanguageTag( const rtl::OUString & rBcp47LanguageTag, bool bCanonic mbInitializedLangID( false), mbCachedLanguage( false), mbCachedScript( false), -mbCachedCountry( false) +mbCachedCountry( false), +mbIsFallback( false) { theDataRef::get().incRef(); @@ -185,7 +186,8 @@ LanguageTag::LanguageTag( const com::sun::star::lang::Locale & rLocale ) mbInitializedLangID( false), mbCachedLanguage( false), mbCachedScript( false), -mbCachedCountry( false) +mbCachedCountry( false), +mbIsFallback( false) { theDataRef::get().incRef(); } @@ -204,7 +206,8 @@ LanguageTag::LanguageTag( LanguageType nLanguage ) mbInitializedLangID( !mbSystemLocale), mbCachedLanguage( false), mbCachedScript( false), -mbCachedCountry( false) +mbCachedCountry( false), +mbIsFallback( false) { theDataRef::get().incRef(); } @@ -224,7 +227,8 @@ LanguageTag::LanguageTag( const rtl::OUString& rLanguage, const rtl::OUString& r mbInitializedLangID( false), mbCachedLanguage( false), mbCachedScript( false), -mbCachedCountry( false) +mbCachedCountry( false), +mbIsFallback( false) { theDataRef::get().incRef(); } @@ -249,7 +253,8 @@ LanguageTag::LanguageTag( const LanguageTag & rLanguageTag ) mbInitializedLangID( rLanguageTag.mbInitializedLangID), mbCachedLanguage( rLanguageTag.mbCachedLanguage), mbCachedScript( rLanguageTag.mbCachedScript), -mbCachedCountry( rLanguageTag.mbCachedCountry) +mbCachedCountry( rLanguageTag.mbCachedCountry), +mbIsFallback( rLanguageTag.mbIsFallback) { theDataRef::get().incRef(); } @@ -276,6 +281,7 @@ LanguageTag& LanguageTag::op
[Libreoffice-commits] .: i18npool/inc i18npool/source
i18npool/inc/i18npool/languagetag.hxx | 15 +++ i18npool/source/languagetag/languagetag.cxx | 14 ++ 2 files changed, 29 insertions(+) New commits: commit 3eb4304af99265c898835cd307ba7d689038996b Author: Eike Rathke Date: Fri Nov 16 18:44:19 2012 +0100 added LanguageTag::getIsoLanguageCountry() method Change-Id: I8917c2958f021f11933d9da7fec8ef01609387c8 diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx index 5666fd1..552110d 100644 --- a/i18npool/inc/i18npool/languagetag.hxx +++ b/i18npool/inc/i18npool/languagetag.hxx @@ -95,6 +95,21 @@ public: */ LanguageTypegetLanguageType( bool bResolveSystem = true ) const; +/** Obtain ISO strings for language and country. + +This is a convenience method for places that so far use only language and +country to replace the MsLangId::convert...IsoNames...() calls. Avoid +use in new code. + +ATTENTION! May return empty strings if the language tag is not +expressable in valid ISO codes! + +@see isIsoLocale() + +Always resolves an empty tag to the system locale. + */ +voidgetIsoLanguageCountry( rtl::OUString& rLanguage, rtl::OUString& rCountry ) const; + /** Get ISO 639 language code, or BCP 47 language. Always resolves an empty tag to the system locale. diff --git a/i18npool/source/languagetag/languagetag.cxx b/i18npool/source/languagetag/languagetag.cxx index 3e655ee..f863ae2 100644 --- a/i18npool/source/languagetag/languagetag.cxx +++ b/i18npool/source/languagetag/languagetag.cxx @@ -618,6 +618,20 @@ LanguageType LanguageTag::getLanguageType( bool bResolveSystem ) const } +void LanguageTag::getIsoLanguageCountry( rtl::OUString& rLanguage, rtl::OUString& rCountry ) const +{ +if (!isIsoLocale()) +{ +rLanguage = OUString(); +rCountry = OUString(); +return; +} +// After isIsoLocale() it's safe to call getLanguage() for ISO code. +rLanguage = getLanguage(); +rCountry = getCountry(); +} + + namespace { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/qa i18npool/source
i18npool/inc/i18npool/languagetag.hxx | 12 + i18npool/qa/cppunit/test_languagetag.cxx| 30 ++ i18npool/source/languagetag/languagetag.cxx | 58 3 files changed, 100 insertions(+) New commits: commit 2eb9470c14b665f69c87035fe33a71860fcf2600 Author: Eike Rathke Date: Fri Nov 16 14:33:12 2012 +0100 added LanguageTag::reset() methods Change-Id: Id78a989ab981d658dd8f331b030e00ce201c8bc9 diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx index aaf4ca3..5666fd1 100644 --- a/i18npool/inc/i18npool/languagetag.hxx +++ b/i18npool/inc/i18npool/languagetag.hxx @@ -162,6 +162,16 @@ public: */ boolisSystemLocale() const; + +/** Reset with existing BCP 47 language tag string. See ctor. */ +voidreset( const rtl::OUString & rBcp47LanguageTag, bool bCanonicalize = false ); + +/** Reset with Locale. */ +voidreset( const com::sun::star::lang::Locale & rLocale ); + +/** Reset with LanguageType MS-LangID. */ +voidreset( LanguageType nLanguage ); + private: enum Decision @@ -202,6 +212,8 @@ private: rtl::OUString getScriptFromLangtag() const; rtl::OUString getRegionFromLangtag() const; +voidresetVars(); + static bool isIsoLanguage( const rtl::OUString& rLanguage ); static bool isIsoScript( const rtl::OUString& rScript ); static bool isIsoCountry( const rtl::OUString& rRegion ); diff --git a/i18npool/qa/cppunit/test_languagetag.cxx b/i18npool/qa/cppunit/test_languagetag.cxx index 3bb7163..deaeecd 100644 --- a/i18npool/qa/cppunit/test_languagetag.cxx +++ b/i18npool/qa/cppunit/test_languagetag.cxx @@ -165,6 +165,36 @@ void TestLanguageTag::testAllTags() CPPUNIT_ASSERT( de_DE.getLanguageType() == LANGUAGE_GERMAN ); } +// test reset() methods +{ +LanguageTag aTag( LANGUAGE_DONTKNOW ); +lang::Locale aLocale; + +aTag.reset( LANGUAGE_GERMAN ); +aLocale = aTag.getLocale(); +CPPUNIT_ASSERT( aTag.getBcp47() == "de-DE" ); +CPPUNIT_ASSERT( aLocale.Language == "de" ); +CPPUNIT_ASSERT( aLocale.Country == "DE" ); +CPPUNIT_ASSERT( aLocale.Variant == "" ); +CPPUNIT_ASSERT( aTag.getLanguageType() == LANGUAGE_GERMAN ); + +aTag.reset( "en-US" ); +aLocale = aTag.getLocale(); +CPPUNIT_ASSERT( aTag.getBcp47() == "en-US" ); +CPPUNIT_ASSERT( aLocale.Language == "en" ); +CPPUNIT_ASSERT( aLocale.Country == "US" ); +CPPUNIT_ASSERT( aLocale.Variant == "" ); +CPPUNIT_ASSERT( aTag.getLanguageType() == LANGUAGE_ENGLISH_US ); + +aTag.reset( lang::Locale( "de", "DE", "" ) ); +aLocale = aTag.getLocale(); +CPPUNIT_ASSERT( aTag.getBcp47() == "de-DE" ); +CPPUNIT_ASSERT( aLocale.Language == "de" ); +CPPUNIT_ASSERT( aLocale.Country == "DE" ); +CPPUNIT_ASSERT( aLocale.Variant == "" ); +CPPUNIT_ASSERT( aTag.getLanguageType() == LANGUAGE_GERMAN ); +} + { OUString s_uab( "unreg-and-bad" ); LanguageTag uab( s_uab, true ); diff --git a/i18npool/source/languagetag/languagetag.cxx b/i18npool/source/languagetag/languagetag.cxx index ad8b9c1..3e655ee 100644 --- a/i18npool/source/languagetag/languagetag.cxx +++ b/i18npool/source/languagetag/languagetag.cxx @@ -288,6 +288,64 @@ LanguageTag::~LanguageTag() } +void LanguageTag::resetVars() +{ +lt_tag_unref( MPLANGTAG); +mpImplLangtag = NULL; + +maLocale= lang::Locale(); +if (!maBcp47.isEmpty()) +maBcp47 = OUString(); +if (!maCachedLanguage.isEmpty()) +maCachedLanguage= OUString(); +if (!maCachedScript.isEmpty()) +maCachedScript = OUString(); +if (!maCachedCountry.isEmpty()) +maCachedCountry = OUString(); +mnLangID= LANGUAGE_DONTKNOW; +meIsValid = DECISION_DONTKNOW; +meIsIsoLocale = DECISION_DONTKNOW; +meIsIsoODF = DECISION_DONTKNOW; +mbSystemLocale = true; +mbInitializedBcp47 = false; +mbInitializedLocale = false; +mbInitializedLangID = false; +mbCachedLanguage= false; +mbCachedScript = false; +mbCachedCountry = false; +} + + +void LanguageTag::reset( const rtl::OUString & rBcp47LanguageTag, bool bCanonicalize ) +{ +resetVars(); +maBcp47 = rBcp47LanguageTag; +mbSystemLocale = rBcp47LanguageTag.isEmpty(); +mbInitializedBcp47 = !mbSystemLocale; + +if (bCanonicalize) +canonicalize(); +} + + +void LanguageTag::reset( const com::sun::star::lang::Locale & rLocale ) +{ +resetVars(); +maLocale= rLocale; +mbSystemLocale = rLocale.Language.isEmpty(); +mbInitializedLocale = !mbSystemLocale; +} + + +void LanguageTag:
[Libreoffice-commits] .: i18npool/inc i18npool/source
i18npool/inc/i18npool/languagetag.hxx |4 +-- i18npool/source/languagetag/languagetag.cxx | 32 ++-- 2 files changed, 23 insertions(+), 13 deletions(-) New commits: commit 0d0c51d155dfc6a51a5da3c4d61ab6f40c5e0e5f Author: Eike Rathke Date: Fri Nov 16 12:07:53 2012 +0100 return const reference for getBcp47() and getLocale() And use the rtl::Static pattern for statics. Change-Id: I80d8cc0a4a35771f86bec27edf41224d71cdea14 diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx index abc7ed1..aaf4ca3 100644 --- a/i18npool/inc/i18npool/languagetag.hxx +++ b/i18npool/inc/i18npool/languagetag.hxx @@ -68,7 +68,7 @@ public: locale to the real locale used. If FALSE, return an empty OUString for such a tag. */ -rtl::OUString getBcp47( bool bResolveSystem = true ) const; +const rtl::OUString & getBcp47( bool bResolveSystem = true ) const; /** Obtain language tag as Locale. @@ -84,7 +84,7 @@ public: locale to the real locale used. If FALSE, return an empty Locale for such a tag. */ -com::sun::star::lang::LocalegetLocale( bool bResolveSystem = true ) const; +const com::sun::star::lang::Locale &getLocale( bool bResolveSystem = true ) const; /** Obtain mapping to MS-LangID. diff --git a/i18npool/source/languagetag/languagetag.cxx b/i18npool/source/languagetag/languagetag.cxx index 2b3dbc4..ad8b9c1 100644 --- a/i18npool/source/languagetag/languagetag.cxx +++ b/i18npool/source/languagetag/languagetag.cxx @@ -12,6 +12,7 @@ #include #include #include +#include //#define erDEBUG @@ -42,6 +43,13 @@ using namespace com::sun::star; #define ISO639_LANGUAGE_TAG "qlt" +// "statics" to be returned as const reference to an empty locale and string. +namespace { +struct theEmptyLocale : public rtl::Static< lang::Locale, theEmptyLocale > {}; +struct theEmptyBcp47 : public rtl::Static< OUString, theEmptyBcp47 > {}; +} + + /** A reference holder for liblangtag data de/initialization, one static instance. Currently implemented such that the first "ref" inits and dtor (our library deinitialized) tears down. @@ -71,7 +79,9 @@ private: void teardown(); }; -static LiblantagDataRef theDataRef; +namespace { +struct theDataRef : public rtl::Static< LiblantagDataRef, theDataRef > {}; +} LiblantagDataRef::LiblantagDataRef() : @@ -154,7 +164,7 @@ LanguageTag::LanguageTag( const rtl::OUString & rBcp47LanguageTag, bool bCanonic mbCachedScript( false), mbCachedCountry( false) { -theDataRef.incRef(); +theDataRef::get().incRef(); if (bCanonicalize) canonicalize(); @@ -177,7 +187,7 @@ LanguageTag::LanguageTag( const com::sun::star::lang::Locale & rLocale ) mbCachedScript( false), mbCachedCountry( false) { -theDataRef.incRef(); +theDataRef::get().incRef(); } @@ -196,7 +206,7 @@ LanguageTag::LanguageTag( LanguageType nLanguage ) mbCachedScript( false), mbCachedCountry( false) { -theDataRef.incRef(); +theDataRef::get().incRef(); } @@ -216,7 +226,7 @@ LanguageTag::LanguageTag( const rtl::OUString& rLanguage, const rtl::OUString& r mbCachedScript( false), mbCachedCountry( false) { -theDataRef.incRef(); +theDataRef::get().incRef(); } @@ -241,7 +251,7 @@ LanguageTag::LanguageTag( const LanguageTag & rLanguageTag ) mbCachedScript( rLanguageTag.mbCachedScript), mbCachedCountry( rLanguageTag.mbCachedCountry) { -theDataRef.incRef(); +theDataRef::get().incRef(); } @@ -274,7 +284,7 @@ LanguageTag::~LanguageTag() { lt_tag_unref( MPLANGTAG); -theDataRef.decRef(); +theDataRef::get().decRef(); } @@ -448,10 +458,10 @@ void LanguageTag::convertLangToBcp47() } -rtl::OUString LanguageTag::getBcp47( bool bResolveSystem ) const +const rtl::OUString & LanguageTag::getBcp47( bool bResolveSystem ) const { if (!bResolveSystem && mbSystemLocale) -return OUString(); +return theEmptyBcp47::get(); if (!mbInitializedBcp47) { if (mbInitializedLocale) @@ -520,10 +530,10 @@ rtl::OUString LanguageTag::getRegionFromLangtag() const } -com::sun::star::lang::Locale LanguageTag::getLocale( bool bResolveSystem ) const +const com::sun::star::lang::Locale & LanguageTag::getLocale( bool bResolveSystem ) const { if (!bResolveSystem && mbSystemLocale) -return lang::Locale(); +return theEmptyLocale::get(); if (!mbInitializedLocale) { if (mbInitializedBcp47) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/source
i18npool/inc/i18npool/languagetag.hxx | 63 +++--- i18npool/source/languagetag/languagetag.cxx | 124 +++- 2 files changed, 123 insertions(+), 64 deletions(-) New commits: commit 4e9bdee0bbef65d2419f36e504292e3341a81004 Author: Eike Rathke Date: Thu Nov 15 22:13:19 2012 +0100 LanguageTag getters with optional bResolveSystem parameter Added bResolveSystem=true parameter to getBcp47(), getLocale() and getLanguageType(). Other get...() and is...() methods now always resolve to system locale. Change-Id: I2d9718b8bd36aac5e047afd6921d462e52c6a235 diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx index 7475cf0..abc7ed1 100644 --- a/i18npool/inc/i18npool/languagetag.hxx +++ b/i18npool/inc/i18npool/languagetag.hxx @@ -61,8 +61,14 @@ public: ~LanguageTag(); LanguageTag& operator=( const LanguageTag & rLanguageTag ); -/** Obtain BCP 47 language tag. */ -rtl::OUString getBcp47() const; +/** Obtain BCP 47 language tag. + +@param bResolveSystem + If TRUE, resolve an empty language tag denoting the system + locale to the real locale used. + If FALSE, return an empty OUString for such a tag. + */ +rtl::OUString getBcp47( bool bResolveSystem = true ) const; /** Obtain language tag as Locale. @@ -72,40 +78,67 @@ public: the entire BCP 47 language tag in the Variant field. The Country field contains the corresponding ISO 3166 country code _if_ there is one, or otherwise is empty. + +@param bResolveSystem + If TRUE, resolve an empty language tag denoting the system + locale to the real locale used. + If FALSE, return an empty Locale for such a tag. */ -com::sun::star::lang::LocalegetLocale() const; +com::sun::star::lang::LocalegetLocale( bool bResolveSystem = true ) const; -/** Obtain mapping to MS-LangID. */ -LanguageTypegetLanguageType() const; +/** Obtain mapping to MS-LangID. + +@param bResolveSystem + If TRUE, resolve an empty language tag denoting the system + locale to the real locale used. + If FALSE, return LANGUAGE_SYSTEM for such a tag. + */ +LanguageTypegetLanguageType( bool bResolveSystem = true ) const; -/** Get ISO 639 language code, or BCP 47 language. */ +/** Get ISO 639 language code, or BCP 47 language. + +Always resolves an empty tag to the system locale. + */ rtl::OUString getLanguage() const; /** Get ISO 15924 script code, if not the default script according to BCP 47. For default script an empty string is returned. + +Always resolves an empty tag to the system locale. */ rtl::OUString getScript() const; /** Get combined language and script code, separated by '-' if non-default script, if default script only language. + +Always resolves an empty tag to the system locale. */ rtl::OUString getLanguageAndScript() const; /** Get ISO 3166 country alpha code. Empty if the BCP 47 tags denote a region not expressable as 2 character country code. + +Always resolves an empty tag to the system locale. */ rtl::OUString getCountry() const; /** Get BCP 47 region tag, which may be an ISO 3166 country alpha code or any other BCP 47 region tag. + +Always resolves an empty tag to the system locale. */ rtl::OUString getRegion() const; /** If language tag is a locale that can be expressed using only ISO 639 language codes and ISO 3166 country codes, thus is convertible to a -conforming Locale struct without using extension mechanisms. Note that -an empty language tag or empty Locale::Language field or LanguageType -LANGUAGE_SYSTEM is treated as a valid ISO locale. +conforming Locale struct without using extension mechanisms. + +Note that an empty language tag or empty Locale::Language field or +LanguageType LANGUAGE_SYSTEM could be treated as a valid ISO locale in +some context, but here is not. If you want that ask for +aTag.isSystemLocale() || aTag.isIsoLocale() + +Always resolves an empty tag to the system locale. */ boolisIsoLocale() const; @@ -114,12 +147,21 @@ public: thus can be stored in an ODF document using only fo:language, fo:script and fo:country attributes. If this is FALSE, the locale must be stored as a <*:rfc-language-tag> element. + +Always resolves an empty tag to the system locale. */ boolisIsoODF() c
[Libreoffice-commits] .: i18npool/inc
i18npool/inc/i18npool/mslangid.hxx | 42 +++-- 1 file changed, 40 insertions(+), 2 deletions(-) New commits: commit cfe101e31c16984d1061d8aa1d4cfdc07e33471f Author: Eike Rathke Date: Fri Nov 9 18:45:29 2012 +0100 LanguageTag conversion helper define Prepared private methods to force compiler errors during conversion to LanguageTag. Commented current usage on some methods. Change-Id: If365e24c7cf06bdf33ecd0bc15ddbfe33cd347c0 diff --git a/i18npool/inc/i18npool/mslangid.hxx b/i18npool/inc/i18npool/mslangid.hxx index 9c9cbdb..574a07d 100644 --- a/i18npool/inc/i18npool/mslangid.hxx +++ b/i18npool/inc/i18npool/mslangid.hxx @@ -26,11 +26,20 @@ #include "i18npool/lang.h" #include +// 0 := normal usage +// 1 := force LanguageTag and make all conversion functions private to make the +// compiler bail out +#define I18NPOOL_FORCE_LANGUAGETAG 0 /** Methods related to Microsoft language IDs. For details about MS-LANGIDs please see lang.h */ class I18NISOLANG_DLLPUBLIC MsLangId { + +#if I18NPOOL_FORCE_LANGUAGETAG +friend class LanguageTag; +#endif + public: /// Create a LangID from a primary and a sublanguage. @@ -84,6 +93,10 @@ public: static LanguageType getRealLanguage( LanguageType nLang ); +#if I18NPOOL_FORCE_LANGUAGETAG +private: +#endif + /** @short: Convert a LanguageType to a Locale, resolving LANGUAGE_SYSTEM. @ATTENTION: A round trip convertLanguageToLocale( @@ -136,6 +149,12 @@ public: const ::com::sun::star::lang::Locale & rLocale ); +#if I18NPOOL_FORCE_LANGUAGETAG +public: +#endif +// TODO: refactor to LanguageTag? Used only in +// i18npool/source/localedata/localedata.cxx + /** Get fall-back Locale for Locale with handling of an empty language name designating the SYSTEM language. Returns the same Locale if an exact match was found. @@ -143,6 +162,10 @@ public: static ::com::sun::star::lang::Locale getFallbackLocale( const ::com::sun::star::lang::Locale & rLocale ); +#if I18NPOOL_FORCE_LANGUAGETAG +private: +#endif + // - // - ConvertLanguageToIsoNames - // - @@ -166,8 +189,23 @@ public: const rtl::OString& rCountry ); static LanguageType convertIsoStringToLanguage( const rtl::OUString& rString, sal_Unicode cSep = '-' ); -static LanguageType convertUnxByteStringToLanguage( -const rtl::OString& rString ); + +#if I18NPOOL_FORCE_LANGUAGETAG +public: +#endif +// TODO: refactor to LanguageTag, used only in +// i18npool/source/isolang/inunx.cxx to convert Unix locale string + +static LanguageType convertUnxByteStringToLanguage( const rtl::OString& rString ); + +#if I18NPOOL_FORCE_LANGUAGETAG +private: +#endif + + +#if I18NPOOL_FORCE_LANGUAGETAG +public: +#endif static LanguageType resolveSystemLanguageByScriptType( LanguageType nLang, sal_Int16 nType ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/source svtools/source
i18npool/inc/i18npool/lang.h|9 + i18npool/source/isolang/isolang.cxx |9 + svtools/source/misc/langtab.src |9 + 3 files changed, 27 insertions(+) New commits: commit 112d9e66d4c81168e955178c5c35480cb6303bb2 Author: Andras Timar Date: Tue Nov 6 21:11:50 2012 +0100 fdo#56346 add a few more Uralic languages to languages dropdown Change-Id: I4adad5b494e61d033d6525a07260f7b4b8cb4e9c diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index 825efac..127fee8 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -535,6 +535,15 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_ENGLISH_MALAWI0x8809 /* makeLangID( 0x22, getPrimaryLanguage( LANGUAGE_ENGLISH_UK)) */ #define LANGUAGE_USER_ERZYA 0x066C #define LANGUAGE_USER_MARI_MEADOW 0x066D +#define LANGUAGE_USER_KHANTY0x066E +#define LANGUAGE_USER_LIVONIAN 0x066F +#define LANGUAGE_USER_MOKSHA0x0670 +#define LANGUAGE_USER_MARI_HILL 0x0671 +#define LANGUAGE_USER_NGANASAN 0x0672 +#define LANGUAGE_USER_OLONETS 0x0673 +#define LANGUAGE_USER_VEPS 0x0674 +#define LANGUAGE_USER_VORO 0x0675 +#define LANGUAGE_USER_NENETS0x0676 #define LANGUAGE_USER_PAPIAMENTU_CURACAO0x8479 /* makeLangID( 0x21, getPrimaryLanguage( LANGUAGE_PAPIAMENTU)) */ #define LANGUAGE_USER_PAPIAMENTU_BONAIRE0x8879 /* makeLangID( 0x22, getPrimaryLanguage( LANGUAGE_PAPIAMENTU)) */ #define LANGUAGE_USER_SYSTEM_CONFIG 0xFFFE /* not a locale, to be used only in configuration context to obtain system default, primary 0x3fe, sub 0x3f */ diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index af9adf7..1605d9e 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -482,6 +482,15 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_USER_PITJANTJATJARA,"pjt", "AU" }, { LANGUAGE_USER_ERZYA, "myv", "RU" }, { LANGUAGE_USER_MARI_MEADOW, "mhr", "RU" }, +{ LANGUAGE_USER_KHANTY,"kca", "RU" }, +{ LANGUAGE_USER_LIVONIAN, "liv", "RU" }, +{ LANGUAGE_USER_MOKSHA,"mdf", "RU" }, +{ LANGUAGE_USER_MARI_HILL, "mrj", "RU" }, +{ LANGUAGE_USER_NGANASAN, "nio", "RU" }, +{ LANGUAGE_USER_OLONETS, "olo", "RU" }, +{ LANGUAGE_USER_VEPS, "vep", "RU" }, +{ LANGUAGE_USER_VORO, "vro", "EE" }, +{ LANGUAGE_USER_NENETS,"yrk", "RU" }, { LANGUAGE_NONE, "zxx", "" }, // added to ISO 639-2 on 2006-01-11: Used to declare the absence of linguistic information { LANGUAGE_DONTKNOW,"", "" }// marks end of table }; diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index 12a8deb..79f8d3b 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -353,6 +353,15 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "Mari, Meadow" ; LANGUAGE_USER_MARI_MEADOW ; > ; < "Papiamento (Curaçao)" ; LANGUAGE_USER_PAPIAMENTU_CURACAO ; > ; < "Papiamento (Bonaire)" ; LANGUAGE_USER_PAPIAMENTU_BONAIRE ; > ; +< "Khanty" ; LANGUAGE_USER_KHANTY ; > ; +< "Livonian" ; LANGUAGE_USER_LIVONIAN ; > ; +< "Moksha" ; LANGUAGE_USER_MOKSHA ; > ; +< "Mari, Hill" ; LANGUAGE_USER_MARI_HILL ; > ; +< "Nganasan" ; LANGUAGE_USER_NGANASAN ; > ; +< "Olonets" ; LANGUAGE_USER_OLONETS ; > ; +< "Veps" ; LANGUAGE_USER_VEPS ; > ; +< "Võro" ; LANGUAGE_USER_VORO ; > ; +< "Nenets" ; LANGUAGE_USER_NENETS ; > ; }; }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/source unusedcode.easy
i18npool/inc/i18npool/languagetag.hxx |5 - i18npool/source/languagetag/languagetag.cxx |8 unusedcode.easy |1 - 3 files changed, 14 deletions(-) New commits: commit d4fb3b42b81a9b5a973dcd29759579593cd01f06 Author: Julien Nabet Date: Sat Oct 27 17:09:04 2012 +0200 Remove unused overrideDataPath Change-Id: I7dfaa933d918023999bfe78a497da7dbd59f7fc1 diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx index 36ab7a2..7475cf0 100644 --- a/i18npool/inc/i18npool/languagetag.hxx +++ b/i18npool/inc/i18npool/languagetag.hxx @@ -120,11 +120,6 @@ public: /** If this is a valid BCP 47 language tag. */ boolisValidBcp47() const; -/** Needed for unit test in build environment, must be called before any -LanguageTag is instanciated. - */ -static void overrideDataPath( const rtl::OUString& rPath ); - private: enum Decision diff --git a/i18npool/source/languagetag/languagetag.cxx b/i18npool/source/languagetag/languagetag.cxx index 14cad58..8e96d61 100644 --- a/i18npool/source/languagetag/languagetag.cxx +++ b/i18npool/source/languagetag/languagetag.cxx @@ -138,14 +138,6 @@ void LiblantagDataRef::setupDataPath() lt_db_set_datadir( maDataPath.getStr()); } - -// static -void LanguageTag::overrideDataPath( const rtl::OUString& rPath ) -{ -theDataRef.presetDataPath( rPath); -} - - LanguageTag::LanguageTag( const rtl::OUString & rBcp47LanguageTag, bool bCanonicalize ) : maBcp47( rBcp47LanguageTag), diff --git a/unusedcode.easy b/unusedcode.easy index 5c54e28..bb758da 100755 --- a/unusedcode.easy +++ b/unusedcode.easy @@ -1,5 +1,4 @@ FontSelectPattern::FontSelectPattern(PhysicalFontFace const&, Size const&, float, int, bool) -LanguageTag::overrideDataPath(rtl::OUString const&) RelatedMultipart::getIds() SanExtensionImpl::setCertExtn(unsigned char*, unsigned int, unsigned char*, unsigned int, unsigned char) ScFiltersTest::testColorScaleODS() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/Package_inc.mk
i18npool/Package_inc.mk |1 + i18npool/inc/i18npool/languagetag.hxx |3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) New commits: commit ba7afe4e8ebf55d35300c7fbb4cc6937798b2d60 Author: Caolán McNamara Date: Fri Aug 31 11:58:32 2012 +0100 export LanguageTag header and class Change-Id: Idaf2c48cc6f291199973fd910d3c8ddf29774c6e diff --git a/i18npool/Package_inc.mk b/i18npool/Package_inc.mk index 69eaf0c..140edc9 100644 --- a/i18npool/Package_inc.mk +++ b/i18npool/Package_inc.mk @@ -30,6 +30,7 @@ $(eval $(call gb_Package_Package,i18npool_inc,$(SRCDIR)/i18npool/inc)) $(eval $(call gb_Package_add_file,i18npool_inc,inc/i18npool/i18npooldllapi.h,i18npool/i18npooldllapi.h)) $(eval $(call gb_Package_add_file,i18npool_inc,inc/i18npool/lang.h,i18npool/lang.h)) +$(eval $(call gb_Package_add_file,i18npool_inc,inc/i18npool/languagetag.hxx,i18npool/languagetag.hxx)) $(eval $(call gb_Package_add_file,i18npool_inc,inc/i18npool/mslangid.hxx,i18npool/mslangid.hxx)) # vim: set noet sw=4 ts=4: diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx index 0066d8e..d8eb207 100644 --- a/i18npool/inc/i18npool/languagetag.hxx +++ b/i18npool/inc/i18npool/languagetag.hxx @@ -13,6 +13,7 @@ #include #include #include +#include #include @@ -23,7 +24,7 @@ const methods. Getter methods return either the original value or matching converted values. */ -class LanguageTag +class I18NISOLANG_DLLPUBLIC LanguageTag { public: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc
i18npool/inc/i18npool/lang.h |1 + 1 file changed, 1 insertion(+) New commits: commit c569add9b9b9e5aadff4b1379d1848c192f027ee Author: Eike Rathke Date: Fri Jun 29 01:54:49 2012 +0200 added LANGUAGE_USER_SYSTEM_CONFIG 0xFFFE for configuration context Intended as preparation to solve fdo#45830 Change-Id: Id3d5be9ef27e1b565ec0b21e580b89e893a782b8 diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index 5da8729..825efac 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -537,6 +537,7 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_MARI_MEADOW 0x066D #define LANGUAGE_USER_PAPIAMENTU_CURACAO0x8479 /* makeLangID( 0x21, getPrimaryLanguage( LANGUAGE_PAPIAMENTU)) */ #define LANGUAGE_USER_PAPIAMENTU_BONAIRE0x8879 /* makeLangID( 0x22, getPrimaryLanguage( LANGUAGE_PAPIAMENTU)) */ +#define LANGUAGE_USER_SYSTEM_CONFIG 0xFFFE /* not a locale, to be used only in configuration context to obtain system default, primary 0x3fe, sub 0x3f */ #endif /* INCLUDED_I18NPOOL_LANG_H */ ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] .: i18npool/inc i18npool/source svtools/source
i18npool/inc/i18npool/lang.h|2 ++ i18npool/source/isolang/isolang.cxx |2 ++ svtools/source/misc/langtab.src |2 ++ 3 files changed, 6 insertions(+) New commits: commit bb6fec1bd39be9f6d660623abd2b25400a34b9ac Author: Eike Rathke Date: Wed Jun 20 10:40:43 2012 +0200 fdo#38731 added Papiamento (Curaçao) [pap-CW] and (Bonaire) [pap-BQ] Added Papiamento (Curaçao) [pap-CW] and Papiamento (Bonaire) [pap-BQ] to language list. The locales are selectable for character attribution and spell-checking. Change-Id: I300029e2e60e196c989596f3a7d4f4a888e17af3 diff --git a/i18npool/inc/i18npool/lang.h b/i18npool/inc/i18npool/lang.h index a74b3ef..2bc8020 100644 --- a/i18npool/inc/i18npool/lang.h +++ b/i18npool/inc/i18npool/lang.h @@ -544,6 +544,8 @@ typedef unsigned short LanguageType; #define LANGUAGE_USER_ENGLISH_MALAWI0x8809 /* makeLangID( 0x22, getPrimaryLanguage( LANGUAGE_ENGLISH_UK)) */ #define LANGUAGE_USER_ERZYA 0x066C #define LANGUAGE_USER_MARI_MEADOW 0x066D +#define LANGUAGE_USER_PAPIAMENTU_CURACAO0x8479 /* makeLangID( 0x21, getPrimaryLanguage( LANGUAGE_PAPIAMENTU)) */ +#define LANGUAGE_USER_PAPIAMENTU_BONAIRE0x8879 /* makeLangID( 0x22, getPrimaryLanguage( LANGUAGE_PAPIAMENTU)) */ #endif /* INCLUDED_I18NPOOL_LANG_H */ diff --git a/i18npool/source/isolang/isolang.cxx b/i18npool/source/isolang/isolang.cxx index 0509079..092d5cd 100644 --- a/i18npool/source/isolang/isolang.cxx +++ b/i18npool/source/isolang/isolang.cxx @@ -350,6 +350,8 @@ static MsLangId::IsoLangEntry const aImplIsoLangEntries[] = { LANGUAGE_SOMALI, "so", "SO" }, { LANGUAGE_PAPIAMENTU, "pap", "AN" }, { LANGUAGE_USER_PAPIAMENTU_ARUBA, "pap", "AW" }, +{ LANGUAGE_USER_PAPIAMENTU_CURACAO,"pap", "CW" }, +{ LANGUAGE_USER_PAPIAMENTU_BONAIRE,"pap", "BQ" }, { LANGUAGE_ENGLISH_SINGAPORE, "en", "SG" }, { LANGUAGE_USER_YIDDISH_US, "yi", "US" }, { LANGUAGE_YIDDISH, "yi", "IL" }, // new: old was "ji" diff --git a/svtools/source/misc/langtab.src b/svtools/source/misc/langtab.src index 6ddac9e..0882cf2 100644 --- a/svtools/source/misc/langtab.src +++ b/svtools/source/misc/langtab.src @@ -350,6 +350,8 @@ StringArray STR_ARR_SVT_LANGUAGE_TABLE < "English (Malawi)" ; LANGUAGE_USER_ENGLISH_MALAWI ; > ; < "Erzya" ; LANGUAGE_USER_ERZYA ; > ; < "Mari, Meadow" ; LANGUAGE_USER_MARI_MEADOW ; > ; +< "Papiamento (Curaçao)" ; LANGUAGE_USER_PAPIAMENTU_CURACAO ; > ; +< "Papiamento (Bonaire)" ; LANGUAGE_USER_PAPIAMENTU_BONAIRE ; > ; }; }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
Re: [Libreoffice] [Libreoffice-commits] .: i18npool/inc i18npool/Library_localedata_euro.mk i18npool/source svtools/source
Hi Eike, Thanks for the explanation and the correction. I misinterpreted the meaning. Best regards, Juan Pablo El 06/09/2011 2:22, Eike Rathke escribió: Hi Juan, On Monday, 2011-09-05 23:03:04 +0200, Juan Pablo Martínez Cortés wrote: Yes, they were intentional. At least, I copied the way it was done in other languages of Spain, see for instance http://www.it46.se/localegen/locale/1207308973_es_ES.xml . The generated data files are not always a reference, they are not reviewed and seldomly updated with corrected versions. For what's available in LibO see http://cgit.freedesktop.org/libreoffice/core/tree/i18npool/source/localedata/data/es_ES.xml I guess the reason of changing the type is that in Spanish, as well as in other languages of Spain, the double quotation marks “ ” are the most widely used, and the single ones ‘ ’ are much less used. That's a misconception. Quotation(Start|End) define single quotes, DoubleQuotation(Start|End) define double quotes. They are used in replacements for ' and " when activated under Tools -> AutoCorrect Options -> Localized Options The es_ES.xml also defines Time100SecSeparator identical to DecimalSeparator ',' comma. I'll change that accordingly for an_ES. Eike ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [Libreoffice-commits] .: i18npool/inc i18npool/Library_localedata_euro.mk i18npool/source svtools/source
Hi Juan, On Monday, 2011-09-05 23:03:04 +0200, Juan Pablo Martínez Cortés wrote: > Yes, they were intentional. At least, I copied the way it was done > in other languages of Spain, see for instance > http://www.it46.se/localegen/locale/1207308973_es_ES.xml . The generated data files are not always a reference, they are not reviewed and seldomly updated with corrected versions. For what's available in LibO see http://cgit.freedesktop.org/libreoffice/core/tree/i18npool/source/localedata/data/es_ES.xml > I guess the reason of changing the type is that in Spanish, as well > as in other languages of Spain, the double quotation marks “ ” are > the most widely used, and the single ones ‘ ’ are much less used. That's a misconception. Quotation(Start|End) define single quotes, DoubleQuotation(Start|End) define double quotes. They are used in replacements for ' and " when activated under Tools -> AutoCorrect Options -> Localized Options The es_ES.xml also defines Time100SecSeparator identical to DecimalSeparator ',' comma. I'll change that accordingly for an_ES. Eike -- PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication. Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [Libreoffice-commits] .: i18npool/inc i18npool/Library_localedata_euro.mk i18npool/source svtools/source
Yes, they were intentional. At least, I copied the way it was done in other languages of Spain, see for instance http://www.it46.se/localegen/locale/1207308973_es_ES.xml . I guess the reason of changing the type is that in Spanish, as well as in other languages of Spain, the double quotation marks “ ” are the most widely used, and the single ones ‘ ’ are much less used. best regards, Juan Pablo El 05/09/2011 22:25, Andras Timar escribió: Hi Eike, 2011/9/4 Eike Rathke: Hi Andras, On Saturday, 2011-09-03 02:34:32 -0700, Andras Timar wrote: i18npool/source/localedata/data/an_ES.xml | 358 ++ add an_ES (Aragonese) locale data Compiling that gave: Warning: Time100SecSeparator is different from DecimalSeparator, this may be correct or not. Intended? Warning: Don't forget to adapt corresponding FormatCode elements when changing separators. Warning: QuotationStart may be wrong: U+201C “ Warning: QuotationEnd may be wrong: U+201D ” Warning: DoubleQuotationStart may be wrong: U+2018 ‘ Warning: DoubleQuotationEnd may be wrong: U+2019 ’ I exchanged Quotation(Start|End) and DoubleQuotation(Start|End), but I'm not sure about the use of '.' Time100SecSeparator whereas DecimalSeparator is ',' Is that intentional? I got the original file from Juan Pablo Martínez Cortés. I corrected a few errors and asked him about these warnings. He said that they were intentional, so I did not investigate further. Best regards, Andras -- _ Juan Pablo Martínez Cortés, PhD Profesor Titular de Universidad Departamento de Ing. Electrónica y Comunicaciones Grupo de Tecnologías de las Comunicaciones (GTC). Inst. de Invest. en Ingeniería de Aragón (I3A). Universidad de Zaragoza María de Luna 1, Edificio Ada Byron, D. 2.05. 50018 Zaragoza (ARAGON, SPAIN). Ph: +34-976-762363 e-mail: jpm...@unizar.es FAX: +34-976-762111 http://diec.unizar.es/~jpmart ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [Libreoffice-commits] .: i18npool/inc i18npool/Library_localedata_euro.mk i18npool/source svtools/source
Hi Eike, 2011/9/4 Eike Rathke : > Hi Andras, > > On Saturday, 2011-09-03 02:34:32 -0700, Andras Timar wrote: > >> i18npool/source/localedata/data/an_ES.xml | 358 >> ++ >> >> add an_ES (Aragonese) locale data > > Compiling that gave: > > Warning: Time100SecSeparator is different from DecimalSeparator, this may > be correct or not. Intended? > Warning: Don't forget to adapt corresponding FormatCode elements when > changing separators. > Warning: QuotationStart may be wrong: U+201C “ > Warning: QuotationEnd may be wrong: U+201D ” > Warning: DoubleQuotationStart may be wrong: U+2018 ‘ > Warning: DoubleQuotationEnd may be wrong: U+2019 ’ > > I exchanged Quotation(Start|End) and DoubleQuotation(Start|End), but I'm > not sure about the use of '.' Time100SecSeparator whereas > DecimalSeparator is ',' > > Is that intentional? I got the original file from Juan Pablo Martínez Cortés. I corrected a few errors and asked him about these warnings. He said that they were intentional, so I did not investigate further. Best regards, Andras ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice
Re: [Libreoffice] [Libreoffice-commits] .: i18npool/inc i18npool/Library_localedata_euro.mk i18npool/source svtools/source
Hi Andras, On Saturday, 2011-09-03 02:34:32 -0700, Andras Timar wrote: > i18npool/source/localedata/data/an_ES.xml | 358 > ++ > > add an_ES (Aragonese) locale data Compiling that gave: Warning: Time100SecSeparator is different from DecimalSeparator, this may be correct or not. Intended? Warning: Don't forget to adapt corresponding FormatCode elements when changing separators. Warning: QuotationStart may be wrong: U+201C “ Warning: QuotationEnd may be wrong: U+201D ” Warning: DoubleQuotationStart may be wrong: U+2018 ‘ Warning: DoubleQuotationEnd may be wrong: U+2019 ’ I exchanged Quotation(Start|End) and DoubleQuotation(Start|End), but I'm not sure about the use of '.' Time100SecSeparator whereas DecimalSeparator is ',' Is that intentional? Eike -- PGP/OpenPGP/GnuPG encrypted mail preferred in all private communication. Key ID: 0x293C05FD - 997A 4C60 CE41 0149 0DB3 9E96 2F1A D073 293C 05FD signature.asc Description: Digital signature ___ LibreOffice mailing list LibreOffice@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice