summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2012-11-16 23:22:11 +0100
committerEike Rathke <erack@redhat.com>2012-11-16 23:25:22 +0100
commit378e437fbe313e87b7e56f8f0a1fc4009470679c (patch)
tree7a1d6aea330b484521f7625acc5873546f5508cd
parent9e818a2381e75928fbd2a208f79ff67712bdad59 (diff)
use LanguageTag
Change-Id: If056193c803f70f8707373ed7ff7b1abbf953852
-rw-r--r--editeng/source/editeng/editeng.cxx2
-rw-r--r--editeng/source/editeng/editview.cxx4
-rw-r--r--editeng/source/items/textitem.cxx6
-rw-r--r--editeng/source/misc/svxacorr.cxx2
-rw-r--r--editeng/source/misc/unolingu.cxx10
-rw-r--r--editeng/source/outliner/outlvw.cxx4
6 files changed, 14 insertions, 14 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index f437564ff91e..8b191ea116fb 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1362,7 +1362,7 @@ sal_Bool EditEngine::PostKeyEvent( const KeyEvent& rKeyEvent, EditView* pEditVie
String aComplete;
LanguageType eLang = pImpEditEngine->GetLanguage( EditPaM( aStart.GetNode(), aStart.GetIndex()+1));
- lang::Locale aLocale( MsLangId::convertLanguageToLocale( eLang));
+ lang::Locale aLocale( LanguageTag( eLang).getLocale());
if (!pImpEditEngine->xLocaleDataWrapper.isInitialized())
pImpEditEngine->xLocaleDataWrapper.init( SvtSysLocale().GetLocaleData().getComponentContext(), aLocale, eLang);
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 1ed54fc3d252..86084a7a1de0 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -27,7 +27,7 @@
#include <com/sun/star/i18n/WordType.hpp>
#include <vcl/metric.hxx>
-#include <i18npool/mslangid.hxx>
+#include <i18npool/languagetag.hxx>
#include <svl/languageoptions.hxx>
#include <svtools/ctrltool.hxx>
#include <svtools/langtab.hxx>
@@ -102,7 +102,7 @@ static LanguageType lcl_CheckLanguage(
nLang = nTmpLang;
}
if (nLang == LANGUAGE_NONE) // language not found by looking up the sytem language...
- nLang = MsLangId::convertLocaleToLanguageWithFallback( aLocale );
+ nLang = LanguageTag( aLocale ).makeFallback().getLanguageType();
if (nLang == LANGUAGE_SYSTEM)
nLang = nTmpLang;
if (nLang == LANGUAGE_DONTKNOW)
diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index 401ca6f8a0d2..25f998b047db 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -37,7 +37,7 @@
#include <tools/tenccvt.hxx>
#include <rtl/ustring.hxx>
-#include <i18npool/mslangid.hxx>
+#include <i18npool/languagetag.hxx>
#include <svl/itemset.hxx>
#include <svtools/langtab.hxx>
@@ -2607,7 +2607,7 @@ bool SvxLanguageItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
rVal <<= (sal_Int16)(GetValue());
break;
case MID_LANG_LOCALE:
- lang::Locale aRet( MsLangId::convertLanguageToLocale( GetValue(), false));
+ lang::Locale aRet( LanguageTag( GetValue()).getLocale( false));
rVal <<= aRet;
break;
}
@@ -2635,7 +2635,7 @@ bool SvxLanguageItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId )
return sal_False;
if (!aLocale.Language.isEmpty() || !aLocale.Country.isEmpty())
- SetValue(MsLangId::convertLocaleToLanguage( aLocale ));
+ SetValue( LanguageTag( aLocale ).getLanguageType( false));
else
SetValue(LANGUAGE_NONE);
}
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 3f2298a9730f..d8ae94cc93d5 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1905,7 +1905,7 @@ sal_Bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
String SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang,
sal_Bool bNewFile, sal_Bool bTst ) const
{
- String sRet, sExt( MsLangId::convertLanguageToIsoString( eLang ) );
+ String sRet, sExt( LanguageTag( eLang ).getBcp47() );
sExt.Insert('_', 0);
sExt.AppendAscii( ".dat" );
if( bNewFile )
diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx
index 022ab11158a5..46486363fafb 100644
--- a/editeng/source/misc/unolingu.cxx
+++ b/editeng/source/misc/unolingu.cxx
@@ -40,7 +40,7 @@
#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase1.hxx> // helper for implementations
-#include <i18npool/mslangid.hxx>
+#include <i18npool/languagetag.hxx>
#include <unotools/lingucfg.hxx>
#include <unotools/ucbhelper.hxx>
#include <unotools/localfilehelper.hxx>
@@ -131,7 +131,7 @@ void ThesDummy_Impl::GetCfgLocales()
for (sal_Int32 i = 0; i < nLen; ++i)
{
pLocale[i] = SvxCreateLocale(
- MsLangId::convertIsoStringToLanguage( pNodeNames[i] ) );
+ LanguageTag( pNodeNames[i] ).getLanguageType() );
}
}
}
@@ -877,13 +877,13 @@ LanguageType SvxLocaleToLanguage( const Locale& rLocale )
if ( rLocale.Language.isEmpty() )
return LANGUAGE_NONE;
- return MsLangId::convertLocaleToLanguage( rLocale );
+ return LanguageTag( rLocale ).getLanguageType();
}
Locale& SvxLanguageToLocale( Locale& rLocale, LanguageType eLang )
{
if ( eLang != LANGUAGE_NONE )
- MsLangId::convertLanguageToLocale( eLang, rLocale );
+ rLocale = LanguageTag( eLang ).getLocale();
else
rLocale = Locale();
@@ -894,7 +894,7 @@ Locale SvxCreateLocale( LanguageType eLang )
{
Locale aLocale;
if ( eLang != LANGUAGE_NONE )
- MsLangId::convertLanguageToLocale( eLang, aLocale );
+ aLocale = LanguageTag( eLang ).getLocale();
return aLocale;
}
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index d96d7556afed..eb3f877fcde6 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -28,7 +28,7 @@
#include <editeng/fhgtitem.hxx>
#include <svl/style.hxx>
-#include <i18npool/mslangid.hxx>
+#include <i18npool/languagetag.hxx>
#define _OUTLINER_CXX
#include <editeng/outliner.hxx>
@@ -1325,7 +1325,7 @@ bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext(
aText = pEditEngine->GetText( aTextSel );
aTextSel.Adjust();
LanguageType nLang = pEditEngine->GetLanguage( aTextSel.nStartPara, aTextSel.nStartPos );
- String aLangText( MsLangId::convertLanguageToIsoString( nLang ) );
+ String aLangText( LanguageTag( nLang ).getBcp47() );
// set word and locale to look up as status value
String aStatusVal( aText );