diff options
author | Eike Rathke <erack@redhat.com> | 2012-11-22 12:26:52 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2012-11-22 12:34:59 +0100 |
commit | 9955dbebbdf1b7d36fec272dfea46f57fab47e19 (patch) | |
tree | 80705ccc2382e7440ea76f62a544d64d12d1ce4f /sw | |
parent | 9c5d6ea5efb5f56a4ac96b4a8505ed84abbbc6bf (diff) |
AllSettings with LanguageTag
Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d
Diffstat (limited to 'sw')
-rw-r--r-- | sw/CppunitTest_sw_subsequent_rtfimport.mk | 1 | ||||
-rw-r--r-- | sw/qa/extras/rtfimport/rtfimport.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/access/acccontext.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/bastyp/init.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8scan.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/app/docshini.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/config/optpage.cxx | 2 | ||||
-rw-r--r-- | sw/source/ui/docvw/srcedtw.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/lingu/olmenu.cxx | 10 |
9 files changed, 15 insertions, 18 deletions
diff --git a/sw/CppunitTest_sw_subsequent_rtfimport.mk b/sw/CppunitTest_sw_subsequent_rtfimport.mk index 599c96182c8f..ca1c00c8de9b 100644 --- a/sw/CppunitTest_sw_subsequent_rtfimport.mk +++ b/sw/CppunitTest_sw_subsequent_rtfimport.mk @@ -38,6 +38,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_subsequent_rtfimport, \ cppu \ cppuhelper \ sal \ + i18nisolang1 \ sw \ test \ unotest \ diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx index e114af297f05..cc2087999b8e 100644 --- a/sw/qa/extras/rtfimport/rtfimport.cxx +++ b/sw/qa/extras/rtfimport/rtfimport.cxx @@ -210,17 +210,13 @@ void Test::run() if (OString(rEntry.pName) == "fdo48023.rtf") { AllSettings aSettings(aSavedSettings); - lang::Locale aLocale; - aLocale.Language = "ru"; - aSettings.SetLocale(aLocale); + aSettings.SetLanguageTag(LanguageTag("ru")); Application::SetSettings(aSettings); } else if (OString(rEntry.pName) == "fdo44211.rtf") { AllSettings aSettings(aSavedSettings); - lang::Locale aLocale; - aLocale.Language = "lt"; - aSettings.SetLocale(aLocale); + aSettings.SetLanguageTag(LanguageTag("lt")); Application::SetSettings(aSettings); } mxComponent = loadFromDesktop(getURLFromSrc("/sw/qa/extras/rtfimport/data/") + OUString::createFromAscii(rEntry.pName)); diff --git a/sw/source/core/access/acccontext.cxx b/sw/source/core/access/acccontext.cxx index d4efa24e2dab..ee8378706bce 100644 --- a/sw/source/core/access/acccontext.cxx +++ b/sw/source/core/access/acccontext.cxx @@ -702,7 +702,7 @@ lang::Locale SAL_CALL SwAccessibleContext::getLocale (void) { SolarMutexGuard aGuard; - lang::Locale aLoc( Application::GetSettings().GetLocale() ); + lang::Locale aLoc( Application::GetSettings().GetLanguageTag().getLocale() ); return aLoc; } diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index ede0dbdb1f6f..678e074a6c3d 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -824,7 +824,7 @@ void SwCalendarWrapper::LoadDefaultCalendar( sal_uInt16 eLang ) LanguageType GetAppLanguage() { - return Application::GetSettings().GetLanguage(); + return Application::GetSettings().GetLanguageTag().getLanguageType(); } CollatorWrapper& GetAppCollator() diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx index f74bd1dc4702..925543b3acfd 100644 --- a/sw/source/filter/ww8/ww8scan.cxx +++ b/sw/source/filter/ww8/ww8scan.cxx @@ -5581,7 +5581,7 @@ WW8Fib::WW8Fib(sal_uInt8 nVer) // --> #i90932# lid = 0x409; // LANGUAGE_ENGLISH_US - LanguageType nLang = Application::GetSettings().GetLanguage(); + LanguageType nLang = Application::GetSettings().GetLanguageTag().getLanguageType(); fFarEast = MsLangId::isCJK(nLang); if (fFarEast) lidFE = nLang; diff --git a/sw/source/ui/app/docshini.cxx b/sw/source/ui/app/docshini.cxx index e0ce4e011849..b92062a343fd 100644 --- a/sw/source/ui/app/docshini.cxx +++ b/sw/source/ui/app/docshini.cxx @@ -213,7 +213,7 @@ sal_Bool SwDocShell::InitNew( const uno::Reference < embed::XStorage >& xStor ) // #107782# OJ use korean language if latin was used if ( i == 0 ) { - LanguageType eUiLanguage = Application::GetSettings().GetUILanguage(); + LanguageType eUiLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType(); if (MsLangId::isKorean(eUiLanguage)) eLanguage = eUiLanguage; } diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 70d3d8549097..2376e8f16a12 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -2251,7 +2251,7 @@ IMPL_LINK_NOARG(SwRedlineOptionsTabPage, ChangedMaskPrevHdl) void SwRedlineOptionsTabPage::InitFontStyle(SvxFontPrevWindow& rExampleWin) { const AllSettings& rAllSettings = Application::GetSettings(); - LanguageType eLangType = rAllSettings.GetUILanguage(); + LanguageType eLangType = rAllSettings.GetUILanguageTag().getLanguageType(); Color aBackCol( rAllSettings.GetStyleSettings().GetWindowColor() ); SvxFont& rFont = rExampleWin.GetFont(); SvxFont& rCJKFont = rExampleWin.GetCJKFont(); diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index c97bef2f8385..405000e017b2 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -963,7 +963,7 @@ static sal_Bool lcl_GetLanguagesForEncoding(rtl_TextEncoding eEnc, LanguageType case RTL_TEXTENCODING_TIS_620 : aLanguages[0] = LANGUAGE_THAI; break; - default: aLanguages[0] = Application::GetSettings().GetUILanguage(); + default: aLanguages[0] = Application::GetSettings().GetUILanguageTag().getLanguageType(); } return aLanguages[0] != LANGUAGE_SYSTEM; } @@ -986,7 +986,7 @@ void SwSrcEditWindow::SetFont() } else aFont = OutputDevice::GetDefaultFont(DEFAULTFONT_SANS_UNICODE, - Application::GetSettings().GetLanguage(), 0, this); + Application::GetSettings().GetLanguageTag().getLanguageType(), 0, this); sFontName = aFont.GetName(); } const SvxFontListItem* pFontListItem = diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index a7013114da55..9bc947ef4569 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -118,7 +118,7 @@ static LanguageType lcl_CheckLanguage( lang::Locale aLocale( xLangGuess->guessPrimaryLanguage( rText, 0, rText.getLength()) ); // get language as from "Tools/Options - Language Settings - Languages: Locale setting" - LanguageType nTmpLang = Application::GetSettings().GetLanguage(); + LanguageType nTmpLang = Application::GetSettings().GetLanguageTag().getLanguageType(); // if the result from language guessing does not provide a 'Country' part // try to get it by looking up the locale setting of the office. @@ -150,9 +150,9 @@ static LanguageType lcl_CheckLanguage( // The default document language from "Tools/Options - Language Settings - Languages: Western" aLangList[0] = MsLangId::resolveSystemLanguageByScriptType(aLinguOpt.nDefaultLanguage, ::com::sun::star::i18n::ScriptType::LATIN); // The one from "Tools/Options - Language Settings - Languages: User interface" - aLangList[1] = rSettings.GetUILanguage(); + aLangList[1] = rSettings.GetUILanguageTag().getLanguageType(); // The one from "Tools/Options - Language Settings - Languages: Locale setting" - aLangList[2] = rSettings.GetLanguage(); + aLangList[2] = rSettings.GetLanguageTag().getLanguageType(); // en-US aLangList[3] = LANGUAGE_ENGLISH_US; #if OSL_DEBUG_LEVEL > 1 @@ -223,7 +223,7 @@ void SwSpellPopup::fillLangPopupMenu( //2--System const AllSettings& rAllSettings = Application::GetSettings(); - LanguageType rSystemLanguage = rAllSettings.GetLanguage(); + LanguageType rSystemLanguage = rAllSettings.GetLanguageTag().getLanguageType(); if (rSystemLanguage != LANGUAGE_DONTKNOW) { if (lcl_checkScriptType( nScriptType, rSystemLanguage )) @@ -231,7 +231,7 @@ void SwSpellPopup::fillLangPopupMenu( } //3--UI - LanguageType rUILanguage = rAllSettings.GetUILanguage(); + LanguageType rUILanguage = rAllSettings.GetUILanguageTag().getLanguageType(); if (rUILanguage != LANGUAGE_DONTKNOW) { if (lcl_checkScriptType(nScriptType, rUILanguage )) |