[Libreoffice-commits] core.git: basic/source cui/source editeng/source filter/source forms/source framework/source i18nlangtag/qa i18nlangtag/source include/editeng include/filter include/i18nlangtag include/linguistic include/o3tl include/svl include/svx include/unotools include/xmloff lingucomponent/source linguistic/source rsc/source sc/inc sc/source sd/inc sd/source sfx2/source shell/source starmath/source svl/qa svl/source svtools/source svx/source sw/inc sw/source unotools/source vcl/inc vcl/source vcl/unx vcl/win writerfilter/source xmloff/source
Noel Grandin
noelgrandin at gmail.com
Wed Apr 26 06:51:26 UTC 2017
basic/source/runtime/methods.cxx | 2
cui/source/dialogs/SpellDialog.cxx | 12
cui/source/factory/dlgfact.cxx | 2
cui/source/factory/dlgfact.hxx | 2
cui/source/inc/optdict.hxx | 2
cui/source/options/optasian.cxx | 4
cui/source/options/optdict.cxx | 10
cui/source/options/optgenrl.cxx | 17
cui/source/options/optlingu.cxx | 57
cui/source/tabpages/autocdlg.cxx | 6
cui/source/tabpages/chardlg.cxx | 6
cui/source/tabpages/numfmt.cxx | 2
editeng/source/editeng/editdbg.cxx | 2
editeng/source/editeng/editview.cxx | 10
editeng/source/editeng/impedit4.cxx | 10
editeng/source/items/textitem.cxx | 12
editeng/source/misc/forbiddencharacterstable.cxx | 6
editeng/source/misc/splwrap.cxx | 6
editeng/source/misc/svxacorr.cxx | 65
editeng/source/rtf/rtfitem.cxx | 9
editeng/source/uno/UnoForbiddenCharsTable.cxx | 4
filter/source/msfilter/countryid.cxx | 2
filter/source/msfilter/svdfppt.cxx | 14
forms/source/component/FormattedField.cxx | 4
framework/source/services/substitutepathvars.cxx | 2
i18nlangtag/qa/cppunit/test_languagetag.cxx | 62
i18nlangtag/source/isolang/isolang.cxx | 1075 +++++------
i18nlangtag/source/isolang/mslangid.cxx | 564 ++---
i18nlangtag/source/languagetag/languagetag.cxx | 10
include/editeng/edtdlg.hxx | 2
include/editeng/forbiddencharacterstable.hxx | 11
include/editeng/splwrap.hxx | 4
include/filter/msfilter/svdfppt.hxx | 4
include/i18nlangtag/lang.h | 1151 ++++++------
include/i18nlangtag/mslangid.hxx | 6
include/linguistic/hyphdta.hxx | 13
include/linguistic/misc.hxx | 14
include/linguistic/spelldta.hxx | 13
include/o3tl/strong_int.hxx | 11
include/svl/languageoptions.hxx | 4
include/svl/ondemand.hxx | 35
include/svl/zforlist.hxx | 2
include/svx/langbox.hxx | 4
include/unotools/lingucfg.hxx | 6
include/unotools/localedatawrapper.hxx | 2
include/unotools/transliterationwrapper.hxx | 8
include/xmloff/xmlnumfe.hxx | 3
lingucomponent/source/spellcheck/macosxspell/macspellimp.mm | 4
lingucomponent/source/spellcheck/spell/sspellimp.cxx | 4
lingucomponent/source/thesaurus/libnth/nthesimp.cxx | 12
lingucomponent/source/thesaurus/libnth/nthesimp.hxx | 2
linguistic/source/convdic.cxx | 4
linguistic/source/convdic.hxx | 6
linguistic/source/convdiclist.cxx | 4
linguistic/source/convdicxml.cxx | 4
linguistic/source/convdicxml.hxx | 12
linguistic/source/dicimp.cxx | 15
linguistic/source/dicimp.hxx | 6
linguistic/source/dlistimp.cxx | 14
linguistic/source/hyphdta.cxx | 8
linguistic/source/lngsvcmgr.cxx | 36
linguistic/source/misc.cxx | 44
linguistic/source/spelldsp.cxx | 10
linguistic/source/spelldta.cxx | 12
linguistic/source/thesdsp.cxx | 6
rsc/source/parser/rscibas.cxx | 4
sc/inc/scmod.hxx | 6
sc/source/core/data/documen8.cxx | 2
sc/source/core/tool/zforauto.cxx | 6
sc/source/filter/excel/xlstyle.cxx | 6
sc/source/ui/app/scmod.cxx | 8
sc/source/ui/dbgui/asciiopt.cxx | 2
sc/source/ui/dbgui/scuiasciiopt.cxx | 2
sc/source/ui/docshell/docsh3.cxx | 4
sc/source/ui/inc/viewutil.hxx | 3
sc/source/ui/unoobj/filtuno.cxx | 2
sc/source/ui/view/cellsh.cxx | 2
sc/source/ui/view/gridwin.cxx | 2
sc/source/ui/view/spelleng.cxx | 2
sc/source/ui/view/viewutil.cxx | 4
sd/inc/Outliner.hxx | 4
sd/source/filter/eppt/epptso.cxx | 2
sd/source/ui/func/fuhhconv.cxx | 12
sd/source/ui/inc/fuhhconv.hxx | 4
sd/source/ui/presenter/PresenterTextView.cxx | 4
sd/source/ui/view/Outliner.cxx | 2
sfx2/source/bastyp/sfxhtml.cxx | 4
shell/source/tools/lngconvex/lngconvex.cxx | 8
starmath/source/document.cxx | 8
svl/qa/unit/svl.cxx | 2
svl/source/config/languageoptions.cxx | 6
svl/source/items/srchitem.cxx | 8
svl/source/numbers/zforlist.cxx | 6
svl/source/numbers/zformat.cxx | 290 +--
svl/source/numbers/zforscan.cxx | 169 -
svtools/source/misc/langtab.cxx | 12
svtools/source/misc/sampletext.cxx | 192 --
svtools/source/svhtml/htmlout.cxx | 4
svx/source/dialog/langbox.cxx | 56
svx/source/svdraw/svdmodel.cxx | 2
sw/inc/IDocumentSettingAccess.hxx | 5
sw/inc/dbmgr.hxx | 11
sw/inc/docufld.hxx | 4
sw/inc/editsh.hxx | 2
sw/inc/expfld.hxx | 2
sw/inc/fldbas.hxx | 18
sw/inc/flddat.hxx | 2
sw/inc/ndtxt.hxx | 2
sw/inc/poolfmt.hxx | 3
sw/inc/shellio.hxx | 8
sw/inc/sortopt.hxx | 2
sw/inc/swcalwrp.hxx | 4
sw/inc/txatritr.hxx | 2
sw/inc/usrfld.hxx | 2
sw/source/core/bastyp/calc.cxx | 2
sw/source/core/bastyp/init.cxx | 4
sw/source/core/crsr/findtxt.cxx | 2
sw/source/core/doc/DocumentFieldsManager.cxx | 4
sw/source/core/doc/DocumentSettingManager.cxx | 6
sw/source/core/doc/DocumentStylePoolManager.cxx | 10
sw/source/core/doc/docsort.cxx | 9
sw/source/core/doc/poolfmt.cxx | 7
sw/source/core/doc/tblafmt.cxx | 6
sw/source/core/edit/edattr.cxx | 4
sw/source/core/edit/edlingu.cxx | 6
sw/source/core/fields/docufld.cxx | 9
sw/source/core/fields/expfld.cxx | 2
sw/source/core/fields/fldbas.cxx | 26
sw/source/core/fields/flddat.cxx | 2
sw/source/core/fields/usrfld.cxx | 4
sw/source/core/inc/DocumentSettingManager.hxx | 4
sw/source/core/text/EnhancedPDFExportHelper.cxx | 4
sw/source/core/text/porlay.cxx | 2
sw/source/core/txtnode/thints.cxx | 8
sw/source/core/txtnode/txtedt.cxx | 12
sw/source/filter/ascii/parasc.cxx | 3
sw/source/filter/inc/msfilter.hxx | 2
sw/source/filter/ww8/rtfattributeoutput.cxx | 6
sw/source/filter/ww8/writerwordglue.cxx | 214 +-
sw/source/filter/ww8/ww8atr.cxx | 8
sw/source/filter/ww8/ww8par.cxx | 6
sw/source/filter/ww8/ww8par.hxx | 6
sw/source/filter/ww8/ww8par5.cxx | 12
sw/source/filter/ww8/ww8par6.cxx | 6
sw/source/filter/ww8/ww8scan.cxx | 22
sw/source/filter/ww8/ww8scan.hxx | 8
sw/source/filter/ww8/ww8struc.hxx | 2
sw/source/ui/dbui/dbinsdlg.cxx | 2
sw/source/ui/dialog/ascfldlg.cxx | 4
sw/source/ui/misc/srtdlg.cxx | 4
sw/source/ui/vba/vbarange.cxx | 4
sw/source/ui/vba/vbastyle.cxx | 10
sw/source/ui/vba/vbastyle.hxx | 6
sw/source/uibase/app/docshini.cxx | 6
sw/source/uibase/config/fontcfg.cxx | 32
sw/source/uibase/dbui/dbmgr.cxx | 18
sw/source/uibase/fldui/fldmgr.cxx | 4
sw/source/uibase/inc/fldmgr.hxx | 2
sw/source/uibase/lingu/olmenu.cxx | 4
sw/source/uibase/shells/annotsh.cxx | 6
sw/source/uibase/shells/drwtxtsh.cxx | 6
sw/source/uibase/uiview/viewling.cxx | 6
unotools/source/config/lingucfg.cxx | 29
unotools/source/config/useroptions.cxx | 42
unotools/source/i18n/localedatawrapper.cxx | 26
unotools/source/i18n/transliterationwrapper.cxx | 8
vcl/inc/sallayout.hxx | 1
vcl/inc/sft.hxx | 3
vcl/source/font/font.cxx | 8
vcl/source/font/fontselect.cxx | 2
vcl/source/fontsubset/sft.cxx | 2
vcl/source/fontsubset/ttcr.cxx | 2
vcl/source/gdi/gdimtf.cxx | 4
vcl/source/gdi/metaact.cxx | 6
vcl/source/gdi/pdfwriter_impl.cxx | 2
vcl/source/gdi/sallayout.cxx | 127 -
vcl/source/outdev/outdev.cxx | 2
vcl/unx/generic/fontmanager/fontmanager.cxx | 2
vcl/unx/generic/glyphs/glyphcache.cxx | 2
vcl/win/window/salframe.cxx | 4
writerfilter/source/dmapper/ThemeTable.cxx | 2
writerfilter/source/rtftok/rtfdispatchvalue.cxx | 4
xmloff/source/style/xmlnumfe.cxx | 10
xmloff/source/style/xmlnumfi.cxx | 4
184 files changed, 2537 insertions(+), 2689 deletions(-)
New commits:
commit c70d49c7c888da8cfd73db8585e7be1f37fc398a
Author: Noel Grandin <noelgrandin at gmail.com>
Date: Mon Apr 17 21:35:35 2017 +0200
use strong_int for LanguageType
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448
Reviewed-on: https://gerrit.libreoffice.org/36629
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index bc0da7541f4e..a8468a61b908 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -4251,7 +4251,7 @@ RTLFUNC(StrConv)
OUString aOldStr = rPar.Get(1)->GetOUString();
sal_Int32 nConversion = rPar.Get(2)->GetLong();
- sal_uInt16 nLanguage = LANGUAGE_SYSTEM;
+ LanguageType nLanguage = LANGUAGE_SYSTEM;
sal_Int32 nOldLen = aOldStr.getLength();
if( nOldLen == 0 )
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 773aa61017e9..5fa6aeee1760 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -590,7 +590,7 @@ IMPL_LINK_NOARG(SpellDialog, ChangeAllHdl, Button*, void)
Reference<XDictionary> aXDictionary( LinguMgr::GetChangeAllList(), UNO_QUERY );
DictionaryError nAdded = AddEntryToDic( aXDictionary,
aOldWord, true,
- aString, eLang );
+ aString );
if(nAdded == DictionaryError::NONE)
{
@@ -638,7 +638,7 @@ IMPL_LINK( SpellDialog, IgnoreAllHdl, Button *, pButton, void )
OUString sErrorText(m_pSentenceED->GetErrorText());
DictionaryError nAdded = AddEntryToDic( aXDictionary,
sErrorText, false,
- OUString(), LANGUAGE_NONE );
+ OUString() );
if(nAdded == DictionaryError::NONE)
{
SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl(
@@ -753,7 +753,7 @@ bool SpellDialog::Close()
LanguageType SpellDialog::GetSelectedLang_Impl() const
{
- sal_Int16 nLang = m_pLanguageLB->GetSelectLanguage();
+ LanguageType nLang = m_pLanguageLB->GetSelectLanguage();
return nLang;
}
@@ -771,7 +771,7 @@ IMPL_LINK(SpellDialog, LanguageSelectHdl, ListBox&, rBox, void)
if(!sError.isEmpty())
{
LanguageType eLanguage = static_cast<SvxLanguageBox*>(&rBox)->GetSelectLanguage();
- Reference <XSpellAlternatives> xAlt = xSpell->spell( sError, eLanguage,
+ Reference <XSpellAlternatives> xAlt = xSpell->spell( sError, (sal_uInt16)eLanguage,
Sequence< PropertyValue >() );
if( xAlt.is() )
m_pSentenceED->SetAlternatives( xAlt );
@@ -898,7 +898,7 @@ void SpellDialog::AddToDictionaryExecute( sal_uInt16 nItemId, PopupMenu *pMenu )
DictionaryError nAddRes = DictionaryError::UNKNOWN;
if (xDic.is())
{
- nAddRes = AddEntryToDic( xDic, aNewWord, false, OUString(), LANGUAGE_NONE );
+ nAddRes = AddEntryToDic( xDic, aNewWord, false, OUString() );
// save modified user-dictionary if it is persistent
uno::Reference< frame::XStorable > xSavDic( xDic, uno::UNO_QUERY );
if (xSavDic.is())
@@ -1605,7 +1605,7 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError, const css
aCursor.GetIndex() += xEntry->getReplacementText().getLength();
// maybe the error found here is already added to the dictionary and has to be ignored
- } else if(pSpellErrorDescription && !bGrammarError && xSpell->isValid( GetErrorText(), LanguageTag::convertToLanguageType( pSpellErrorDescription->aLocale ), Sequence< PropertyValue >() )) {
+ } else if(pSpellErrorDescription && !bGrammarError && xSpell->isValid( GetErrorText(), (sal_uInt16)LanguageTag::convertToLanguageType( pSpellErrorDescription->aLocale ), Sequence< PropertyValue >() )) {
++aCursor.GetIndex();
}
else
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index f09b5b0fa318..1b956fb8855f 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -917,7 +917,7 @@ VclPtr<AbstractHangulHanjaConversionDialog> AbstractDialogFactory_Impl::CreateHa
VclPtr<AbstractThesaurusDialog> AbstractDialogFactory_Impl::CreateThesaurusDialog( vcl::Window* pParent,
css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus,
- const OUString &rWord, sal_Int16 nLanguage )
+ const OUString &rWord, LanguageType nLanguage )
{
VclPtrInstance<SvxThesaurusDialog> pDlg( pParent, xThesaurus, rWord, nLanguage );
return VclPtr<AbstractThesaurusDialog_Impl>::Create( pDlg );
diff --git a/cui/source/factory/dlgfact.hxx b/cui/source/factory/dlgfact.hxx
index 9c1b19725d90..69ec922558aa 100644
--- a/cui/source/factory/dlgfact.hxx
+++ b/cui/source/factory/dlgfact.hxx
@@ -495,7 +495,7 @@ public:
virtual VclPtr<AbstractHangulHanjaConversionDialog> CreateHangulHanjaConversionDialog( vcl::Window* _pParent,
editeng::HangulHanjaConversion::ConversionDirection _ePrimaryDirection ) override;
virtual VclPtr<AbstractThesaurusDialog> CreateThesaurusDialog( vcl::Window*, css::uno::Reference< css::linguistic2::XThesaurus > xThesaurus,
- const OUString &rWord, sal_Int16 nLanguage ) override;
+ const OUString &rWord, LanguageType nLanguage ) override;
virtual VclPtr<AbstractHyphenWordDialog> CreateHyphenWordDialog( vcl::Window*,
const OUString &rWord, LanguageType nLang,
diff --git a/cui/source/inc/optdict.hxx b/cui/source/inc/optdict.hxx
index 4cfa42b73913..d0858b52da4f 100644
--- a/cui/source/inc/optdict.hxx
+++ b/cui/source/inc/optdict.hxx
@@ -130,7 +130,7 @@ private:
void ShowWords_Impl( sal_uInt16 nId );
- void SetLanguage_Impl( css::util::Language nLanguage );
+ void SetLanguage_Impl( LanguageType nLanguage );
bool IsDicReadonly_Impl() const { return bDicIsReadonly; }
void SetDicReadonly_Impl( css::uno::Reference<
css::linguistic2::XDictionary > &xDic );
diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx
index 018c14169b5b..f814ad27e3b7 100644
--- a/cui/source/options/optasian.cxx
+++ b/cui/source/options/optasian.cxx
@@ -113,7 +113,7 @@ void SvxAsianLayoutPage_Impl::addForbiddenCharacters(
}
}
-static LanguageType eLastUsedLanguageTypeForForbiddenCharacters = USHRT_MAX;
+static LanguageType eLastUsedLanguageTypeForForbiddenCharacters(USHRT_MAX);
SvxAsianLayoutPage::SvxAsianLayoutPage( vcl::Window* pParent, const SfxItemSet& rSet ) :
SfxTabPage(pParent, "OptAsianPage", "cui/ui/optasianpage.ui", &rSet),
@@ -291,7 +291,7 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet* )
m_pLanguageLB->SelectEntryPos(0);
//preselect the system language in the box - if available
- if(USHRT_MAX == eLastUsedLanguageTypeForForbiddenCharacters)
+ if(LanguageType(USHRT_MAX) == eLastUsedLanguageTypeForForbiddenCharacters)
{
eLastUsedLanguageTypeForForbiddenCharacters =
Application::GetSettings().GetLanguageTag().getLanguageType();
diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index a8541b98f1d5..6ecbce35b8fe 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -158,7 +158,7 @@ IMPL_LINK_NOARG(SvxNewDictionaryDialog, OKHdl_Impl, Button*, void)
}
// create and add
- sal_uInt16 nLang = pLanguageLB->GetSelectLanguage();
+ LanguageType nLang = pLanguageLB->GetSelectLanguage();
try
{
// create new dictionary
@@ -375,7 +375,7 @@ void SvxEditDictionaryDialog::SetDicReadonly_Impl(
}
-void SvxEditDictionaryDialog::SetLanguage_Impl( util::Language nLanguage )
+void SvxEditDictionaryDialog::SetLanguage_Impl( LanguageType nLanguage )
{
// select language
pLangLB->SelectLanguage( nLanguage );
@@ -447,9 +447,9 @@ IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectBookHdl_Impl, ListBox&, void)
IMPL_LINK_NOARG(SvxEditDictionaryDialog, SelectLangHdl_Impl, ListBox&, void)
{
sal_Int32 nDicPos = pAllDictsLB->GetSelectEntryPos();
- sal_Int32 nLang = pLangLB->GetSelectLanguage();
+ LanguageType nLang = pLangLB->GetSelectLanguage();
Reference< XDictionary > xDic( aDics.getConstArray()[ nDicPos ], UNO_QUERY );
- sal_Int16 nOldLang = LanguageTag( xDic->getLocale() ).getLanguageType();
+ LanguageType nOldLang = LanguageTag( xDic->getLocale() ).getLanguageType();
if ( nLang != nOldLang )
{
@@ -627,7 +627,7 @@ bool SvxEditDictionaryDialog::NewDelHdl(void* pBtn)
nAddRes = linguistic::AddEntryToDic( xDic,
aNewWord, bIsNegEntry,
- aRplcText, LanguageTag( xDic->getLocale() ).getLanguageType(), false );
+ aRplcText, false );
}
}
if (DictionaryError::NONE != nAddRes)
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx
index 1b110fd30963..0dd5e7f0e05a 100644
--- a/cui/source/options/optgenrl.cxx
+++ b/cui/source/options/optgenrl.cxx
@@ -211,17 +211,14 @@ void SvxGeneralTabPage::InitControls ()
{
// which language bit do we use? (see Lang and vRowInfo[] above)
unsigned LangBit;
- switch (Application::GetSettings().GetUILanguageTag().getLanguageType())
+ LanguageType l = Application::GetSettings().GetUILanguageTag().getLanguageType();
+ if (l == LANGUAGE_ENGLISH_US)
+ LangBit = Lang::US;
+ else if (l == LANGUAGE_RUSSIAN)
+ LangBit = Lang::Russian;
+ else
{
- case LANGUAGE_ENGLISH_US:
- LangBit = Lang::US;
- break;
- case LANGUAGE_RUSSIAN:
- LangBit = Lang::Russian;
- break;
- default:
- LangBit = Lang::Others;
- break;
+ LangBit = Lang::Others;
}
// creating rows
diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx
index 0d5638979904..148cbc025b50 100644
--- a/cui/source/options/optlingu.cxx
+++ b/cui/source/options/optlingu.cxx
@@ -85,31 +85,26 @@ static const sal_Char cThes[] = SN_THESAURUS;
// static ----------------------------------------------------------------
-static Sequence< sal_Int16 > lcl_LocaleSeqToLangSeq( const Sequence< Locale > &rSeq )
+static std::vector< LanguageType > lcl_LocaleSeqToLangSeq( const Sequence< Locale > &rSeq )
{
sal_Int32 nLen = rSeq.getLength();
- Sequence< sal_Int16 > aRes( nLen );
- sal_Int16 *pRes = aRes.getArray();
+ std::vector<LanguageType> aRes;
+ aRes.reserve(nLen);
const Locale *pSeq = rSeq.getConstArray();
for (sal_Int32 i = 0; i < nLen; ++i)
{
- pRes[i] = LanguageTag::convertToLanguageType( pSeq[i] );
+ aRes.push_back( LanguageTag::convertToLanguageType( pSeq[i] ) );
}
return aRes;
}
-static bool lcl_SeqHasLang( const Sequence< sal_Int16 > &rSeq, sal_Int16 nLang )
+static bool lcl_SeqHasLang( const std::vector< LanguageType > &rSeq, LanguageType nLang )
{
- sal_Int32 nLen = rSeq.getLength();
- const sal_Int16 *pLang = rSeq.getConstArray();
- sal_Int32 nPos = -1;
- for (sal_Int32 i = 0; i < nLen && nPos < 0; ++i)
- {
- if (nLang == pLang[i])
- nPos = i;
- }
- return nPos >= 0;
+ for (auto const & i : rSeq)
+ if (i == nLang)
+ return true;
+ return false;
}
@@ -458,8 +453,8 @@ struct ServiceInfo_Impl
ServiceInfo_Impl() : bConfigured(false) {}
};
-typedef std::vector< ServiceInfo_Impl > ServiceInfoArr;
-typedef std::map< sal_Int16 /*LanguageType*/, Sequence< OUString > > LangImplNameTable;
+typedef std::vector< ServiceInfo_Impl > ServiceInfoArr;
+typedef std::map< LanguageType, Sequence< OUString > > LangImplNameTable;
// SvxLinguData_Impl ----------------------------------------------------
@@ -511,7 +506,7 @@ public:
// I.e. the ones available but not configured in arbitrary order).
// They available ones may contain names that do not(!) support that
// language.
- Sequence< OUString > GetSortedImplNames( sal_Int16 nLang, sal_uInt8 nType );
+ Sequence< OUString > GetSortedImplNames( LanguageType nLang, sal_uInt8 nType );
ServiceInfo_Impl * GetInfoByImplName( const OUString &rSvcImplName );
};
@@ -531,7 +526,7 @@ static sal_Int32 lcl_SeqGetIndex( const Sequence< OUString > &rSeq, const OUStri
}
-Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( sal_Int16 nLang, sal_uInt8 nType )
+Sequence< OUString > SvxLinguData_Impl::GetSortedImplNames( LanguageType nLang, sal_uInt8 nType )
{
LangImplNameTable *pTable = nullptr;
switch (nType)
@@ -792,7 +787,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() :
const Locale* pAllLocales = aAllServiceLocales.getConstArray();
for(sal_Int32 nLocale = 0; nLocale < aAllServiceLocales.getLength(); nLocale++)
{
- sal_Int16 nLang = LanguageTag::convertToLanguageType( pAllLocales[nLocale] );
+ LanguageType nLang = LanguageTag::convertToLanguageType( pAllLocales[nLocale] );
aCfgSvcs = xLinguSrvcMgr->getConfiguredServices(cSpell, pAllLocales[nLocale]);
SetChecked( aCfgSvcs );
@@ -927,7 +922,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, bool bEnable
nLocales = aLocales.getLength();
for (i = 0; i < nLocales; ++i)
{
- sal_Int16 nLang = LanguageTag::convertToLanguageType( pLocale[i] );
+ LanguageType nLang = LanguageTag::convertToLanguageType( pLocale[i] );
if (!aCfgSpellTable.count( nLang ) && bEnable)
aCfgSpellTable[ nLang ] = Sequence< OUString >();
if (aCfgSpellTable.count( nLang ))
@@ -943,7 +938,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, bool bEnable
nLocales = aLocales.getLength();
for (i = 0; i < nLocales; ++i)
{
- sal_Int16 nLang = LanguageTag::convertToLanguageType( pLocale[i] );
+ LanguageType nLang = LanguageTag::convertToLanguageType( pLocale[i] );
if (!aCfgGrammarTable.count( nLang ) && bEnable)
aCfgGrammarTable[ nLang ] = Sequence< OUString >();
if (aCfgGrammarTable.count( nLang ))
@@ -959,7 +954,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, bool bEnable
nLocales = aLocales.getLength();
for (i = 0; i < nLocales; ++i)
{
- sal_Int16 nLang = LanguageTag::convertToLanguageType( pLocale[i] );
+ LanguageType nLang = LanguageTag::convertToLanguageType( pLocale[i] );
if (!aCfgHyphTable.count( nLang ) && bEnable)
aCfgHyphTable[ nLang ] = Sequence< OUString >();
if (aCfgHyphTable.count( nLang ))
@@ -975,7 +970,7 @@ void SvxLinguData_Impl::Reconfigure( const OUString &rDisplayName, bool bEnable
nLocales = aLocales.getLength();
for (i = 0; i < nLocales; ++i)
{
- sal_Int16 nLang = LanguageTag::convertToLanguageType( pLocale[i] );
+ LanguageType nLang = LanguageTag::convertToLanguageType( pLocale[i] );
if (!aCfgThesTable.count( nLang ) && bEnable)
aCfgThesTable[ nLang ] = Sequence< OUString >();
if (aCfgThesTable.count( nLang ))
@@ -1120,7 +1115,7 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet )
const LangImplNameTable *pTable = &pLinguData->GetSpellTable();
for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt)
{
- sal_Int16 nLang = aIt->first;
+ LanguageType nLang = aIt->first;
const Sequence< OUString > aImplNames( aIt->second );
uno::Reference< XLinguServiceManager2 > xMgr( pLinguData->GetManager() );
Locale aLocale( LanguageTag::convertToLocale(nLang) );
@@ -1132,7 +1127,7 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet )
pTable = &pLinguData->GetGrammarTable();
for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt)
{
- sal_Int16 nLang = aIt->first;
+ LanguageType nLang = aIt->first;
const Sequence< OUString > aImplNames( aIt->second );
uno::Reference< XLinguServiceManager2 > xMgr( pLinguData->GetManager() );
Locale aLocale( LanguageTag::convertToLocale(nLang) );
@@ -1144,7 +1139,7 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet )
pTable = &pLinguData->GetHyphTable();
for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt)
{
- sal_Int16 nLang = aIt->first;
+ LanguageType nLang = aIt->first;
const Sequence< OUString > aImplNames( aIt->second );
uno::Reference< XLinguServiceManager2 > xMgr( pLinguData->GetManager() );
Locale aLocale( LanguageTag::convertToLocale(nLang) );
@@ -1156,7 +1151,7 @@ bool SvxLinguTabPage::FillItemSet( SfxItemSet* rCoreSet )
pTable = &pLinguData->GetThesTable();
for (aIt = pTable->begin(); aIt != pTable->end(); ++aIt)
{
- sal_Int16 nLang = aIt->first;
+ LanguageType nLang = aIt->first;
const Sequence< OUString > aImplNames( aIt->second );
uno::Reference< XLinguServiceManager2 > xMgr( pLinguData->GetManager() );
Locale aLocale( LanguageTag::convertToLocale(nLang) );
@@ -1529,7 +1524,7 @@ IMPL_LINK( SvxLinguTabPage, ClickHdl_Impl, Button *, pBtn, void )
sal_Int32 nLocales = pLinguData->GetAllSupportedLocales().getLength();
for (sal_Int32 k = 0; k < nLocales; ++k)
{
- sal_Int16 nLang = LanguageTag::convertToLanguageType( pAllLocales[k] );
+ LanguageType nLang = LanguageTag::convertToLanguageType( pAllLocales[k] );
if (pLinguData->GetSpellTable().count( nLang ))
pLinguData->SetChecked( pLinguData->GetSpellTable()[ nLang ] );
if (pLinguData->GetGrammarTable().count( nLang ))
@@ -1796,7 +1791,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rD
m_pMoreDictsLink->Hide();
//fill language box
- Sequence< sal_Int16 > aAvailLang;
+ std::vector< LanguageType > aAvailLang;
uno::Reference< XAvailableLocales > xAvail( rLinguData.GetManager(), UNO_QUERY );
if (xAvail.is())
{
@@ -1808,7 +1803,7 @@ SvxEditModulesDlg::SvxEditModulesDlg(vcl::Window* pParent, SvxLinguData_Impl& rD
m_pLanguageLB->Clear();
for(long i = 0; i < rLoc.getLength(); i++)
{
- sal_Int16 nLang = LanguageTag::convertToLanguageType( pLocales[i] );
+ LanguageType nLang = LanguageTag::convertToLanguageType( pLocales[i] );
m_pLanguageLB->InsertLanguage( nLang, lcl_SeqHasLang( aAvailLang, nLang ) );
}
LanguageType eSysLang = MsLangId::getSystemLanguage();
@@ -1942,7 +1937,7 @@ void SvxEditModulesDlg::LangSelectHdl_Impl(ListBox* pBox)
// save old probably changed settings
// before switching to new language entries
- sal_Int16 nLang = LanguageTag::convertToLanguageType( aLastLocale );
+ LanguageType nLang = LanguageTag::convertToLanguageType( aLastLocale );
sal_Int32 nStart = 0, nLocalIndex = 0;
Sequence< OUString > aChange;
diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx
index 1c17f37ea850..23f4dfa77834 100644
--- a/cui/source/tabpages/autocdlg.cxx
+++ b/cui/source/tabpages/autocdlg.cxx
@@ -121,14 +121,14 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(vcl::Window* pParent, const SfxItemSet* _pSet )
m_pLanguageLB->SelectLanguage( LANGUAGE_NONE );
sal_Int32 nPos = m_pLanguageLB->GetSelectEntryPos();
DBG_ASSERT( LISTBOX_ENTRY_NOTFOUND != nPos, "listbox entry missing" );
- m_pLanguageLB->SetEntryData( nPos, reinterpret_cast<void*>(LANGUAGE_UNDETERMINED) );
+ m_pLanguageLB->SetEntryData( nPos, reinterpret_cast<void*>((sal_uInt16)LANGUAGE_UNDETERMINED) );
// Initializing doesn't work for static on linux - therefore here
if( LANGUAGE_SYSTEM == eLastDialogLanguage )
eLastDialogLanguage = Application::GetSettings().GetLanguageTag().getLanguageType();
LanguageType nSelectLang = LANGUAGE_UNDETERMINED;
- nPos = m_pLanguageLB->GetEntryPos( reinterpret_cast<void*>(eLastDialogLanguage) );
+ nPos = m_pLanguageLB->GetEntryPos( reinterpret_cast<void*>((sal_uInt16)eLastDialogLanguage) );
if (LISTBOX_ENTRY_NOTFOUND != nPos)
nSelectLang = eLastDialogLanguage;
m_pLanguageLB->SelectLanguage( nSelectLang );
@@ -179,7 +179,7 @@ IMPL_LINK(OfaAutoCorrDlg, SelectLanguageHdl, ListBox&, rBox, void)
{
sal_Int32 nPos = rBox.GetSelectEntryPos();
void* pVoid = rBox.GetEntryData(nPos);
- LanguageType eNewLang = (LanguageType)reinterpret_cast<sal_IntPtr>(pVoid);
+ LanguageType eNewLang = LanguageType(reinterpret_cast<sal_IntPtr>(pVoid));
// save old settings and fill anew
if(eNewLang != eLastDialogLanguage)
{
diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx
index b34670d2f681..10221e1de052 100644
--- a/cui/source/tabpages/chardlg.cxx
+++ b/cui/source/tabpages/chardlg.cxx
@@ -825,7 +825,7 @@ void SvxCharNamePage::Reset_Impl( const SfxItemSet& rSet, LanguageGroup eLangGrp
case SfxItemState::SET:
{
const SvxLanguageItem& rItem = static_cast<const SvxLanguageItem&>(rSet.Get( nWhich ));
- LanguageType eLangType = (LanguageType)rItem.GetValue();
+ LanguageType eLangType = rItem.GetValue();
DBG_ASSERT( eLangType != LANGUAGE_SYSTEM, "LANGUAGE_SYSTEM not allowed" );
if ( eLangType != LANGUAGE_DONTKNOW )
pLangBox->SelectLanguage( eLangType );
@@ -1130,13 +1130,13 @@ bool SvxCharNamePage::FillItemSet_Impl( SfxItemSet& rSet, LanguageGroup eLangGrp
}
sal_Int32 nLangPos = pLangBox->GetSelectEntryPosLBB();
- LanguageType eLangType = (LanguageType)reinterpret_cast<sal_uLong>(pLangBox->GetEntryDataLBB( nLangPos ));
+ LanguageType eLangType = LanguageType(reinterpret_cast<sal_uLong>(pLangBox->GetEntryDataLBB( nLangPos )));
if ( pOld )
{
const SvxLanguageItem& rItem = *static_cast<const SvxLanguageItem*>(pOld);
- if ( nLangPos == LISTBOX_ENTRY_NOTFOUND || eLangType == (LanguageType)rItem.GetValue() )
+ if ( nLangPos == LISTBOX_ENTRY_NOTFOUND || eLangType == rItem.GetValue() )
bChanged = false;
}
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 73be739ebdfc..1e9bc43aa912 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1813,7 +1813,7 @@ void SvxNumberFormatTabPage::AddAutomaticLanguage_Impl(LanguageType eAutoLang, b
{
m_pLbLanguage->RemoveLanguage(LANGUAGE_SYSTEM);
const sal_Int32 nPos = m_pLbLanguage->InsertEntry(sAutomaticEntry);
- m_pLbLanguage->SetEntryData(nPos, reinterpret_cast<void*>((sal_uLong)eAutoLang));
+ m_pLbLanguage->SetEntryData(nPos, reinterpret_cast<void*>((sal_uInt16)eAutoLang));
if(bSelect)
m_pLbLanguage->SelectEntryPos(nPos);
}
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index df8f248ff5f6..6c2d0c58770c 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -165,7 +165,7 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
case EE_CHAR_LANGUAGE_CJK:
case EE_CHAR_LANGUAGE_CTL:
aDebStr.append("Language=");
- aDebStr.append(static_cast<sal_Int32>(static_cast<const SvxLanguageItem&>(rItem).GetLanguage()));
+ aDebStr.append((sal_Int32)static_cast<sal_uInt16>(static_cast<const SvxLanguageItem&>(rItem).GetLanguage()));
break;
case EE_CHAR_COLOR:
{
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index ecc78b89d071..5ce07a2f7680 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -136,11 +136,11 @@ LanguageType EditView::CheckLanguage(
sal_Int32 nCount = SAL_N_ELEMENTS(aLangList);
for (sal_Int32 i = 0; i < nCount; i++)
{
- sal_Int16 nTmpLang = aLangList[i];
+ LanguageType nTmpLang = aLangList[i];
if (nTmpLang != LANGUAGE_NONE && nTmpLang != LANGUAGE_DONTKNOW)
{
- if (xSpell->hasLanguage( nTmpLang ) &&
- xSpell->isValid( rText, nTmpLang, Sequence< PropertyValue >() ))
+ if (xSpell->hasLanguage( (sal_uInt16)nTmpLang ) &&
+ xSpell->isValid( rText, (sal_uInt16)nTmpLang, Sequence< PropertyValue >() ))
{
nLang = nTmpLang;
break;
@@ -853,7 +853,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
// Are there any replace suggestions?
Reference< linguistic2::XSpellAlternatives > xSpellAlt =
- xSpeller->spell( aSelected, pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 ), aPropVals );
+ xSpeller->spell( aSelected, (sal_uInt16)pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 ), aPropVals );
Reference< linguistic2::XLanguageGuessing > xLangGuesser( EditDLL::Get().GetGlobalData()->GetLanguageGuesser() );
@@ -936,7 +936,7 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link<SpellCallbackInfo
aDics = xDicList->getDictionaries();
pDic = aDics.getConstArray();
- sal_uInt16 nCheckedLanguage = pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 );
+ LanguageType nCheckedLanguage = pImpEditView->pEditEngine->pImpEditEngine->GetLanguage( aPaM2 );
sal_uInt16 nDicCount = (sal_uInt16)aDics.getLength();
for (sal_uInt16 i = 0; i < nDicCount; i++)
{
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index ab1db9862c79..217b190e2786 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -1890,7 +1890,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpSpell( EditView* pEditView )
{
LanguageType eLang = GetLanguage( aCurSel.Max() );
SvxSpellWrapper::CheckSpellLang( xSpeller, eLang );
- xSpellAlt = xSpeller->spell( aWord, eLang, aEmptySeq );
+ xSpellAlt = xSpeller->spell( aWord, (sal_uInt16)eLang, aEmptySeq );
}
if ( !xSpellAlt.is() )
@@ -1938,7 +1938,7 @@ Reference< XSpellAlternatives > ImpEditEngine::ImpFindNextError(EditSelection& r
}
if ( !aWord.isEmpty() )
- xSpellAlt = xSpeller->spell( aWord, GetLanguage( aCurSel.Max() ), aEmptySeq );
+ xSpellAlt = xSpeller->spell( aWord, (sal_uInt16)GetLanguage( aCurSel.Max() ), aEmptySeq );
if ( !xSpellAlt.is() )
aCurSel = WordRight( aCurSel.Min(), css::i18n::WordType::DICTIONARY_WORD );
@@ -2315,7 +2315,7 @@ void ImpEditEngine::DoOnlineSpelling( ContentNode* pThisNodeOnly, bool bSpellAtC
{
const sal_Int32 nWStart = aSel.Min().GetIndex();
const sal_Int32 nWEnd = aSel.Max().GetIndex();
- if ( !xSpeller->isValid( aWord, GetLanguage( EditPaM( aSel.Min().GetNode(), nWStart+1 ) ), aEmptySeq ) )
+ if ( !xSpeller->isValid( aWord, (sal_uInt16)GetLanguage( EditPaM( aSel.Min().GetNode(), nWStart+1 ) ), aEmptySeq ) )
{
// Check if already marked correctly...
const sal_Int32 nXEnd = bDottAdded ? nWEnd -1 : nWEnd;
@@ -2463,7 +2463,7 @@ EESpellState ImpEditEngine::HasSpellErrors()
{
LanguageType eLang = GetLanguage( aCurSel.Max() );
SvxSpellWrapper::CheckSpellLang( xSpeller, eLang );
- xSpellAlt = xSpeller->spell( aWord, eLang, aEmptySeq );
+ xSpellAlt = xSpeller->spell( aWord, (sal_uInt16)eLang, aEmptySeq );
}
aCurSel = WordRight( aCurSel.Max(), css::i18n::WordType::DICTIONARY_WORD );
}
@@ -2741,7 +2741,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
sal_Int32 nCurrentStart = nStartPos;
sal_Int32 nCurrentEnd = nEndPos;
- sal_uInt16 nLanguage = LANGUAGE_SYSTEM;
+ LanguageType nLanguage = LANGUAGE_SYSTEM;
// since we don't use Hiragana/Katakana or half-width/full-width transliterations here
// it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 3b4ef530d88a..72de8968f410 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -2366,7 +2366,7 @@ SfxPoolItem* SvxLanguageItem::Clone( SfxItemPool * ) const
SvStream& SvxLanguageItem::Store( SvStream& rStrm , sal_uInt16 /*nItemVersion*/ ) const
{
- rStrm.WriteUInt16( GetValue() );
+ rStrm.WriteUInt16( (sal_uInt16)GetValue() );
return rStrm;
}
@@ -2375,7 +2375,7 @@ SfxPoolItem* SvxLanguageItem::Create(SvStream& rStrm, sal_uInt16) const
{
sal_uInt16 nValue;
rStrm.ReadUInt16( nValue );
- return new SvxLanguageItem( (LanguageType)nValue, Which() );
+ return new SvxLanguageItem( LanguageType(nValue), Which() );
}
@@ -2387,7 +2387,7 @@ bool SvxLanguageItem::GetPresentation
OUString& rText, const IntlWrapper * /*pIntl*/
) const
{
- rText = SvtLanguageTable::GetLanguageString( (LanguageType)GetValue() );
+ rText = SvtLanguageTable::GetLanguageString( GetValue() );
return true;
}
@@ -2397,7 +2397,7 @@ bool SvxLanguageItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
switch(nMemberId)
{
case MID_LANG_INT: // for basic conversions!
- rVal <<= (sal_Int16)(GetValue());
+ rVal <<= (sal_Int16)(sal_uInt16)GetValue();
break;
case MID_LANG_LOCALE:
lang::Locale aRet( LanguageTag::convertToLocale( GetValue(), false));
@@ -2418,7 +2418,7 @@ bool SvxLanguageItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
if(!(rVal >>= nValue))
return false;
- SetValue((sal_Int16)nValue);
+ SetValue(LanguageType(nValue));
}
break;
case MID_LANG_LOCALE:
@@ -3434,7 +3434,7 @@ void GetDefaultFonts( SvxFontItem& rLatin, SvxFontItem& rAsian, SvxFontItem& rCo
static struct
{
DefaultFontType nFontType;
- sal_uInt16 nLanguage;
+ LanguageType nLanguage;
}
aOutTypeArr[ nItemCnt ] =
{
diff --git a/editeng/source/misc/forbiddencharacterstable.cxx b/editeng/source/misc/forbiddencharacterstable.cxx
index 1391d993316a..f52c90eb2b86 100644
--- a/editeng/source/misc/forbiddencharacterstable.cxx
+++ b/editeng/source/misc/forbiddencharacterstable.cxx
@@ -30,7 +30,7 @@ SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( const css::uno::Refere
m_xContext = rxContext;
}
-const css::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, bool bGetDefault )
+const css::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( LanguageType nLanguage, bool bGetDefault )
{
css::i18n::ForbiddenCharacters* pForbiddenCharacters = nullptr;
Map::iterator it = maMap.find( nLanguage );
@@ -45,12 +45,12 @@ const css::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenC
return pForbiddenCharacters;
}
-void SvxForbiddenCharactersTable::SetForbiddenCharacters( sal_uInt16 nLanguage, const css::i18n::ForbiddenCharacters& rForbiddenChars )
+void SvxForbiddenCharactersTable::SetForbiddenCharacters( LanguageType nLanguage, const css::i18n::ForbiddenCharacters& rForbiddenChars )
{
maMap[ nLanguage ] = rForbiddenChars;
}
-void SvxForbiddenCharactersTable::ClearForbiddenCharacters( sal_uInt16 nLanguage )
+void SvxForbiddenCharactersTable::ClearForbiddenCharacters( LanguageType nLanguage )
{
maMap.erase( nLanguage );
}
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index 56024f280610..5e227a6bfd06 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -175,7 +175,7 @@ SvxSpellWrapper::SvxSpellWrapper( vcl::Window* pWn,
sal_Int16 SvxSpellWrapper::CheckSpellLang(
- Reference< XSpellChecker1 > const & xSpell, sal_Int16 nLang)
+ Reference< XSpellChecker1 > const & xSpell, LanguageType nLang)
{
LangCheckState_map_t &rLCS = GetLangCheckState();
@@ -188,7 +188,7 @@ sal_Int16 SvxSpellWrapper::CheckSpellLang(
if (SVX_LANG_NEED_CHECK == (nVal & 0x00FF))
{
sal_uInt16 nTmpVal = SVX_LANG_MISSING_DO_WARN;
- if (xSpell.is() && xSpell->hasLanguage( nLang ))
+ if (xSpell.is() && xSpell->hasLanguage( (sal_uInt16)nLang ))
nTmpVal = SVX_LANG_OK;
nVal &= 0xFF00;
nVal |= nTmpVal;
@@ -200,7 +200,7 @@ sal_Int16 SvxSpellWrapper::CheckSpellLang(
}
sal_Int16 SvxSpellWrapper::CheckHyphLang(
- Reference< XHyphenator > const & xHyph, sal_Int16 nLang)
+ Reference< XHyphenator > const & xHyph, LanguageType nLang)
{
LangCheckState_map_t &rLCS = GetLangCheckState();
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index f6fd40376a34..720a23bda34a 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -203,7 +203,7 @@ static const LanguageTag& GetAppLang()
{
return Application::GetSettings().GetLanguageTag();
}
-static LocaleDataWrapper& GetLocaleDataWrapper( sal_uInt16 nLang )
+static LocaleDataWrapper& GetLocaleDataWrapper( LanguageType nLang )
{
static LocaleDataWrapper aLclDtWrp( GetAppLang() );
LanguageTag aLcl( nLang );
@@ -276,21 +276,18 @@ long SvxAutoCorrect::GetDefaultFlags()
| SaveWordWrdSttLst
| CorrectCapsLock;
LanguageType eLang = GetAppLang().getLanguageType();
- switch( eLang )
- {
- case LANGUAGE_ENGLISH:
- case LANGUAGE_ENGLISH_US:
- case LANGUAGE_ENGLISH_UK:
- case LANGUAGE_ENGLISH_AUS:
- case LANGUAGE_ENGLISH_CAN:
- case LANGUAGE_ENGLISH_NZ:
- case LANGUAGE_ENGLISH_EIRE:
- case LANGUAGE_ENGLISH_SAFRICA:
- case LANGUAGE_ENGLISH_JAMAICA:
- case LANGUAGE_ENGLISH_CARRIBEAN:
+ if( eLang.anyOf(
+ LANGUAGE_ENGLISH,
+ LANGUAGE_ENGLISH_US,
+ LANGUAGE_ENGLISH_UK,
+ LANGUAGE_ENGLISH_AUS,
+ LANGUAGE_ENGLISH_CAN,
+ LANGUAGE_ENGLISH_NZ,
+ LANGUAGE_ENGLISH_EIRE,
+ LANGUAGE_ENGLISH_SAFRICA,
+ LANGUAGE_ENGLISH_JAMAICA,
+ LANGUAGE_ENGLISH_CARRIBEAN))
nRet &= ~(ChgQuotes|ChgSglQuotes);
- break;
- }
return nRet;
}
@@ -421,10 +418,10 @@ bool SvxAutoCorrect::FnCapitalStartWord( SvxAutoCorrDoc& rDoc, const OUString& r
// Check that word isn't correctly spelled before correcting:
css::uno::Reference< css::linguistic2::XSpellChecker1 > xSpeller =
LinguMgr::GetSpellChecker();
- if( xSpeller->hasLanguage(eLang) )
+ if( xSpeller->hasLanguage((sal_uInt16)eLang) )
{
Sequence< css::beans::PropertyValue > aEmptySeq;
- if (xSpeller->isValid(sWord, eLang, aEmptySeq))
+ if (xSpeller->isValid(sWord, (sal_uInt16)eLang, aEmptySeq))
{
return false;
}
@@ -457,12 +454,10 @@ bool SvxAutoCorrect::FnChgOrdinalNumber(
// In some languages ordinal suffixes should never be
// changed to superscript. Let's break for those languages.
- switch (eLang)
+ if (!eLang.anyOf(
+ LANGUAGE_SWEDISH,
+ LANGUAGE_SWEDISH_FINLAND))
{
- case LANGUAGE_SWEDISH:
- case LANGUAGE_SWEDISH_FINLAND:
- break;
- default:
CharClass& rCC = GetCharClass(eLang);
for (; nSttPos < nEndPos; ++nSttPos)
@@ -1187,13 +1182,13 @@ void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, sal_Int32 nInsPos,
{
if( LANGUAGE_SYSTEM == eLang )
eLang = GetAppLang().getLanguageType();
- switch( eLang )
+ if( eLang.anyOf(
+ LANGUAGE_FRENCH,
+ LANGUAGE_FRENCH_BELGIAN,
+ LANGUAGE_FRENCH_CANADIAN,
+ LANGUAGE_FRENCH_SWISS,
+ LANGUAGE_FRENCH_LUXEMBOURG))
{
- case LANGUAGE_FRENCH:
- case LANGUAGE_FRENCH_BELGIAN:
- case LANGUAGE_FRENCH_CANADIAN:
- case LANGUAGE_FRENCH_SWISS:
- case LANGUAGE_FRENCH_LUXEMBOURG:
{
OUString s( cNonBreakingSpace );
// UNICODE code for no break space
@@ -1203,7 +1198,6 @@ void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, sal_Int32 nInsPos,
++nInsPos;
}
}
- break;
}
}
@@ -1222,18 +1216,17 @@ OUString SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, sal_Int32 nInsPos,
{
if( LANGUAGE_SYSTEM == eLang )
eLang = GetAppLang().getLanguageType();
- switch( eLang )
+ if( eLang.anyOf(
+ LANGUAGE_FRENCH,
+ LANGUAGE_FRENCH_BELGIAN,
+ LANGUAGE_FRENCH_CANADIAN,
+ LANGUAGE_FRENCH_SWISS,
+ LANGUAGE_FRENCH_LUXEMBOURG))
{
- case LANGUAGE_FRENCH:
- case LANGUAGE_FRENCH_BELGIAN:
- case LANGUAGE_FRENCH_CANADIAN:
- case LANGUAGE_FRENCH_SWISS:
- case LANGUAGE_FRENCH_LUXEMBOURG:
if( bSttQuote )
sRet += " ";
else
sRet = " " + sRet;
- break;
}
}
return sRet;
diff --git a/editeng/source/rtf/rtfitem.cxx b/editeng/source/rtf/rtfitem.cxx
index da91b578ff33..e891184b8c14 100644
--- a/editeng/source/rtf/rtfitem.cxx
+++ b/editeng/source/rtf/rtfitem.cxx
@@ -956,7 +956,7 @@ ATTR_SETOVERLINE:
case RTF_LANG:
if( aPlainMap.nLanguage )
{
- pSet->Put( SvxLanguageItem( (LanguageType)nTokenValue,
+ pSet->Put( SvxLanguageItem( LanguageType(nTokenValue),
aPlainMap.nLanguage ));
}
break;
@@ -964,13 +964,13 @@ ATTR_SETOVERLINE:
case RTF_LANGFE:
if( aPlainMap.nCJKLanguage )
{
- pSet->Put( SvxLanguageItem( (LanguageType)nTokenValue,
+ pSet->Put( SvxLanguageItem( LanguageType(nTokenValue),
aPlainMap.nCJKLanguage ));
}
break;
case RTF_ALANG:
{
- SvxLanguageItem aTmpItem( (LanguageType)nTokenValue,
+ SvxLanguageItem aTmpItem( LanguageType(nTokenValue),
SID_ATTR_CHAR_LANGUAGE );
SetScriptAttr( eCharType, *pSet, aTmpItem );
}
@@ -1835,8 +1835,7 @@ void SvxRTFParser::SetDefault( int nToken, int nValue )
// store default Language
if( -1 != nValue )
{
- SvxLanguageItem aTmpItem( (const LanguageType)nValue,
- SID_ATTR_CHAR_LANGUAGE );
+ SvxLanguageItem aTmpItem( LanguageType(nValue), SID_ATTR_CHAR_LANGUAGE );
SetScriptAttr( NOTDEF_CHARTYPE, aTmp, aTmpItem );
}
break;
diff --git a/editeng/source/uno/UnoForbiddenCharsTable.cxx b/editeng/source/uno/UnoForbiddenCharsTable.cxx
index 7c9a17825a80..9a9b9854b20a 100644
--- a/editeng/source/uno/UnoForbiddenCharsTable.cxx
+++ b/editeng/source/uno/UnoForbiddenCharsTable.cxx
@@ -115,8 +115,8 @@ Sequence< lang::Locale > SAL_CALL SvxUnoForbiddenCharsTable::getLocales()
for( SvxForbiddenCharactersTable::Map::iterator it = mxForbiddenChars->GetMap().begin();
it != mxForbiddenChars->GetMap().end(); ++it )
{
- const sal_uLong nLanguage = it->first;
- *pLocales++ = LanguageTag( static_cast < LanguageType > (nLanguage) ).getLocale();
+ const LanguageType nLanguage = it->first;
+ *pLocales++ = LanguageTag( nLanguage ).getLocale();
}
}
diff --git a/filter/source/msfilter/countryid.cxx b/filter/source/msfilter/countryid.cxx
index 6fa9066d6d85..b2dd7021df62 100644
--- a/filter/source/msfilter/countryid.cxx
+++ b/filter/source/msfilter/countryid.cxx
@@ -276,7 +276,7 @@ inline bool CountryEntryPred_Language::operator()( const CountryEntry& rCmp ) co
// rCmp.mbUseSubLang==true -> compare full language type
// rCmp.mbUseSubLang==false -> compare primary language only
return rCmp.mbUseSubLang ? (meLanguage == rCmp.meLanguage) :
- ((meLanguage & 0x03FF) == (rCmp.meLanguage & 0x03FF));
+ (primary(meLanguage) == primary(rCmp.meLanguage));
}
} // namespace
diff --git a/filter/source/msfilter/svdfppt.cxx b/filter/source/msfilter/svdfppt.cxx
index 2748b61896ae..6b50a7bda803 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -4445,7 +4445,7 @@ PPTCharPropSet::PPTCharPropSet(sal_uInt32 nParagraph)
mnHylinkOrigColor = 0;
mbIsHyperlink = false;
mbHardHylinkOrigColor = false;
- mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0;
+ mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = LANGUAGE_SYSTEM;
}
PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet )
@@ -4475,7 +4475,7 @@ PPTCharPropSet::PPTCharPropSet( const PPTCharPropSet& rCharPropSet, sal_uInt32 n
mnOriginalTextPos = rCharPropSet.mnOriginalTextPos;
maString = rCharPropSet.maString;
mpFieldItem.reset( rCharPropSet.mpFieldItem ? new SvxFieldItem( *rCharPropSet.mpFieldItem ) : nullptr );
- mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = 0;
+ mnLanguage[ 0 ] = mnLanguage[ 1 ] = mnLanguage[ 2 ] = LANGUAGE_SYSTEM;
}
PPTCharPropSet::~PPTCharPropSet()
@@ -4737,9 +4737,9 @@ PPTTextSpecInfo::PPTTextSpecInfo( sal_uInt32 _nCharIdx ) :
nCharIdx ( _nCharIdx ),
nDontKnow ( 1 )
{
- nLanguage[ 0 ] = 0x400;
- nLanguage[ 1 ] = 0;
- nLanguage[ 2 ] = 0;
+ nLanguage[ 0 ] = LANGUAGE_PROCESS_OR_USER_DEFAULT;
+ nLanguage[ 1 ] = LANGUAGE_SYSTEM;
+ nLanguage[ 2 ] = LANGUAGE_SYSTEM;
}
PPTTextSpecInfo::~PPTTextSpecInfo()
@@ -4796,14 +4796,14 @@ bool PPTTextSpecInfoAtomInterpreter::Read( SvStream& rIn, const DffRecordHeader&
if ( nLang )
{
// #i119985#, we could probably handle this better if we have a
- // place to over-ride the final language for weak
+ // place to override the final language for weak
// characters/fields to fallback to, rather than the current
// application locale. Assuming that we can determine what the
// default fallback language for a given .ppt, etc is during
// load time.
if (i == 2)
{
- pEntry->nLanguage[ 0 ] = pEntry->nLanguage[ 1 ] = pEntry->nLanguage[ 2 ] = nLang;
+ pEntry->nLanguage[ 0 ] = pEntry->nLanguage[ 1 ] = pEntry->nLanguage[ 2 ] = LanguageType(nLang);
}
}
nFlags &= ~i;
diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx
index 67c0a2b11d51..2f4c42cbd272 100644
--- a/forms/source/component/FormattedField.cxx
+++ b/forms/source/component/FormattedField.cxx
@@ -672,7 +672,7 @@ void OFormattedModel::write(const Reference<XObjectOutputStream>& _rxOutStream)
if (hasProperty(s_aFormatStringProp, xFormat))
xFormat->getPropertyValue(s_aFormatStringProp) >>= sFormatDescription;
_rxOutStream->writeUTF(sFormatDescription);
- _rxOutStream->writeLong((sal_Int32)eFormatLanguage);
+ _rxOutStream->writeLong((sal_uInt16)eFormatLanguage);
}
// version 2 : write the properties common to all OEditBaseModels
writeCommonEditProperties(_rxOutStream);
@@ -729,7 +729,7 @@ void OFormattedModel::read(const Reference<XObjectInputStream>& _rxInStream)
{
// read string and language...
OUString sFormatDescription = _rxInStream->readUTF();
- LanguageType eDescriptionLanguage = (LanguageType)_rxInStream->readLong();
+ LanguageType eDescriptionLanguage(_rxInStream->readLong());
// and let a formatter roll dice based on that to create a key...
xSupplier = calcFormatsSupplier();
// calcFormatsSupplier first takes the one from the model, then one from the starform, then a new one...
diff --git a/framework/source/services/substitutepathvars.cxx b/framework/source/services/substitutepathvars.cxx
index c3660d2b7320..7b1504ae69f4 100644
--- a/framework/source/services/substitutepathvars.cxx
+++ b/framework/source/services/substitutepathvars.cxx
@@ -671,7 +671,7 @@ void SubstitutePathVariables::SetPredefinedPathVariables()
m_aPreDefVars.m_FixedVar[ PREDEFVAR_VLANG ] = aLocaleStr;
// Set $(langid)
- m_aPreDefVars.m_FixedVar[ PREDEFVAR_LANGID ] = OUString::number( m_aPreDefVars.m_eLanguageType );
+ m_aPreDefVars.m_FixedVar[ PREDEFVAR_LANGID ] = OUString::number( (sal_uInt16)m_aPreDefVars.m_eLanguageType );
// Set the other pre defined path variables
// Set $(work)
diff --git a/i18nlangtag/qa/cppunit/test_languagetag.cxx b/i18nlangtag/qa/cppunit/test_languagetag.cxx
index bec6ed991da0..e2a1cf72a955 100644
--- a/i18nlangtag/qa/cppunit/test_languagetag.cxx
+++ b/i18nlangtag/qa/cppunit/test_languagetag.cxx
@@ -54,7 +54,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("de"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("DE"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_GERMAN), nLanguageType );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_GERMAN, nLanguageType );
CPPUNIT_ASSERT_EQUAL( OUString("de"), de_DE.getLanguage() );
CPPUNIT_ASSERT_EQUAL( OUString("DE"), de_DE.getCountry() );
CPPUNIT_ASSERT( de_DE.getScript().isEmpty() );
@@ -87,7 +87,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("sr"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("RS"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_SERBIAN_CYRILLIC_SERBIA), sr_RS.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_SERBIAN_CYRILLIC_SERBIA, sr_RS.getLanguageType() );
CPPUNIT_ASSERT( sr_RS.isValidBcp47() );
CPPUNIT_ASSERT( sr_RS.isIsoLocale() );
CPPUNIT_ASSERT( sr_RS.isIsoODF() );
@@ -101,7 +101,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("RS"), aLocale.Country );
CPPUNIT_ASSERT_EQUAL( s_sr_Latn_RS, aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_SERBIAN_LATIN_SERBIA), sr_RS.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_SERBIAN_LATIN_SERBIA, sr_RS.getLanguageType() );
CPPUNIT_ASSERT( sr_RS.isValidBcp47() );
CPPUNIT_ASSERT( !sr_RS.isIsoLocale() );
CPPUNIT_ASSERT( sr_RS.isIsoODF() );
@@ -119,7 +119,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("CS"), aLocale.Country );
CPPUNIT_ASSERT_EQUAL( s_sr_Latn_CS, aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_SERBIAN_LATIN_SAM), sr_Latn_CS.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_SERBIAN_LATIN_SAM, sr_Latn_CS.getLanguageType() );
CPPUNIT_ASSERT( sr_Latn_CS.isValidBcp47() );
CPPUNIT_ASSERT( !sr_Latn_CS.isIsoLocale() );
CPPUNIT_ASSERT( sr_Latn_CS.isIsoODF() );
@@ -150,7 +150,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString(I18NLANGTAG_QLT) , aLocale.Language);
CPPUNIT_ASSERT_EQUAL( OUString("RS"), aLocale.Country );
CPPUNIT_ASSERT_EQUAL( OUString("sr-Latn-RS"), aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_SERBIAN_LATIN_SERBIA), sh_RS.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_SERBIAN_LATIN_SERBIA, sh_RS.getLanguageType() );
CPPUNIT_ASSERT( sh_RS.isValidBcp47() );
CPPUNIT_ASSERT( !sh_RS.isIsoLocale() );
CPPUNIT_ASSERT( sh_RS.isIsoODF() );
@@ -168,7 +168,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("sr"), sh_RS_Fallbacks[5]);
CPPUNIT_ASSERT_EQUAL( OUString("sr-Latn-RS"), sh_RS.makeFallback().getBcp47());
CPPUNIT_ASSERT_EQUAL( OUString("sr-Latn-RS"), sh_RS.getBcp47());
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_SERBIAN_LATIN_SERBIA), sh_RS.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_SERBIAN_LATIN_SERBIA, sh_RS.getLanguageType() );
}
// 'bs-Latn-BA' with 'Latn' suppress-script, we map that ourselves for a
@@ -182,7 +182,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("bs"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("BA"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_BOSNIAN_LATIN_BOSNIA_HERZEGOVINA), bs_Latn_BA.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_BOSNIAN_LATIN_BOSNIA_HERZEGOVINA, bs_Latn_BA.getLanguageType() );
CPPUNIT_ASSERT( bs_Latn_BA.isValidBcp47() );
CPPUNIT_ASSERT( bs_Latn_BA.isIsoLocale() );
CPPUNIT_ASSERT( bs_Latn_BA.isIsoODF() );
@@ -196,7 +196,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("bs"), bs_Latn_BA_Fallbacks[1]);
CPPUNIT_ASSERT_EQUAL( OUString("bs-BA"), bs_Latn_BA.makeFallback().getBcp47());
CPPUNIT_ASSERT_EQUAL( OUString("bs-BA"), bs_Latn_BA.getBcp47());
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_BOSNIAN_LATIN_BOSNIA_HERZEGOVINA), bs_Latn_BA.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_BOSNIAN_LATIN_BOSNIA_HERZEGOVINA, bs_Latn_BA.getLanguageType() );
}
{
@@ -207,7 +207,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("ES"), aLocale.Country );
CPPUNIT_ASSERT_EQUAL( s_ca_ES_valencia, aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_CATALAN_VALENCIAN), ca_ES_valencia.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_CATALAN_VALENCIAN, ca_ES_valencia.getLanguageType() );
CPPUNIT_ASSERT( ca_ES_valencia.isValidBcp47() );
CPPUNIT_ASSERT( !ca_ES_valencia.isIsoLocale() );
CPPUNIT_ASSERT( !ca_ES_valencia.isIsoODF() );
@@ -258,7 +258,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString(I18NLANGTAG_QLT) , aLocale.Language);
CPPUNIT_ASSERT_EQUAL( OUString("ES"), aLocale.Country );
CPPUNIT_ASSERT_EQUAL( s_ca_ES_valencia, aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_CATALAN_VALENCIAN), ca_XV.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_CATALAN_VALENCIAN, ca_XV.getLanguageType() );
CPPUNIT_ASSERT( ca_XV.isValidBcp47() );
CPPUNIT_ASSERT( !ca_XV.isIsoLocale() );
CPPUNIT_ASSERT( !ca_XV.isIsoODF() );
@@ -284,7 +284,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("de"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("DE"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_GERMAN), de_DE.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_GERMAN, de_DE.getLanguageType() );
CPPUNIT_ASSERT( de_DE.isValidBcp47() );
CPPUNIT_ASSERT( de_DE.isIsoLocale() );
CPPUNIT_ASSERT( de_DE.isIsoODF() );
@@ -307,7 +307,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("de"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("DE"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_GERMAN), de_DE.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_GERMAN, de_DE.getLanguageType() );
}
{
@@ -318,7 +318,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("de"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("DE"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_GERMAN), de_DE.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_GERMAN, de_DE.getLanguageType() );
}
// Unmapped but known language-only.
@@ -345,7 +345,7 @@ void TestLanguageTag::testAllTags()
LanguageTag bo( "bo", true );
CPPUNIT_ASSERT_EQUAL( MsLangId::getPrimaryLanguage( LANGUAGE_TIBETAN), bo.getLanguageType() );
LanguageTag dz( "dz", true );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_DZONGKHA_MAP_LONLY), dz.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_DZONGKHA_MAP_LONLY, dz.getLanguageType() );
}
// "no", "nb" and "nn" share the same primary language ID, which even is
@@ -355,11 +355,11 @@ void TestLanguageTag::testAllTags()
LanguageTag no( "no", true );
CPPUNIT_ASSERT( LanguageTag::isOnTheFlyID( no.getLanguageType()) );
LanguageTag nb( "nb", true );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_NORWEGIAN_BOKMAL_LSO), nb.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_NORWEGIAN_BOKMAL_LSO, nb.getLanguageType() );
LanguageTag nn( "nn", true );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_NORWEGIAN_NYNORSK_LSO), nn.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_NORWEGIAN_NYNORSK_LSO, nn.getLanguageType() );
LanguageTag no_NO( "no-NO", true );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_NORWEGIAN), no_NO.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_NORWEGIAN, no_NO.getLanguageType() );
}
// 'de-1901' derived from 'de-DE-1901' grandfathered to check that it is
@@ -397,7 +397,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("GB"), aLocale.Country );
CPPUNIT_ASSERT_EQUAL( s_en_GB_oxendict, aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_ENGLISH_UK_OXENDICT), en_GB_oed.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_ENGLISH_UK_OXENDICT, en_GB_oed.getLanguageType() );
CPPUNIT_ASSERT( en_GB_oed.isValidBcp47() );
CPPUNIT_ASSERT( !en_GB_oed.isIsoLocale() );
CPPUNIT_ASSERT( !en_GB_oed.isIsoODF() );
@@ -422,7 +422,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("GB"), aLocale.Country );
CPPUNIT_ASSERT_EQUAL( s_en_GB_oxendict, aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_ENGLISH_UK_OXENDICT), en_GB_oxendict.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_ENGLISH_UK_OXENDICT, en_GB_oxendict.getLanguageType() );
CPPUNIT_ASSERT( en_GB_oxendict.isValidBcp47() );
CPPUNIT_ASSERT( !en_GB_oxendict.isIsoLocale() );
CPPUNIT_ASSERT( !en_GB_oxendict.isIsoODF() );
@@ -476,7 +476,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("qtz"), aLocale.Language );
CPPUNIT_ASSERT( aLocale.Country.isEmpty() );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_KEYID), qtz.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_KEYID, qtz.getLanguageType() );
}
// 'qty' is a local use unknown locale
@@ -511,7 +511,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
CPPUNIT_ASSERT( aLocale.Country.isEmpty() );
CPPUNIT_ASSERT_EQUAL( OUString("x-comment"), aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_PRIV_COMMENT), xcomment.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_PRIV_COMMENT, xcomment.getLanguageType() );
}
// 'x-foobar' is a privateuse unknown "locale"
@@ -535,7 +535,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
CPPUNIT_ASSERT( aLocale.Country.isEmpty() );
CPPUNIT_ASSERT_EQUAL( OUString("*"), aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_PRIV_JOKER), joker.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_PRIV_JOKER, joker.getLanguageType() );
joker.reset( LANGUAGE_USER_PRIV_JOKER );
aLocale = joker.getLocale();
@@ -543,7 +543,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
CPPUNIT_ASSERT( aLocale.Country.isEmpty() );
CPPUNIT_ASSERT_EQUAL( OUString("*"), aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_USER_PRIV_JOKER), joker.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_USER_PRIV_JOKER, joker.getLanguageType() );
}
// 'C' locale shall map to 'en-US'
@@ -556,7 +556,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("en"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("US"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_ENGLISH_US), aTag.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_ENGLISH_US, aTag.getLanguageType() );
}
{
LanguageTag aTag( lang::Locale("C","","") );
@@ -567,7 +567,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("en"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("US"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_ENGLISH_US), aTag.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_ENGLISH_US, aTag.getLanguageType() );
}
// test reset() methods
@@ -581,7 +581,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("de"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("DE"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_GERMAN), aTag.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_GERMAN, aTag.getLanguageType() );
aTag.reset( "en-US" );
aLocale = aTag.getLocale();
@@ -589,7 +589,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("en"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("US"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_ENGLISH_US), aTag.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_ENGLISH_US, aTag.getLanguageType() );
aTag.reset( lang::Locale( "de", "DE", "" ) );
aLocale = aTag.getLocale();
@@ -597,7 +597,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("de"), aLocale.Language );
CPPUNIT_ASSERT_EQUAL( OUString("DE"), aLocale.Country );
CPPUNIT_ASSERT( aLocale.Variant.isEmpty() );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_GERMAN), aTag.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_GERMAN, aTag.getLanguageType() );
}
{
@@ -608,7 +608,7 @@ void TestLanguageTag::testAllTags()
CPPUNIT_ASSERT_EQUAL( OUString("qlt"), aLocale.Language );
CPPUNIT_ASSERT( aLocale.Country.isEmpty() );
CPPUNIT_ASSERT_EQUAL( s_uab, aLocale.Variant );
- CPPUNIT_ASSERT_EQUAL( static_cast<LanguageType>(LANGUAGE_DONTKNOW), uab.getLanguageType() );
+ CPPUNIT_ASSERT_EQUAL( LANGUAGE_DONTKNOW, uab.getLanguageType() );
CPPUNIT_ASSERT( !uab.isValidBcp47() );
CPPUNIT_ASSERT( !uab.isIsoLocale() );
CPPUNIT_ASSERT( !uab.isIsoODF() );
@@ -722,9 +722,9 @@ void TestLanguageTag::testAllIsoLangEntries()
OString aMessage( OUStringToOString( (*it).maBcp47, RTL_TEXTENCODING_ASCII_US));
aMessage += " " + OUStringToOString( aTagString.getBcp47(), RTL_TEXTENCODING_ASCII_US) + ": " +
OUStringToOString( aTagString.getBcp47(), RTL_TEXTENCODING_ASCII_US) + " " +
- OString::number( aTagString.getLanguageType(), 16) +
+ OString::number( (sal_uInt16)aTagString.getLanguageType(), 16) +
" -> " + OUStringToOString( aTagBack.getBcp47(), RTL_TEXTENCODING_ASCII_US) + " " +
- OString::number( aTagBack.getLanguageType(), 16);
+ OString::number( (sal_uInt16)aTagBack.getLanguageType(), 16);
CPPUNIT_ASSERT_EQUAL_MESSAGE( aMessage.getStr(), aTagBack.getLanguageType(), aTagString.getLanguageType());
}
}
diff --git a/i18nlangtag/source/isolang/isolang.cxx b/i18nlangtag/source/isolang/isolang.cxx
index 303b399e130b..3c2d0219f7e0 100644
--- a/i18nlangtag/source/isolang/isolang.cxx
+++ b/i18nlangtag/source/isolang/isolang.cxx
@@ -28,7 +28,7 @@
using namespace com::sun::star;
-static const LanguageType kSAME = 0xffff;
+static const LanguageType kSAME(0xffff);
namespace {
inline LanguageType getOverrideLang( LanguageType nLang, LanguageType nOverride )
@@ -165,157 +165,158 @@ struct IsoLangOtherEntry
* code:
* LANGUAGE_ENGLISH LANGUAGE_ARABIC_PRIMARY_ONLY
*/
+constexpr LanguageType k0(0);
static IsoLanguageCountryEntry const aImplIsoLangEntries[] =
{
// MS-LANGID codes, ISO639-1/2/3, ISO3166, override
- { LANGUAGE_ENGLISH, "en", "" , 0 },
- { LANGUAGE_ENGLISH_US, "en", "US", 0 },
- { LANGUAGE_ENGLISH_UK, "en", "GB", 0 },
- { LANGUAGE_ENGLISH_AUS, "en", "AU", 0 },
- { LANGUAGE_ENGLISH_CAN, "en", "CA", 0 },
- { LANGUAGE_FRENCH, "fr", "FR", 0 },
- { LANGUAGE_GERMAN, "de", "DE", 0 },
- { LANGUAGE_ITALIAN, "it", "IT", 0 },
- { LANGUAGE_DUTCH, "nl", "NL", 0 },
- { LANGUAGE_SPANISH_MODERN, "es", "ES", 0 },
- { LANGUAGE_SPANISH_DATED, "es", "ES", 0 },
- { LANGUAGE_PORTUGUESE, "pt", "PT", 0 },
- { LANGUAGE_PORTUGUESE_BRAZILIAN, "pt", "BR", 0 },
- { LANGUAGE_DANISH, "da", "DK", 0 },
- { LANGUAGE_GREEK, "el", "GR", 0 },
- { LANGUAGE_CHINESE_SIMPLIFIED, "zh", "CN", 0 },
- { LANGUAGE_CHINESE_SIMPLIFIED_LEGACY, "zh", "CN", 0 },
- { LANGUAGE_CHINESE_TRADITIONAL, "zh", "TW", 0 },
- { LANGUAGE_CHINESE_HONGKONG, "zh", "HK", 0 },
- { LANGUAGE_CHINESE_SINGAPORE, "zh", "SG", 0 },
- { LANGUAGE_CHINESE_MACAU, "zh", "MO", 0 },
- { LANGUAGE_CHINESE_LSO, "zh", "" , 0 },
- { LANGUAGE_YUE_CHINESE_HONGKONG, "yue", "HK", 0 },
- { LANGUAGE_ENGLISH_HONG_KONG_SAR, "en", "HK", 0 },
- { LANGUAGE_JAPANESE, "ja", "JP", 0 },
- { LANGUAGE_KOREAN, "ko", "KR", 0 },
- { LANGUAGE_KOREAN_JOHAB, "ko", "KR", 0 },
- { LANGUAGE_USER_KOREAN_NORTH, "ko", "KP", 0 },
- { LANGUAGE_SWEDISH, "sv", "SE", 0 },
- { LANGUAGE_SWEDISH_FINLAND, "sv", "FI", 0 },
- { LANGUAGE_FINNISH, "fi", "FI", 0 },
- { LANGUAGE_RUSSIAN, "ru", "RU", 0 },
- { LANGUAGE_TATAR, "tt", "RU", 0 },
- { LANGUAGE_ENGLISH_NZ, "en", "NZ", 0 },
- { LANGUAGE_ENGLISH_EIRE, "en", "IE", 0 },
- { LANGUAGE_DUTCH_BELGIAN, "nl", "BE", 0 },
- { LANGUAGE_FRENCH_BELGIAN, "fr", "BE", 0 },
- { LANGUAGE_FRENCH_CANADIAN, "fr", "CA", 0 },
- { LANGUAGE_FRENCH_SWISS, "fr", "CH", 0 },
- { LANGUAGE_GERMAN_SWISS, "de", "CH", 0 },
- { LANGUAGE_GERMAN_AUSTRIAN, "de", "AT", 0 },
- { LANGUAGE_ITALIAN_SWISS, "it", "CH", 0 },
- { LANGUAGE_ALBANIAN, "sq", "AL", 0 },
- { LANGUAGE_ARABIC_SAUDI_ARABIA, "ar", "SA", 0 },
- { LANGUAGE_ARABIC_EGYPT, "ar", "EG", 0 },
- { LANGUAGE_ARABIC_UAE, "ar", "AE", 0 },
- { LANGUAGE_ARABIC_IRAQ, "ar", "IQ", 0 },
- { LANGUAGE_ARABIC_LIBYA, "ar", "LY", 0 },
- { LANGUAGE_ARABIC_ALGERIA, "ar", "DZ", 0 },
- { LANGUAGE_ARABIC_MOROCCO, "ar", "MA", 0 },
- { LANGUAGE_ARABIC_TUNISIA, "ar", "TN", 0 },
- { LANGUAGE_ARABIC_OMAN, "ar", "OM", 0 },
- { LANGUAGE_ARABIC_YEMEN, "ar", "YE", 0 },
- { LANGUAGE_ARABIC_SYRIA, "ar", "SY", 0 },
- { LANGUAGE_ARABIC_JORDAN, "ar", "JO", 0 },
- { LANGUAGE_ARABIC_LEBANON, "ar", "LB", 0 },
- { LANGUAGE_ARABIC_KUWAIT, "ar", "KW", 0 },
- { LANGUAGE_ARABIC_BAHRAIN, "ar", "BH", 0 },
- { LANGUAGE_ARABIC_QATAR, "ar", "QA", 0 },
- { LANGUAGE_USER_ARABIC_CHAD, "ar", "TD", 0 },
- { LANGUAGE_USER_ARABIC_COMOROS, "ar", "KM", 0 },
- { LANGUAGE_USER_ARABIC_DJIBOUTI, "ar", "DJ", 0 },
- { LANGUAGE_USER_ARABIC_ERITREA, "ar", "ER", 0 },
- { LANGUAGE_USER_ARABIC_ISRAEL, "ar", "IL", 0 },
- { LANGUAGE_USER_ARABIC_MAURITANIA, "ar", "MR", 0 },
- { LANGUAGE_USER_ARABIC_PALESTINE, "ar", "PS", 0 },
- { LANGUAGE_USER_ARABIC_SOMALIA, "ar", "SO", 0 },
- { LANGUAGE_USER_ARABIC_SUDAN, "ar", "SD", 0 },
- { LANGUAGE_ARABIC_PRIMARY_ONLY, "ar", "" , 0 },
- { LANGUAGE_BASQUE, "eu", "ES", 0 },
+ { LANGUAGE_ENGLISH, "en", "" , k0 },
+ { LANGUAGE_ENGLISH_US, "en", "US", k0 },
+ { LANGUAGE_ENGLISH_UK, "en", "GB", k0 },
+ { LANGUAGE_ENGLISH_AUS, "en", "AU", k0 },
+ { LANGUAGE_ENGLISH_CAN, "en", "CA", k0 },
+ { LANGUAGE_FRENCH, "fr", "FR", k0 },
+ { LANGUAGE_GERMAN, "de", "DE", k0 },
+ { LANGUAGE_ITALIAN, "it", "IT", k0 },
+ { LANGUAGE_DUTCH, "nl", "NL", k0 },
+ { LANGUAGE_SPANISH_MODERN, "es", "ES", k0 },
+ { LANGUAGE_SPANISH_DATED, "es", "ES", k0 },
+ { LANGUAGE_PORTUGUESE, "pt", "PT", k0 },
+ { LANGUAGE_PORTUGUESE_BRAZILIAN, "pt", "BR", k0 },
+ { LANGUAGE_DANISH, "da", "DK", k0 },
+ { LANGUAGE_GREEK, "el", "GR", k0 },
+ { LANGUAGE_CHINESE_SIMPLIFIED, "zh", "CN", k0 },
+ { LANGUAGE_CHINESE_SIMPLIFIED_LEGACY, "zh", "CN", k0 },
+ { LANGUAGE_CHINESE_TRADITIONAL, "zh", "TW", k0 },
+ { LANGUAGE_CHINESE_HONGKONG, "zh", "HK", k0 },
+ { LANGUAGE_CHINESE_SINGAPORE, "zh", "SG", k0 },
+ { LANGUAGE_CHINESE_MACAU, "zh", "MO", k0 },
+ { LANGUAGE_CHINESE_LSO, "zh", "" , k0 },
+ { LANGUAGE_YUE_CHINESE_HONGKONG, "yue", "HK", k0 },
+ { LANGUAGE_ENGLISH_HONG_KONG_SAR, "en", "HK", k0 },
+ { LANGUAGE_JAPANESE, "ja", "JP", k0 },
+ { LANGUAGE_KOREAN, "ko", "KR", k0 },
+ { LANGUAGE_KOREAN_JOHAB, "ko", "KR", k0 },
+ { LANGUAGE_USER_KOREAN_NORTH, "ko", "KP", k0 },
+ { LANGUAGE_SWEDISH, "sv", "SE", k0 },
+ { LANGUAGE_SWEDISH_FINLAND, "sv", "FI", k0 },
+ { LANGUAGE_FINNISH, "fi", "FI", k0 },
+ { LANGUAGE_RUSSIAN, "ru", "RU", k0 },
+ { LANGUAGE_TATAR, "tt", "RU", k0 },
+ { LANGUAGE_ENGLISH_NZ, "en", "NZ", k0 },
+ { LANGUAGE_ENGLISH_EIRE, "en", "IE", k0 },
+ { LANGUAGE_DUTCH_BELGIAN, "nl", "BE", k0 },
+ { LANGUAGE_FRENCH_BELGIAN, "fr", "BE", k0 },
+ { LANGUAGE_FRENCH_CANADIAN, "fr", "CA", k0 },
+ { LANGUAGE_FRENCH_SWISS, "fr", "CH", k0 },
+ { LANGUAGE_GERMAN_SWISS, "de", "CH", k0 },
+ { LANGUAGE_GERMAN_AUSTRIAN, "de", "AT", k0 },
+ { LANGUAGE_ITALIAN_SWISS, "it", "CH", k0 },
+ { LANGUAGE_ALBANIAN, "sq", "AL", k0 },
+ { LANGUAGE_ARABIC_SAUDI_ARABIA, "ar", "SA", k0 },
+ { LANGUAGE_ARABIC_EGYPT, "ar", "EG", k0 },
+ { LANGUAGE_ARABIC_UAE, "ar", "AE", k0 },
+ { LANGUAGE_ARABIC_IRAQ, "ar", "IQ", k0 },
+ { LANGUAGE_ARABIC_LIBYA, "ar", "LY", k0 },
+ { LANGUAGE_ARABIC_ALGERIA, "ar", "DZ", k0 },
+ { LANGUAGE_ARABIC_MOROCCO, "ar", "MA", k0 },
+ { LANGUAGE_ARABIC_TUNISIA, "ar", "TN", k0 },
+ { LANGUAGE_ARABIC_OMAN, "ar", "OM", k0 },
+ { LANGUAGE_ARABIC_YEMEN, "ar", "YE", k0 },
+ { LANGUAGE_ARABIC_SYRIA, "ar", "SY", k0 },
+ { LANGUAGE_ARABIC_JORDAN, "ar", "JO", k0 },
+ { LANGUAGE_ARABIC_LEBANON, "ar", "LB", k0 },
+ { LANGUAGE_ARABIC_KUWAIT, "ar", "KW", k0 },
+ { LANGUAGE_ARABIC_BAHRAIN, "ar", "BH", k0 },
+ { LANGUAGE_ARABIC_QATAR, "ar", "QA", k0 },
+ { LANGUAGE_USER_ARABIC_CHAD, "ar", "TD", k0 },
+ { LANGUAGE_USER_ARABIC_COMOROS, "ar", "KM", k0 },
+ { LANGUAGE_USER_ARABIC_DJIBOUTI, "ar", "DJ", k0 },
+ { LANGUAGE_USER_ARABIC_ERITREA, "ar", "ER", k0 },
+ { LANGUAGE_USER_ARABIC_ISRAEL, "ar", "IL", k0 },
+ { LANGUAGE_USER_ARABIC_MAURITANIA, "ar", "MR", k0 },
+ { LANGUAGE_USER_ARABIC_PALESTINE, "ar", "PS", k0 },
+ { LANGUAGE_USER_ARABIC_SOMALIA, "ar", "SO", k0 },
+ { LANGUAGE_USER_ARABIC_SUDAN, "ar", "SD", k0 },
+ { LANGUAGE_ARABIC_PRIMARY_ONLY, "ar", "" , k0 },
+ { LANGUAGE_BASQUE, "eu", "ES", k0 },
{ LANGUAGE_BASQUE, "eu", "" , kSAME }, // our earlier definition
- { LANGUAGE_BULGARIAN, "bg", "BG", 0 },
- { LANGUAGE_CZECH, "cs", "CZ", 0 },
+ { LANGUAGE_BULGARIAN, "bg", "BG", k0 },
+ { LANGUAGE_CZECH, "cs", "CZ", k0 },
{ LANGUAGE_CZECH, "cz", "" , kSAME },
- { LANGUAGE_ENGLISH_JAMAICA, "en", "JM", 0 },
- { LANGUAGE_ENGLISH_CARRIBEAN, "en", "BS", 0 }, // not 100%, because AG is Bahamas
- { LANGUAGE_ENGLISH_BELIZE, "en", "BZ", 0 },
- { LANGUAGE_ENGLISH_TRINIDAD, "en", "TT", 0 },
- { LANGUAGE_ENGLISH_ZIMBABWE, "en", "ZW", 0 },
- { LANGUAGE_ENGLISH_INDONESIA, "en", "ID", 0 },
- { LANGUAGE_ESTONIAN, "et", "EE", 0 },
- { LANGUAGE_FAEROESE, "fo", "FO", 0 },
- { LANGUAGE_FARSI, "fa", "IR", 0 },
- { LANGUAGE_FRENCH_LUXEMBOURG, "fr", "LU", 0 },
- { LANGUAGE_FRENCH_MONACO, "fr", "MC", 0 },
- { LANGUAGE_GERMAN_LUXEMBOURG, "de", "LU", 0 },
- { LANGUAGE_GERMAN_LIECHTENSTEIN, "de", "LI", 0 },
- { LANGUAGE_HEBREW, "he", "IL", 0 }, // new: old was "iw"
+ { LANGUAGE_ENGLISH_JAMAICA, "en", "JM", k0 },
+ { LANGUAGE_ENGLISH_CARRIBEAN, "en", "BS", k0 }, // not 100%, because AG is Bahamas
+ { LANGUAGE_ENGLISH_BELIZE, "en", "BZ", k0 },
+ { LANGUAGE_ENGLISH_TRINIDAD, "en", "TT", k0 },
+ { LANGUAGE_ENGLISH_ZIMBABWE, "en", "ZW", k0 },
+ { LANGUAGE_ENGLISH_INDONESIA, "en", "ID", k0 },
+ { LANGUAGE_ESTONIAN, "et", "EE", k0 },
+ { LANGUAGE_FAEROESE, "fo", "FO", k0 },
+ { LANGUAGE_FARSI, "fa", "IR", k0 },
+ { LANGUAGE_FRENCH_LUXEMBOURG, "fr", "LU", k0 },
+ { LANGUAGE_FRENCH_MONACO, "fr", "MC", k0 },
+ { LANGUAGE_GERMAN_LUXEMBOURG, "de", "LU", k0 },
+ { LANGUAGE_GERMAN_LIECHTENSTEIN, "de", "LI", k0 },
+ { LANGUAGE_HEBREW, "he", "IL", k0 }, // new: old was "iw"
{ LANGUAGE_HEBREW, "iw", "IL", kSAME }, // old: new is "he"
- { LANGUAGE_HUNGARIAN, "hu", "HU", 0 },
- { LANGUAGE_ICELANDIC, "is", "IS", 0 },
- { LANGUAGE_INDONESIAN, "id", "ID", 0 }, // new: old was "in"
+ { LANGUAGE_HUNGARIAN, "hu", "HU", k0 },
+ { LANGUAGE_ICELANDIC, "is", "IS", k0 },
+ { LANGUAGE_INDONESIAN, "id", "ID", k0 }, // new: old was "in"
{ LANGUAGE_INDONESIAN, "in", "ID", kSAME }, // old: new is "id"
- { LANGUAGE_NORWEGIAN, "no", "NO", 0 },
- { LANGUAGE_NORWEGIAN_BOKMAL, "nb", "NO", 0 },
- { LANGUAGE_NORWEGIAN_BOKMAL_LSO, "nb", "" , 0 },
- { LANGUAGE_NORWEGIAN_NYNORSK, "nn", "NO", 0 },
- { LANGUAGE_NORWEGIAN_NYNORSK_LSO, "nn", "" , 0 },
- { LANGUAGE_POLISH, "pl", "PL", 0 },
- { LANGUAGE_RHAETO_ROMAN, "rm", "CH", 0 },
- { LANGUAGE_ROMANIAN, "ro", "RO", 0 },
- { LANGUAGE_ROMANIAN_MOLDOVA, "ro", "MD", 0 },
- { LANGUAGE_SLOVAK, "sk", "SK", 0 },
- { LANGUAGE_SLOVENIAN, "sl", "SI", 0 },
- { LANGUAGE_SPANISH_MEXICAN, "es", "MX", 0 },
- { LANGUAGE_SPANISH_GUATEMALA, "es", "GT", 0 },
- { LANGUAGE_SPANISH_COSTARICA, "es", "CR", 0 },
- { LANGUAGE_SPANISH_PANAMA, "es", "PA", 0 },
- { LANGUAGE_SPANISH_DOMINICAN_REPUBLIC, "es", "DO", 0 },
- { LANGUAGE_SPANISH_VENEZUELA, "es", "VE", 0 },
- { LANGUAGE_SPANISH_COLOMBIA, "es", "CO", 0 },
- { LANGUAGE_SPANISH_PERU, "es", "PE", 0 },
- { LANGUAGE_SPANISH_ARGENTINA, "es", "AR", 0 },
- { LANGUAGE_SPANISH_ECUADOR, "es", "EC", 0 },
- { LANGUAGE_SPANISH_CHILE, "es", "CL", 0 },
- { LANGUAGE_SPANISH_URUGUAY, "es", "UY", 0 },
- { LANGUAGE_SPANISH_PARAGUAY, "es", "PY", 0 },
- { LANGUAGE_SPANISH_BOLIVIA, "es", "BO", 0 },
- { LANGUAGE_SPANISH_EL_SALVADOR, "es", "SV", 0 },
- { LANGUAGE_SPANISH_HONDURAS, "es", "HN", 0 },
- { LANGUAGE_SPANISH_NICARAGUA, "es", "NI", 0 },
- { LANGUAGE_SPANISH_PUERTO_RICO, "es", "PR", 0 },
- { LANGUAGE_SPANISH_UNITED_STATES, "es", "US", 0 },
- { LANGUAGE_SPANISH_LATIN_AMERICA, "es", "" , 0 },
- { LANGUAGE_TURKISH, "tr", "TR", 0 },
- { LANGUAGE_UKRAINIAN, "uk", "UA", 0 },
- { LANGUAGE_VIETNAMESE, "vi", "VN", 0 },
- { LANGUAGE_LATVIAN, "lv", "LV", 0 },
- { LANGUAGE_MACEDONIAN, "mk", "MK", 0 },
- { LANGUAGE_MALAY_MALAYSIA, "ms", "MY", 0 },
- { LANGUAGE_MALAY_BRUNEI_DARUSSALAM, "ms", "BN", 0 },
- { LANGUAGE_ENGLISH_MALAYSIA, "en", "MY", 0 },
- { LANGUAGE_THAI, "th", "TH", 0 },
- { LANGUAGE_LITHUANIAN, "lt", "LT", 0 },
- { LANGUAGE_LITHUANIAN_CLASSIC, "lt", "LT", 0 },
- { LANGUAGE_CROATIAN, "hr", "HR", 0 }, // Croatian in Croatia
- { LANGUAGE_CROATIAN_BOSNIA_HERZEGOVINA, "hr", "BA", 0 },
- { LANGUAGE_BOSNIAN_LATIN_BOSNIA_HERZEGOVINA, "bs", "BA", 0 },
- { LANGUAGE_BOSNIAN_LSO, "bs", "" , 0 }, // so what is 'bs' vs 'bs-Latn'?
- { LANGUAGE_SERBIAN_CYRILLIC_SERBIA, "sr", "RS", 0 }, // Serbian Cyrillic in Serbia
- { LANGUAGE_OBSOLETE_USER_SERBIAN_CYRILLIC_SERBIA, "sr", "RS", 0 },
- { LANGUAGE_SERBIAN_CYRILLIC_SAM, "sr", "CS", 0 }, // Serbian Cyrillic in Serbia and Montenegro
+ { LANGUAGE_NORWEGIAN, "no", "NO", k0 },
+ { LANGUAGE_NORWEGIAN_BOKMAL, "nb", "NO", k0 },
+ { LANGUAGE_NORWEGIAN_BOKMAL_LSO, "nb", "" , k0 },
+ { LANGUAGE_NORWEGIAN_NYNORSK, "nn", "NO", k0 },
+ { LANGUAGE_NORWEGIAN_NYNORSK_LSO, "nn", "" , k0 },
+ { LANGUAGE_POLISH, "pl", "PL", k0 },
+ { LANGUAGE_RHAETO_ROMAN, "rm", "CH", k0 },
+ { LANGUAGE_ROMANIAN, "ro", "RO", k0 },
+ { LANGUAGE_ROMANIAN_MOLDOVA, "ro", "MD", k0 },
+ { LANGUAGE_SLOVAK, "sk", "SK", k0 },
+ { LANGUAGE_SLOVENIAN, "sl", "SI", k0 },
+ { LANGUAGE_SPANISH_MEXICAN, "es", "MX", k0 },
+ { LANGUAGE_SPANISH_GUATEMALA, "es", "GT", k0 },
+ { LANGUAGE_SPANISH_COSTARICA, "es", "CR", k0 },
+ { LANGUAGE_SPANISH_PANAMA, "es", "PA", k0 },
+ { LANGUAGE_SPANISH_DOMINICAN_REPUBLIC, "es", "DO", k0 },
+ { LANGUAGE_SPANISH_VENEZUELA, "es", "VE", k0 },
+ { LANGUAGE_SPANISH_COLOMBIA, "es", "CO", k0 },
+ { LANGUAGE_SPANISH_PERU, "es", "PE", k0 },
+ { LANGUAGE_SPANISH_ARGENTINA, "es", "AR", k0 },
+ { LANGUAGE_SPANISH_ECUADOR, "es", "EC", k0 },
+ { LANGUAGE_SPANISH_CHILE, "es", "CL", k0 },
+ { LANGUAGE_SPANISH_URUGUAY, "es", "UY", k0 },
+ { LANGUAGE_SPANISH_PARAGUAY, "es", "PY", k0 },
+ { LANGUAGE_SPANISH_BOLIVIA, "es", "BO", k0 },
+ { LANGUAGE_SPANISH_EL_SALVADOR, "es", "SV", k0 },
+ { LANGUAGE_SPANISH_HONDURAS, "es", "HN", k0 },
+ { LANGUAGE_SPANISH_NICARAGUA, "es", "NI", k0 },
+ { LANGUAGE_SPANISH_PUERTO_RICO, "es", "PR", k0 },
+ { LANGUAGE_SPANISH_UNITED_STATES, "es", "US", k0 },
+ { LANGUAGE_SPANISH_LATIN_AMERICA, "es", "" , k0 },
+ { LANGUAGE_TURKISH, "tr", "TR", k0 },
+ { LANGUAGE_UKRAINIAN, "uk", "UA", k0 },
+ { LANGUAGE_VIETNAMESE, "vi", "VN", k0 },
+ { LANGUAGE_LATVIAN, "lv", "LV", k0 },
+ { LANGUAGE_MACEDONIAN, "mk", "MK", k0 },
+ { LANGUAGE_MALAY_MALAYSIA, "ms", "MY", k0 },
+ { LANGUAGE_MALAY_BRUNEI_DARUSSALAM, "ms", "BN", k0 },
+ { LANGUAGE_ENGLISH_MALAYSIA, "en", "MY", k0 },
+ { LANGUAGE_THAI, "th", "TH", k0 },
+ { LANGUAGE_LITHUANIAN, "lt", "LT", k0 },
+ { LANGUAGE_LITHUANIAN_CLASSIC, "lt", "LT", k0 },
+ { LANGUAGE_CROATIAN, "hr", "HR", k0 }, // Croatian in Croatia
+ { LANGUAGE_CROATIAN_BOSNIA_HERZEGOVINA, "hr", "BA", k0 },
+ { LANGUAGE_BOSNIAN_LATIN_BOSNIA_HERZEGOVINA, "bs", "BA", k0 },
+ { LANGUAGE_BOSNIAN_LSO, "bs", "" , k0 }, // so what is 'bs' vs 'bs-Latn'?
+ { LANGUAGE_SERBIAN_CYRILLIC_SERBIA, "sr", "RS", k0 }, // Serbian Cyrillic in Serbia
+ { LANGUAGE_OBSOLETE_USER_SERBIAN_CYRILLIC_SERBIA, "sr", "RS", k0 },
+ { LANGUAGE_SERBIAN_CYRILLIC_SAM, "sr", "CS", k0 }, // Serbian Cyrillic in Serbia and Montenegro
{ LANGUAGE_SERBIAN_CYRILLIC_SAM, "sr", "YU", kSAME }, // legacy Serbian Cyrillic in Serbia and Montenegro (former Yugoslavia); kludge, sr_CS not supported by ICU 2.6 (3.4 does)
- { LANGUAGE_SERBIAN_CYRILLIC_MONTENEGRO, "sr", "ME", 0 },
- { LANGUAGE_OBSOLETE_USER_SERBIAN_CYRILLIC_MONTENEGRO, "sr", "ME", 0 },
- { LANGUAGE_SERBIAN_CYRILLIC_BOSNIA_HERZEGOVINA, "sr", "BA", 0 },
- { LANGUAGE_SERBIAN_CYRILLIC_LSO, "sr", "" , 0 },
+ { LANGUAGE_SERBIAN_CYRILLIC_MONTENEGRO, "sr", "ME", k0 },
+ { LANGUAGE_OBSOLETE_USER_SERBIAN_CYRILLIC_MONTENEGRO, "sr", "ME", k0 },
+ { LANGUAGE_SERBIAN_CYRILLIC_BOSNIA_HERZEGOVINA, "sr", "BA", k0 },
+ { LANGUAGE_SERBIAN_CYRILLIC_LSO, "sr", "" , k0 },
{ LANGUAGE_SERBIAN_LATIN_SERBIA, "sh", "RS", kSAME }, // legacy kludge, is sr-Latn-RS now
{ LANGUAGE_OBSOLETE_USER_SERBIAN_LATIN_SERBIA, "sh", "RS", kSAME }, // legacy kludge, is sr-Latn-RS now
{ LANGUAGE_SERBIAN_LATIN_SAM, "sh", "CS", kSAME }, // legacy kludge, is sr-Latn-CS now
@@ -324,449 +325,449 @@ static IsoLanguageCountryEntry const aImplIsoLangEntries[] =
{ LANGUAGE_OBSOLETE_USER_SERBIAN_LATIN_MONTENEGRO, "sh", "ME", kSAME }, // legacy kludge, is sr-Latn-ME now
{ LANGUAGE_SERBIAN_LATIN_BOSNIA_HERZEGOVINA, "sh", "BA", kSAME }, // legacy kludge, is sr-Latn-BA now
{ LANGUAGE_SERBIAN_LATIN_LSO, "sh", "" , kSAME }, // legacy kludge, is sr-Latn now
- { LANGUAGE_ARMENIAN, "hy", "AM", 0 },
- { LANGUAGE_AZERI_LATIN, "az", "AZ", 0 }, // macrolanguage code
- { LANGUAGE_UZBEK_LATIN, "uz", "UZ", 0 }, // macrolanguage code
- { LANGUAGE_UZBEK_LATIN_LSO, "uz", "" , 0 }, // macrolanguage code
- { LANGUAGE_BENGALI_BANGLADESH, "bn", "BD", 0 },
- { LANGUAGE_BENGALI, "bn", "IN", 0 },
- { LANGUAGE_BURMESE, "my", "MM", 0 },
- { LANGUAGE_KAZAKH, "kk", "KZ", 0 },
- { LANGUAGE_ENGLISH_INDIA, "en", "IN", 0 },
- { LANGUAGE_URDU_INDIA, "ur", "IN", 0 },
- { LANGUAGE_URDU_PAKISTAN, "ur", "PK", 0 },
- { LANGUAGE_HINDI, "hi", "IN", 0 },
- { LANGUAGE_GUJARATI, "gu", "IN", 0 },
- { LANGUAGE_KANNADA, "kn", "IN", 0 },
- { LANGUAGE_ASSAMESE, "as", "IN", 0 },
- { LANGUAGE_KASHMIRI_INDIA, "ks", "IN", 0 },
+ { LANGUAGE_ARMENIAN, "hy", "AM", k0 },
+ { LANGUAGE_AZERI_LATIN, "az", "AZ", k0 }, // macrolanguage code
+ { LANGUAGE_UZBEK_LATIN, "uz", "UZ", k0 }, // macrolanguage code
+ { LANGUAGE_UZBEK_LATIN_LSO, "uz", "" , k0 }, // macrolanguage code
+ { LANGUAGE_BENGALI_BANGLADESH, "bn", "BD", k0 },
+ { LANGUAGE_BENGALI, "bn", "IN", k0 },
+ { LANGUAGE_BURMESE, "my", "MM", k0 },
+ { LANGUAGE_KAZAKH, "kk", "KZ", k0 },
+ { LANGUAGE_ENGLISH_INDIA, "en", "IN", k0 },
+ { LANGUAGE_URDU_INDIA, "ur", "IN", k0 },
+ { LANGUAGE_URDU_PAKISTAN, "ur", "PK", k0 },
+ { LANGUAGE_HINDI, "hi", "IN", k0 },
+ { LANGUAGE_GUJARATI, "gu", "IN", k0 },
+ { LANGUAGE_KANNADA, "kn", "IN", k0 },
+ { LANGUAGE_ASSAMESE, "as", "IN", k0 },
+ { LANGUAGE_KASHMIRI_INDIA, "ks", "IN", k0 },
{ LANGUAGE_KASHMIRI, "ks", "" , kSAME }, // Kashmiri in "Jammu and Kashmir" ... no ISO3166 code for that
- { LANGUAGE_MALAYALAM, "ml", "IN", 0 },
- { LANGUAGE_MANIPURI, "mni", "IN", 0 },
- { LANGUAGE_MARATHI, "mr", "IN", 0 },
- { LANGUAGE_KONKANI, "kok", "IN", 0 },
- { LANGUAGE_NEPALI, "ne", "NP", 0 },
- { LANGUAGE_NEPALI_INDIA, "ne", "IN", 0 },
- { LANGUAGE_ODIA, "or", "IN", 0 },
- { LANGUAGE_PUNJABI, "pa", "IN", 0 },
- { LANGUAGE_SANSKRIT, "sa", "IN", 0 },
- { LANGUAGE_TAMIL, "ta", "IN", 0 },
- { LANGUAGE_TAMIL_SRI_LANKA, "ta", "LK", 0 },
- { LANGUAGE_TELUGU, "te", "IN", 0 },
- { LANGUAGE_PUNJABI_PAKISTAN, "pnb", "PK", 0 },
- { LANGUAGE_PUNJABI_ARABIC_LSO, "pnb", "" , 0 },
+ { LANGUAGE_MALAYALAM, "ml", "IN", k0 },
+ { LANGUAGE_MANIPURI, "mni", "IN", k0 },
+ { LANGUAGE_MARATHI, "mr", "IN", k0 },
+ { LANGUAGE_KONKANI, "kok", "IN", k0 },
+ { LANGUAGE_NEPALI, "ne", "NP", k0 },
+ { LANGUAGE_NEPALI_INDIA, "ne", "IN", k0 },
+ { LANGUAGE_ODIA, "or", "IN", k0 },
+ { LANGUAGE_PUNJABI, "pa", "IN", k0 },
+ { LANGUAGE_SANSKRIT, "sa", "IN", k0 },
+ { LANGUAGE_TAMIL, "ta", "IN", k0 },
+ { LANGUAGE_TAMIL_SRI_LANKA, "ta", "LK", k0 },
+ { LANGUAGE_TELUGU, "te", "IN", k0 },
+ { LANGUAGE_PUNJABI_PAKISTAN, "pnb", "PK", k0 },
+ { LANGUAGE_PUNJABI_ARABIC_LSO, "pnb", "" , k0 },
{ LANGUAGE_PUNJABI_PAKISTAN, "lah", "PK", kSAME }, // macrolanguage code, earlier preferred 'lah' over 'pa' for Western Panjabi, now there is 'pnb'
{ LANGUAGE_PUNJABI_PAKISTAN, "pa", "PK", kSAME }, // MS maps this to 'pa-Arab-PK', but 'pa'='pan' Eastern Panjabi is not used in PK, only in
{ LANGUAGE_SINDHI_PAKISTAN, "sd", "PK", kSAME }, // Arabic script
- { LANGUAGE_SINDHI, "sd", "IN", 0 }, // TODO: there's Deva(nagari) and Arab(ic) script, MS maps this to 'sd-Deva-IN'
- { LANGUAGE_BELARUSIAN, "be", "BY", 0 },
- { LANGUAGE_CATALAN, "ca", "ES", 0 }, // Spain (default)
- { LANGUAGE_CATALAN, "ca", "AD", 0 }, // Andorra
+ { LANGUAGE_SINDHI, "sd", "IN", k0 }, // TODO: there's Deva(nagari) and Arab(ic) script, MS maps this to 'sd-Deva-IN'
+ { LANGUAGE_BELARUSIAN, "be", "BY", k0 },
+ { LANGUAGE_CATALAN, "ca", "ES", k0 }, // Spain (default)
+ { LANGUAGE_CATALAN, "ca", "AD", k0 }, // Andorra
//LANGUAGE_CATALAN_VALENCIAN ca-ES-valencia Bcp47CountryEntry takes precedence
{ LANGUAGE_CATALAN_VALENCIAN, "ca", "XV", kSAME }, // XV: ISO 3166 user-assigned; old workaround for UI localization only, in case it escaped to document content
{ LANGUAGE_CATALAN_VALENCIAN, "qcv", "ES", kSAME }, // qcv: ISO 639-3 reserved-for-local-use; old UI localization quirk only, in case it escaped to document content
- { LANGUAGE_FRENCH_CAMEROON, "fr", "CM", 0 },
- { LANGUAGE_FRENCH_COTE_D_IVOIRE, "fr", "CI", 0 },
- { LANGUAGE_FRENCH_MALI, "fr", "ML", 0 },
- { LANGUAGE_FRENCH_SENEGAL, "fr", "SN", 0 },
- { LANGUAGE_FRENCH_ZAIRE, "fr", "CD", 0 }, // Democratic Republic Of Congo
- { LANGUAGE_FRENCH_MOROCCO, "fr", "MA", 0 },
- { LANGUAGE_FRENCH_REUNION, "fr", "RE", 0 },
- { LANGUAGE_FRENCH, "fr", "" , 0 }, // needed as a catcher before other "fr" entries!
- { LANGUAGE_FRENCH_NORTH_AFRICA, "fr", "" , 0 },
- { LANGUAGE_FRENCH_WEST_INDIES, "fr", "" , 0 }, // no ISO country code; MS "Neither defined nor reserved"
- { LANGUAGE_FRISIAN_NETHERLANDS, "fy", "NL", 0 },
- { LANGUAGE_GAELIC_IRELAND, "ga", "IE", 0 },
- { LANGUAGE_GAELIC_SCOTLAND, "gd", "GB", 0 },
- { LANGUAGE_GAELIC_SCOTLAND_LEGACY, "gd", "GB", 0 },
- { LANGUAGE_GALICIAN, "gl", "ES", 0 },
- { LANGUAGE_GEORGIAN, "ka", "GE", 0 },
- { LANGUAGE_KHMER, "km", "KH", 0 },
- { LANGUAGE_KIRGHIZ, "ky", "KG", 0 },
- { LANGUAGE_LAO, "lo", "LA", 0 },
- { LANGUAGE_MALTESE, "mt", "MT", 0 },
- { LANGUAGE_MONGOLIAN_CYRILLIC_MONGOLIA, "mn", "MN", 0 }, // macrolanguage code; should be khk-MN; Cyrillic script
- { LANGUAGE_MONGOLIAN_CYRILLIC_LSO, "mn", "" , 0 }, // macrolanguage code; should be khk; Cyrillic script
- { LANGUAGE_ROMANIAN_MOLDOVA, "ro", "MD", 0 },
- { LANGUAGE_ROMANIAN_MOLDOVA, "mo", "MD", 0 }, // mo-MD was associated with Russian Moldova LCID, apparently an error; 'mo' is retired, merged with 'ro', see http://www-01.sil.org/iso639-3/documentation.asp?id=mol
- { LANGUAGE_RUSSIAN_MOLDOVA, "ru", "MD", 0 }, // as per [MS-LCID] rev. 7.0 2015-06-30
- { LANGUAGE_SWAHILI, "sw", "KE", 0 },
- { LANGUAGE_USER_SWAHILI_TANZANIA, "sw", "TZ", 0 },
- { LANGUAGE_TAJIK, "tg", "TJ", 0 },
- { LANGUAGE_TAJIK_LSO, "tg", "" , 0 },
- { LANGUAGE_TIBETAN, "bo", "CN", 0 }, // CN politically correct?
- { LANGUAGE_USER_TIBETAN_INDIA, "bo", "IN", 0 },
- { LANGUAGE_USER_TIBETAN_BHUTAN, "bo", "BT", 0 },
- { LANGUAGE_DZONGKHA_BHUTAN, "dz", "BT", 0 },
- { LANGUAGE_TIBETAN_BHUTAN, "dz", "BT", 0 }, // MS reserved for bo-BT, but LCID was used as Dzongkha, see #i53497#
- { LANGUAGE_USER_DZONGKHA_MAP_LONLY, "dz", "" , 0 }, // because of the MS error, see lang.h
- { LANGUAGE_TURKMEN, "tk", "TM", 0 },
- { LANGUAGE_WELSH, "cy", "GB", 0 },
- { LANGUAGE_SESOTHO, "st", "ZA", 0 },
- { LANGUAGE_SEPEDI, "nso", "ZA", 0 },
+ { LANGUAGE_FRENCH_CAMEROON, "fr", "CM", k0 },
+ { LANGUAGE_FRENCH_COTE_D_IVOIRE, "fr", "CI", k0 },
+ { LANGUAGE_FRENCH_MALI, "fr", "ML", k0 },
+ { LANGUAGE_FRENCH_SENEGAL, "fr", "SN", k0 },
+ { LANGUAGE_FRENCH_ZAIRE, "fr", "CD", k0 }, // Democratic Republic Of Congo
+ { LANGUAGE_FRENCH_MOROCCO, "fr", "MA", k0 },
+ { LANGUAGE_FRENCH_REUNION, "fr", "RE", k0 },
+ { LANGUAGE_FRENCH, "fr", "" , k0 }, // needed as a catcher before other "fr" entries!
+ { LANGUAGE_FRENCH_NORTH_AFRICA, "fr", "" , k0 },
+ { LANGUAGE_FRENCH_WEST_INDIES, "fr", "" , k0 }, // no ISO country code; MS "Neither defined nor reserved"
+ { LANGUAGE_FRISIAN_NETHERLANDS, "fy", "NL", k0 },
+ { LANGUAGE_GAELIC_IRELAND, "ga", "IE", k0 },
+ { LANGUAGE_GAELIC_SCOTLAND, "gd", "GB", k0 },
+ { LANGUAGE_GAELIC_SCOTLAND_LEGACY, "gd", "GB", k0 },
+ { LANGUAGE_GALICIAN, "gl", "ES", k0 },
+ { LANGUAGE_GEORGIAN, "ka", "GE", k0 },
+ { LANGUAGE_KHMER, "km", "KH", k0 },
+ { LANGUAGE_KIRGHIZ, "ky", "KG", k0 },
+ { LANGUAGE_LAO, "lo", "LA", k0 },
+ { LANGUAGE_MALTESE, "mt", "MT", k0 },
+ { LANGUAGE_MONGOLIAN_CYRILLIC_MONGOLIA, "mn", "MN", k0 }, // macrolanguage code; should be khk-MN; Cyrillic script
+ { LANGUAGE_MONGOLIAN_CYRILLIC_LSO, "mn", "" , k0 }, // macrolanguage code; should be khk; Cyrillic script
+ { LANGUAGE_ROMANIAN_MOLDOVA, "ro", "MD", k0 },
+ { LANGUAGE_ROMANIAN_MOLDOVA, "mo", "MD", k0 }, // mo-MD was associated with Russian Moldova LCID, apparently an error; 'mo' is retired, merged with 'ro', see http://www-01.sil.org/iso639-3/documentation.asp?id=mol
+ { LANGUAGE_RUSSIAN_MOLDOVA, "ru", "MD", k0 }, // as per [MS-LCID] rev. 7.0 2015-06-30
+ { LANGUAGE_SWAHILI, "sw", "KE", k0 },
+ { LANGUAGE_USER_SWAHILI_TANZANIA, "sw", "TZ", k0 },
+ { LANGUAGE_TAJIK, "tg", "TJ", k0 },
+ { LANGUAGE_TAJIK_LSO, "tg", "" , k0 },
+ { LANGUAGE_TIBETAN, "bo", "CN", k0 }, // CN politically correct?
+ { LANGUAGE_USER_TIBETAN_INDIA, "bo", "IN", k0 },
+ { LANGUAGE_USER_TIBETAN_BHUTAN, "bo", "BT", k0 },
+ { LANGUAGE_DZONGKHA_BHUTAN, "dz", "BT", k0 },
+ { LANGUAGE_TIBETAN_BHUTAN, "dz", "BT", k0 }, // MS reserved for bo-BT, but LCID was used as Dzongkha, see #i53497#
+ { LANGUAGE_USER_DZONGKHA_MAP_LONLY, "dz", "" , k0 }, // because of the MS error, see lang.h
+ { LANGUAGE_TURKMEN, "tk", "TM", k0 },
+ { LANGUAGE_WELSH, "cy", "GB", k0 },
+ { LANGUAGE_SESOTHO, "st", "ZA", k0 },
+ { LANGUAGE_SEPEDI, "nso", "ZA", k0 },
{ LANGUAGE_SEPEDI, "ns", "ZA", kSAME }, // fake "ns" for compatibility with existing OOo1.1.x localization to be able to read those documents
- { LANGUAGE_TSONGA, "ts", "ZA", 0 },
- { LANGUAGE_TSWANA, "tn", "ZA", 0 },
- { LANGUAGE_ENGLISH_SAFRICA, "en", "ZA", 0 },
- { LANGUAGE_AFRIKAANS, "af", "ZA", 0 },
- { LANGUAGE_VENDA, "ve", "ZA", 0 }, // default 639-1
+ { LANGUAGE_TSONGA, "ts", "ZA", k0 },
+ { LANGUAGE_TSWANA, "tn", "ZA", k0 },
+ { LANGUAGE_ENGLISH_SAFRICA, "en", "ZA", k0 },
+ { LANGUAGE_AFRIKAANS, "af", "ZA", k0 },
+ { LANGUAGE_VENDA, "ve", "ZA", k0 }, // default 639-1
{ LANGUAGE_VENDA, "ven", "ZA", kSAME }, // 639-2 may have been used temporarily since 2004-07-23
- { LANGUAGE_XHOSA, "xh", "ZA", 0 },
- { LANGUAGE_ZULU, "zu", "ZA", 0 },
-// { LANGUAGE_QUECHUA_COLOMBIA, "quc", "CO", 0 }, // MS reserved, and looks wrong, quc would be in Guatemala, not Colombia
- { LANGUAGE_QUECHUA_ECUADOR, "quz", "EC", 0 }, // MS
+ { LANGUAGE_XHOSA, "xh", "ZA", k0 },
+ { LANGUAGE_ZULU, "zu", "ZA", k0 },
+// { LANGUAGE_QUECHUA_COLOMBIA, "quc", "CO", k0 }, // MS reserved, and looks wrong, quc would be in Guatemala, not Colombia
+ { LANGUAGE_QUECHUA_ECUADOR, "quz", "EC", k0 }, // MS
{ LANGUAGE_QUECHUA_ECUADOR, "qu", "EC", kSAME }, // macrolanguage code
- { LANGUAGE_QUECHUA_PERU, "quz", "PE", 0 }, // MS
+ { LANGUAGE_QUECHUA_PERU, "quz", "PE", k0 }, // MS
{ LANGUAGE_QUECHUA_PERU, "qu", "PE", kSAME }, // macrolanguage code
- { LANGUAGE_QUECHUA_BOLIVIA, "qu", "BO", 0 }, // macrolanguage code, TODO instead: quh-BO or qul-BO; MS says quz-BO which is wrong
- { LANGUAGE_PASHTO, "ps", "AF", 0 },
- { LANGUAGE_OROMO, "om", "ET", 0 },
- { LANGUAGE_DHIVEHI, "dv", "MV", 0 },
- { LANGUAGE_UIGHUR_CHINA, "ug", "CN", 0 },
- { LANGUAGE_TIGRIGNA_ETHIOPIA, "ti", "ET", 0 },
- { LANGUAGE_TIGRIGNA_ERITREA, "ti", "ER", 0 },
- { LANGUAGE_AMHARIC_ETHIOPIA, "am", "ET", 0 },
- { LANGUAGE_GUARANI_PARAGUAY, "gug", "PY", 0 },
- { LANGUAGE_HAWAIIAN_UNITED_STATES, "haw", "US", 0 },
- { LANGUAGE_EDO, "bin", "NG", 0 },
- { LANGUAGE_FULFULDE_NIGERIA, "fuv", "NG", 0 },
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list