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 | |
parent | 9c5d6ea5efb5f56a4ac96b4a8505ed84abbbc6bf (diff) |
AllSettings with LanguageTag
Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d
223 files changed, 379 insertions, 395 deletions
diff --git a/accessibility/Library_acc.mk b/accessibility/Library_acc.mk index d10769f49041..d0a0e360c117 100644 --- a/accessibility/Library_acc.mk +++ b/accessibility/Library_acc.mk @@ -40,6 +40,7 @@ $(eval $(call gb_Library_use_libraries,acc,\ cppu \ cppuhelper \ sal \ + i18nisolang1 \ sot \ svl \ svt \ diff --git a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx index 01ea6fdbca68..b1b58fca23f7 100644 --- a/accessibility/source/extended/accessibleiconchoicectrlentry.cxx +++ b/accessibility/source/extended/accessibleiconchoicectrlentry.cxx @@ -185,7 +185,7 @@ throw(RuntimeException) Locale AccessibleIconChoiceCtrlEntry::implGetLocale() { Locale aLocale; - aLocale = Application::GetSettings().GetUILocale(); + aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); return aLocale; } diff --git a/accessibility/source/extended/accessiblelistboxentry.cxx b/accessibility/source/extended/accessiblelistboxentry.cxx index e0b5bbb3cb22..1c038e7b9695 100644 --- a/accessibility/source/extended/accessiblelistboxentry.cxx +++ b/accessibility/source/extended/accessiblelistboxentry.cxx @@ -182,7 +182,7 @@ namespace accessibility Locale AccessibleListBoxEntry::implGetLocale() { Locale aLocale; - aLocale = Application::GetSettings().GetUILocale(); + aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); return aLocale; } diff --git a/accessibility/source/extended/accessibletabbar.cxx b/accessibility/source/extended/accessibletabbar.cxx index ee34dd868206..8e1730bcf5d5 100644 --- a/accessibility/source/extended/accessibletabbar.cxx +++ b/accessibility/source/extended/accessibletabbar.cxx @@ -386,7 +386,7 @@ namespace accessibility { OExternalLockGuard aGuard( this ); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/extended/accessibletabbarpage.cxx b/accessibility/source/extended/accessibletabbarpage.cxx index 5d84d4956c97..3fe24269436c 100644 --- a/accessibility/source/extended/accessibletabbarpage.cxx +++ b/accessibility/source/extended/accessibletabbarpage.cxx @@ -394,7 +394,7 @@ namespace accessibility { OExternalLockGuard aGuard( this ); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/extended/accessibletabbarpagelist.cxx b/accessibility/source/extended/accessibletabbarpagelist.cxx index eed67bed01a0..889908635d0a 100644 --- a/accessibility/source/extended/accessibletabbarpagelist.cxx +++ b/accessibility/source/extended/accessibletabbarpagelist.cxx @@ -567,7 +567,7 @@ namespace accessibility { OExternalLockGuard aGuard( this ); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/helper/accresmgr.cxx b/accessibility/source/helper/accresmgr.cxx index 3df874460a48..81e675daaab3 100644 --- a/accessibility/source/helper/accresmgr.cxx +++ b/accessibility/source/helper/accresmgr.cxx @@ -43,7 +43,7 @@ void TkResMgr::ensureImplExists() if (m_pImpl) return; - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); m_pImpl = SimpleResMgr::Create("acc", aLocale ); diff --git a/accessibility/source/standard/accessiblemenucomponent.cxx b/accessibility/source/standard/accessiblemenucomponent.cxx index f6a4ba362b0d..3bf4d15fd5bf 100644 --- a/accessibility/source/standard/accessiblemenucomponent.cxx +++ b/accessibility/source/standard/accessiblemenucomponent.cxx @@ -247,7 +247,7 @@ Locale OAccessibleMenuComponent::getLocale( ) throw (IllegalAccessibleComponent { OExternalLockGuard aGuard( this ); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/standard/accessiblemenuitemcomponent.cxx b/accessibility/source/standard/accessiblemenuitemcomponent.cxx index b60504cd4bc1..e458e95de2ee 100644 --- a/accessibility/source/standard/accessiblemenuitemcomponent.cxx +++ b/accessibility/source/standard/accessiblemenuitemcomponent.cxx @@ -391,7 +391,7 @@ Locale OAccessibleMenuItemComponent::getLocale( ) throw (IllegalAccessibleCompo { OExternalLockGuard aGuard( this ); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/standard/vclxaccessiblelistitem.cxx b/accessibility/source/standard/vclxaccessiblelistitem.cxx index a4bc12f3d217..9676f7828080 100644 --- a/accessibility/source/standard/vclxaccessiblelistitem.cxx +++ b/accessibility/source/standard/vclxaccessiblelistitem.cxx @@ -134,7 +134,7 @@ OUString VCLXAccessibleListItem::implGetText() // ----------------------------------------------------------------------------- Locale VCLXAccessibleListItem::implGetLocale() { - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- void VCLXAccessibleListItem::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) diff --git a/accessibility/source/standard/vclxaccessiblemenuitem.cxx b/accessibility/source/standard/vclxaccessiblemenuitem.cxx index ff70acb4160d..dc36a48f71ce 100644 --- a/accessibility/source/standard/vclxaccessiblemenuitem.cxx +++ b/accessibility/source/standard/vclxaccessiblemenuitem.cxx @@ -137,7 +137,7 @@ OUString VCLXAccessibleMenuItem::implGetText() Locale VCLXAccessibleMenuItem::implGetLocale() { - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx index 650dcfd4b921..f026fb5bc427 100644 --- a/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx +++ b/accessibility/source/standard/vclxaccessiblestatusbaritem.cxx @@ -191,7 +191,7 @@ OUString VCLXAccessibleStatusBarItem::implGetText() lang::Locale VCLXAccessibleStatusBarItem::implGetLocale() { - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- @@ -381,7 +381,7 @@ Locale VCLXAccessibleStatusBarItem::getLocale( ) throw (IllegalAccessibleCompon { OExternalLockGuard aGuard( this ); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/standard/vclxaccessibletabpage.cxx b/accessibility/source/standard/vclxaccessibletabpage.cxx index 144e62562031..67a4c876415c 100644 --- a/accessibility/source/standard/vclxaccessibletabpage.cxx +++ b/accessibility/source/standard/vclxaccessibletabpage.cxx @@ -224,7 +224,7 @@ OUString VCLXAccessibleTabPage::implGetText() lang::Locale VCLXAccessibleTabPage::implGetLocale() { - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- @@ -429,7 +429,7 @@ Locale VCLXAccessibleTabPage::getLocale( ) throw (IllegalAccessibleComponentSta { OExternalLockGuard aGuard( this ); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/standard/vclxaccessibletextcomponent.cxx b/accessibility/source/standard/vclxaccessibletextcomponent.cxx index 50175212bc2f..e186c6bf22c9 100644 --- a/accessibility/source/standard/vclxaccessibletextcomponent.cxx +++ b/accessibility/source/standard/vclxaccessibletextcomponent.cxx @@ -106,7 +106,7 @@ OUString VCLXAccessibleTextComponent::implGetText() lang::Locale VCLXAccessibleTextComponent::implGetLocale() { - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx index e7e9f30815cb..04889bf0f2d9 100644 --- a/accessibility/source/standard/vclxaccessibletoolboxitem.cxx +++ b/accessibility/source/standard/vclxaccessibletoolboxitem.cxx @@ -229,7 +229,7 @@ OUString VCLXAccessibleToolBoxItem::implGetText() // ----------------------------------------------------------------------------- Locale VCLXAccessibleToolBoxItem::implGetLocale() { - return Application::GetSettings().GetUILocale(); + return Application::GetSettings().GetUILanguageTag().getLocale(); } // ----------------------------------------------------------------------------- void VCLXAccessibleToolBoxItem::implGetSelection( sal_Int32& nStartIndex, sal_Int32& nEndIndex ) diff --git a/avmedia/Library_avmedia.mk b/avmedia/Library_avmedia.mk index 40f952eba89b..2dfd7c6d6c59 100644 --- a/avmedia/Library_avmedia.mk +++ b/avmedia/Library_avmedia.mk @@ -50,6 +50,7 @@ $(eval $(call gb_Library_use_libraries,avmedia,\ cppu \ cppuhelper \ sal \ + i18nisolang1 \ sfx \ svl \ svt \ diff --git a/avmedia/source/framework/mediamisc.cxx b/avmedia/source/framework/mediamisc.cxx index ca4cf579dc79..87468d8bd0cb 100644 --- a/avmedia/source/framework/mediamisc.cxx +++ b/avmedia/source/framework/mediamisc.cxx @@ -29,7 +29,7 @@ ResMgr* GetResMgr() if( !pResMgr ) { - pResMgr = ResMgr::CreateResMgr("avmedia", Application::GetSettings().GetUILocale()); + pResMgr = ResMgr::CreateResMgr("avmedia", Application::GetSettings().GetUILanguageTag().getLocale()); } return pResMgr; diff --git a/basctl/Library_basctl.mk b/basctl/Library_basctl.mk index b6e1c3b7dc5f..ce7cbb77696b 100644 --- a/basctl/Library_basctl.mk +++ b/basctl/Library_basctl.mk @@ -47,6 +47,7 @@ $(eval $(call gb_Library_use_libraries,basctl,\ editeng \ fwe \ sal \ + i18nisolang1 \ sb \ sfx \ sot \ diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index afc4558e07b8..86738b6efbb6 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -484,7 +484,7 @@ Locale AccessibleDialogControlShape::getLocale( ) throw (IllegalAccessibleCompo { OExternalLockGuard aGuard( this ); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index d360799be8b9..0e4dd99a4f18 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -801,7 +801,7 @@ Locale AccessibleDialogWindow::getLocale( ) throw (IllegalAccessibleComponentSt { OExternalLockGuard aGuard( this ); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ----------------------------------------------------------------------------- diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index db2888c0f74c..c95ac09bbf5f 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -279,7 +279,7 @@ String EditorWindow::GetWordAtCursor() const TextPaM& rSelStart = rSelection.GetStart(); const TextPaM& rSelEnd = rSelection.GetEnd(); String aText = pTextEngine->GetText( rSelEnd.GetPara() ); - CharClass aClass( ::comphelper::getProcessComponentContext() , Application::GetSettings().GetLocale() ); + CharClass aClass( ::comphelper::getProcessComponentContext() , Application::GetSettings().GetLanguageTag().getLocale() ); xub_StrLen nSelStart = static_cast< xub_StrLen >( rSelStart.GetIndex() ); xub_StrLen nSelEnd = static_cast< xub_StrLen >( rSelEnd.GetIndex() ); xub_StrLen nLength = static_cast< xub_StrLen >( aText.Len() ); @@ -826,7 +826,7 @@ void EditorWindow::ImplSetFont() get_value_or( OUString() ) ); if ( sFontName.isEmpty() ) { - Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguage(), 0 , this ) ); + Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) ); sFontName = aTmpFont.GetName(); } Size aFontSize(0, officecfg::Office::Common::Font::SourceViewFont::FontHeight::get()); diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 959fa8c70717..4d4e0bc9591e 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -1065,7 +1065,7 @@ bool implImportDialog( Window* pWin, const OUString& rCurPath, const ScriptDocum } // Resource? - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); Reference< task::XInteractionHandler > xDummyHandler; bool bReadOnly = true; Reference< XStringResourceWithLocation > xImportStringResource = diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx index c0669e8b5989..966a6ece6a30 100644 --- a/basctl/source/basicide/iderdll.cxx +++ b/basctl/source/basicide/iderdll.cxx @@ -126,7 +126,7 @@ Dll::Dll () : (void)pFact; ResMgr* pMgr = ResMgr::CreateResMgr( - "basctl", Application::GetSettings().GetUILocale() + "basctl", Application::GetSettings().GetUILanguageTag().getLocale() ); Module::Get() = new Module( pMgr, &DocShell::Factory() ); diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index 61b41eb21ad7..b58b3266b178 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -61,7 +61,7 @@ namespace { long nWidth = 0; Reference< XBreakIterator > xBreakIter( vcl::unohelper::CreateBreakIterator() ); sal_Int32 nStartPos = 0; - const Locale aLocale = Application::GetSettings().GetUILocale(); + const Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); Boundary aBoundary = xBreakIter->getWordBoundary( rText, nStartPos, aLocale, WordType::ANYWORD_IGNOREWHITESPACES, true ); @@ -341,7 +341,7 @@ void SetDefaultLanguageDialog::FillLanguageBox() } else // preselect current UI language - m_pLanguageLB->SelectLanguage( Application::GetSettings().GetUILanguage() ); + m_pLanguageLB->SelectLanguage( Application::GetSettings().GetUILanguageTag().getLanguageType() ); } void SetDefaultLanguageDialog::CalcInfoSize() diff --git a/basic/CppunitTest_basic_scanner.mk b/basic/CppunitTest_basic_scanner.mk index 193c4a5835a5..b5eccfa2d7b8 100644 --- a/basic/CppunitTest_basic_scanner.mk +++ b/basic/CppunitTest_basic_scanner.mk @@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,basic_scanner, \ cppuhelper \ sal \ salhelper \ + i18nisolang1 \ sb \ sot \ svl \ diff --git a/basic/Library_sb.mk b/basic/Library_sb.mk index 73eb63163628..16bb39efe0b4 100644 --- a/basic/Library_sb.mk +++ b/basic/Library_sb.mk @@ -42,6 +42,7 @@ $(eval $(call gb_Library_use_libraries,sb,\ cppuhelper \ sal \ salhelper \ + i18nisolang1 \ sot \ svl \ svt \ diff --git a/basic/source/classes/global.cxx b/basic/source/classes/global.cxx index 2907b5cdb65f..43a3414f5e0a 100644 --- a/basic/source/classes/global.cxx +++ b/basic/source/classes/global.cxx @@ -45,7 +45,7 @@ namespace comphelper::getProcessComponentContext(), com::sun::star::i18n::TransliterationModules_IGNORE_CASE ) { - const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguage(); + const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); m_aTransliteration.loadModuleIfNeeded( eOfficeLanguage ); } utl::TransliterationWrapper& getTransliteration() { return m_aTransliteration; } diff --git a/basic/source/comp/basiccharclass.cxx b/basic/source/comp/basiccharclass.cxx index e3a83f34a380..4b905d79bd50 100644 --- a/basic/source/comp/basiccharclass.cxx +++ b/basic/source/comp/basiccharclass.cxx @@ -100,7 +100,7 @@ bool BasicCharClass::isLetterUnicode( sal_Unicode c ) { static CharClass* pCharClass = NULL; if( pCharClass == NULL ) - pCharClass = new CharClass( Application::GetSettings().GetLocale() ); + pCharClass = new CharClass( Application::GetSettings().GetLanguageTag().getLocale() ); // can we get pCharClass to accept a sal_Unicode instead of this waste? return pCharClass->isLetter( rtl::OUString(c), 0 ); } diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index 882ffc0d666c..ccd50c0056d8 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -36,7 +36,7 @@ BasResId::BasResId( sal_uInt32 nId ) : BasicDLL::BasicDLL() { BASIC_DLL() = this; - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); pBasResMgr = ResMgr::CreateResMgr("sb", aLocale ); bDebugMode = false; bBreakEnabled = true; diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 18da6ae72ef7..27ba48faa523 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -137,7 +137,7 @@ static const CharClass& GetCharClass( void ) if( bNeedsInit ) { bNeedsInit = false; - aLocale = Application::GetSettings().GetLocale(); + aLocale = Application::GetSettings().GetLanguageTag().getLocale(); } static CharClass aCharClass( aLocale ); return aCharClass; @@ -1650,7 +1650,7 @@ RTLFUNC(StrComp) i18n::TransliterationModules_IGNORE_WIDTH ); } - LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); + LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); pTransliterationWrapper->loadModuleIfNeeded( eLangType ); nRetValue = pTransliterationWrapper->compareString( rStr1, rStr2 ); } @@ -1953,7 +1953,7 @@ RTLFUNC(DateValue) // by using SbiInstance::GetNumberFormatter. // It seems that both locale number formatter and English number formatter // are supported in Visual Basic. - LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); + LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); if( !bSuccess && ( eLangType != LANGUAGE_ENGLISH_US ) ) { // Create a new SvNumberFormatter by using LANGUAGE_ENGLISH to get the date value; diff --git a/basic/source/runtime/methods1.cxx b/basic/source/runtime/methods1.cxx index c6a37f1d0eb8..aac1e634a285 100644 --- a/basic/source/runtime/methods1.cxx +++ b/basic/source/runtime/methods1.cxx @@ -74,7 +74,7 @@ static Reference< XCalendar3 > getLocaleCalendar( void ) static com::sun::star::lang::Locale aLastLocale; static bool bNeedsInit = true; - com::sun::star::lang::Locale aLocale = Application::GetSettings().GetLocale(); + com::sun::star::lang::Locale aLocale = Application::GetSettings().GetLanguageTag().getLocale(); bool bNeedsReload = false; if( bNeedsInit ) { @@ -82,7 +82,8 @@ static Reference< XCalendar3 > getLocaleCalendar( void ) bNeedsReload = true; } else if( aLocale.Language != aLastLocale.Language || - aLocale.Country != aLastLocale.Country ) + aLocale.Country != aLastLocale.Country || + aLocale.Variant != aLastLocale.Variant ) { bNeedsReload = true; } @@ -2543,7 +2544,7 @@ RTLFUNC(FormatDateTime) SbiInstance::PrepareNumberFormatter( pFormatter, n, n, n ); } - LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); + LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); sal_uIntPtr nIndex = pFormatter->GetFormatIndex( NF_DATE_SYSTEM_LONG, eLangType ); Color* pCol; pFormatter->GetOutputString( dDate, nIndex, aRetStr, &pCol ); diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx index 482526382a50..122357733cae 100644 --- a/basic/source/runtime/runtime.cxx +++ b/basic/source/runtime/runtime.cxx @@ -321,7 +321,7 @@ SbiDllMgr* SbiInstance::GetDllMgr() // #39629 create NumberFormatter with the help of a static method now SvNumberFormatter* SbiInstance::GetNumberFormatter() { - LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); + LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); SvtSysLocale aSysLocale; DateFormat eDate = aSysLocale.GetLocaleData().getDateFormat(); if( pNumberFormatter ) @@ -358,7 +358,7 @@ void SbiInstance::PrepareNumberFormatter( SvNumberFormatter*& rpNumberFormatter, } else { - eLangType = GetpApp()->GetSettings().GetLanguage(); + eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); } DateFormat eDate; if( peFormatterDateFormat ) diff --git a/basic/source/runtime/step0.cxx b/basic/source/runtime/step0.cxx index dc0798499e74..412847356af8 100644 --- a/basic/source/runtime/step0.cxx +++ b/basic/source/runtime/step0.cxx @@ -289,7 +289,7 @@ void SbiRuntime::StepLIKE() aSearchOpt.algorithmType = com::sun::star::util::SearchAlgorithms_REGEXP; - aSearchOpt.Locale = Application::GetSettings().GetLocale(); + aSearchOpt.Locale = Application::GetSettings().GetLanguageTag().getLocale(); aSearchOpt.searchString = pattern; int bTextMode(1); diff --git a/basic/source/sbx/sbxdate.cxx b/basic/source/sbx/sbxdate.cxx index 7c0182791a84..6d0a4073a64a 100644 --- a/basic/source/sbx/sbxdate.cxx +++ b/basic/source/sbx/sbxdate.cxx @@ -96,7 +96,7 @@ double ImpGetDate( const SbxValues* p ) } else { - LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); + LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); SvNumberFormatter* pFormatter; com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > @@ -270,7 +270,7 @@ start: } Color* pColor; - LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); + LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); SvNumberFormatter* pFormatter; com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx index 111c8b3285b3..f9a328ea26bf 100644 --- a/basic/source/sbx/sbxscan.cxx +++ b/basic/source/sbx/sbxscan.cxx @@ -629,7 +629,7 @@ ResMgr* implGetResMgr( void ) static ResMgr* pResMgr = NULL; if( !pResMgr ) { - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); pResMgr = ResMgr::CreateResMgr("sb", aLocale ); } return pResMgr; @@ -725,7 +725,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const return; } - LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); + LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > xFactory = comphelper::getProcessServiceFactory(); SvNumberFormatter aFormatter( xFactory, eLangType ); @@ -853,7 +853,7 @@ void SbxValue::Format( OUString& rRes, const OUString* pFmt ) const { SbxAppData& rAppData = GetSbxData_Impl(); - LanguageType eLangType = GetpApp()->GetSettings().GetLanguage(); + LanguageType eLangType = GetpApp()->GetSettings().GetLanguageTag().getLanguageType(); if( rAppData.pBasicFormater ) { if( rAppData.eBasicFormaterLangType != eLangType ) diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx index 7820e721bff5..4be2ef2d9afa 100644 --- a/basic/source/uno/dlgcont.cxx +++ b/basic/source/uno/dlgcont.cxx @@ -367,7 +367,7 @@ Reference< ::com::sun::star::resource::XStringResourcePersistence > bool bReadOnly = pDialogLibrary->mbReadOnly; // get ui locale - ::com::sun ::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun ::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); OUString aComment(aResourceFileCommentBase); aComment += aLibName; diff --git a/chart2/Library_chartcontroller.mk b/chart2/Library_chartcontroller.mk index 96044b994e3e..3f5a4204c99c 100644 --- a/chart2/Library_chartcontroller.mk +++ b/chart2/Library_chartcontroller.mk @@ -44,6 +44,7 @@ $(eval $(call gb_Library_use_libraries,chartcontroller,\ drawinglayer \ editeng \ sal \ + i18nisolang1 \ sfx \ sot \ svl \ diff --git a/chart2/source/controller/accessibility/AccessibleBase.cxx b/chart2/source/controller/accessibility/AccessibleBase.cxx index 7deffc31dda8..837dc0447980 100644 --- a/chart2/source/controller/accessibility/AccessibleBase.cxx +++ b/chart2/source/controller/accessibility/AccessibleBase.cxx @@ -661,7 +661,7 @@ lang::Locale SAL_CALL AccessibleBase::getLocale() { CheckDisposeState(); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } // ________ AccessibleBase::XAccessibleComponent ________ diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index de7e610653b4..4d9c80863282 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -71,7 +71,7 @@ using ::rtl::OUString; static String impl_getSvtResString( sal_uInt32 nId ) { String aRet; - com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); ResMgr* pMgr = ResMgr::CreateResMgr( "svt", aLocale ); if( pMgr ) { diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 14a55daea410..43c6e6eefdbe 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -199,7 +199,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, if( !aTypeName.Len() && !aSourceName.Len() ) { - com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); ResMgr* pMgr = ResMgr::CreateResMgr( "svt", aLocale ); // global resource from svtools (former so3 resource) if( pMgr ) diff --git a/cui/source/dialogs/postdlg.cxx b/cui/source/dialogs/postdlg.cxx index 45971a7ae668..90fe48c5e00e 100644 --- a/cui/source/dialogs/postdlg.cxx +++ b/cui/source/dialogs/postdlg.cxx @@ -124,7 +124,7 @@ SvxPostItDialog::SvxPostItDialog( Window* pParent, } else { - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); aDateStr = aLocaleWrapper.getDate( Date( Date::SYSTEM ) ); } @@ -212,7 +212,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp) Date aDate( Date::SYSTEM ); Time aTime( Time::SYSTEM ); String aTmp( SvtUserOptions().GetID() ); - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); String aStr( aEditED.GetText() ); aStr.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\n---- " ) ); @@ -239,7 +239,7 @@ IMPL_LINK_NOARG(SvxPostItDialog, Stamp) IMPL_LINK_NOARG(SvxPostItDialog, OKHdl) { - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); pOutSet = new SfxItemSet( rSet ); pOutSet->Put( SvxPostItAuthorItem( SvtUserOptions().GetID(), rSet.GetPool()->GetWhich( SID_ATTR_POSTIT_AUTHOR ) ) ); diff --git a/cui/source/factory/cuiresmgr.cxx b/cui/source/factory/cuiresmgr.cxx index b5ecaccc4189..cd882e2a7eaa 100644 --- a/cui/source/factory/cuiresmgr.cxx +++ b/cui/source/factory/cuiresmgr.cxx @@ -28,7 +28,7 @@ ResMgr* CuiResMgr::GetResMgr() if ( !pResMgr ) { - pResMgr = ResMgr::CreateResMgr("cui", Application::GetSettings().GetUILocale()); + pResMgr = ResMgr::CreateResMgr("cui", Application::GetSettings().GetUILanguageTag().getLocale()); } return pResMgr; diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index 20a6794835b3..ed20545e12fe 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -290,7 +290,7 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet& ) if(USHRT_MAX == eLastUsedLanguageTypeForForbiddenCharacters) { eLastUsedLanguageTypeForForbiddenCharacters = SvxLocaleToLanguage( - Application::GetSettings().GetLocale() ); + Application::GetSettings().GetLanguageTag().getLocale() ); if (MsLangId::isSimplifiedChinese(eLastUsedLanguageTypeForForbiddenCharacters)) eLastUsedLanguageTypeForForbiddenCharacters = LANGUAGE_CHINESE_SIMPLIFIED; else if (MsLangId::isTraditionalChinese(eLastUsedLanguageTypeForForbiddenCharacters)) diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx index e16644890006..091e166d7710 100644 --- a/cui/source/options/optdict.cxx +++ b/cui/source/options/optdict.cxx @@ -376,7 +376,7 @@ sal_uInt16 SvxEditDictionaryDialog::GetLBInsertPos(const String &rDicWord) { sal_uInt16 nPos = USHRT_MAX; - IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); + IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLanguageTag().getLocale() ); const CollatorWrapper* pCollator = aIntlWrapper.getCollator(); sal_uInt16 j; for( j = 0; j < aWordsLB.GetEntryCount(); j++ ) diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 2bf4f0e79cee..38d050d55b24 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1235,7 +1235,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe String aUILang(aStr); aUILang += rtl::OUString(" - "); - aUILang += pLanguageTable->GetString( Application::GetSettings().GetUILanguage(), true ); + aUILang += pLanguageTable->GetString( Application::GetSettings().GetUILanguageTag().getLanguageType(), true ); aUserInterfaceLB.InsertEntry(aUILang); aUserInterfaceLB.SetEntryData(0, 0); @@ -1697,7 +1697,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) if (aDatePatternsString.isEmpty()) { Locale aTempLocale; - SvxLanguageToLocale( aTempLocale, Application::GetSettings().GetLanguage()); + SvxLanguageToLocale( aTempLocale, Application::GetSettings().GetLanguageTag().getLanguageType()); LocaleDataWrapper aLocaleWrapper( aTempLocale ); aDatePatternsString = lcl_getDatePatternsConfigString( aLocaleWrapper); } diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index 72994ac146bf..5a1438b2073d 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -233,7 +233,7 @@ void SvxGeneralTabPage::CreateControls () { // which language bit do we use? (see Lang and vRowInfo[] above) unsigned LangBit; - switch (LanguageType const eLang = Application::GetSettings().GetUILanguage()) + switch (LanguageType const eLang = Application::GetSettings().GetUILanguageTag().getLanguageType()) { case LANGUAGE_ENGLISH_US: LangBit = Lang::US; diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 05ee3ebf2887..d63a137cce5f 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -737,7 +737,7 @@ SvxLinguData_Impl::SvxLinguData_Impl() : xLinguSrvcMgr = LinguServiceManager::create(comphelper::getComponentContext(xMSF)); Locale aCurrentLocale; - LanguageType eLang = Application::GetSettings().GetLanguage(); + LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); SvxLanguageToLocale(aCurrentLocale, eLang); Sequence<Any> aArgs(2);//second arguments has to be empty! aArgs.getArray()[0] <<= SvxGetLinguPropertySet(); diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index b0f255f80ffe..c1539fccf9d2 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -133,7 +133,7 @@ void SvxOnlineUpdateTabPage::UpdateLastCheckedText() aTime = Time( lastCheckedDT.Hours, lastCheckedDT.Minutes ); } - LanguageType eUILang = Application::GetSettings().GetUILanguage(); + LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType(); SvNumberFormatter *pNumberFormatter = new SvNumberFormatter( ::comphelper::getProcessServiceFactory(), eUILang ); String aTmpStr; Color* pColor = NULL; diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 5fd699a2d286..3aa711228ea2 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -133,7 +133,7 @@ OfaAutoCorrDlg::OfaAutoCorrDlg(Window* pParent, const SfxItemSet* _pSet ) : // Initialisierung funktionier fuer static nicht unter Linux - deswegen hier if( LANGUAGE_SYSTEM == eLastDialogLanguage ) - eLastDialogLanguage = Application::GetSettings().GetLanguage(); + eLastDialogLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); LanguageType nSelectLang = LANGUAGE_DONTKNOW; nPos = aLanguageLB.GetEntryPos( (void*)(long) eLastDialogLanguage ); @@ -2008,7 +2008,7 @@ IMPL_LINK( OfaQuoteTabPage, QuoteHdl, PushButton*, pBtn ) pMap->SetText(nMode < SGL_END ? sStartQuoteDlg : sEndQuoteDlg ); sal_UCS4 cDlg; SvxAutoCorrect* pAutoCorrect = SvxAutoCorrCfg::Get().GetAutoCorrect(); - LanguageType eLang = Application::GetSettings().GetLanguage(); + LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); switch( nMode ) { case SGL_START: diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index b4ee86b26a48..d09b1845b27c 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -206,7 +206,7 @@ SvxSingleNumPickTabPage::SvxSingleNumPickTabPage(Window* pParent, if(xDefNum.is()) { Sequence< Sequence< PropertyValue > > aNumberings; - LanguageType eLang = Application::GetSettings().GetLanguage(); + LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); Locale aLocale = SvxCreateLocale(eLang); try { @@ -568,7 +568,7 @@ SvxNumPickTabPage::SvxNumPickTabPage(Window* pParent, if(xDefNum.is()) { Sequence<Reference<XIndexAccess> > aOutlineAccess; - LanguageType eLang = Application::GetSettings().GetLanguage(); + LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); Locale aLocale = SvxCreateLocale(eLang); try { diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index d01d497106da..d0d429b4df3c 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -186,7 +186,7 @@ SvxTabulatorTabPage::SvxTabulatorTabPage( Window* pParent, aFillChar.SetAccessibleRelationLabeledBy(&aFillSpecial); // Get the default decimal char from the system - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); aAktTab.GetDecimal() = aLocaleWrapper.getNumDecimalSep()[0]; FreeResource(); } diff --git a/dbaccess/Library_dbu.mk b/dbaccess/Library_dbu.mk index f63efabcbdce..2e2f5ec8b962 100644 --- a/dbaccess/Library_dbu.mk +++ b/dbaccess/Library_dbu.mk @@ -59,6 +59,7 @@ $(eval $(call gb_Library_use_libraries,dbu,\ fwe \ sal \ salhelper \ + i18nisolang1 \ sfx \ sot \ svl \ diff --git a/dbaccess/source/core/resource/core_resource.cxx b/dbaccess/source/core/resource/core_resource.cxx index e9894f235bc8..ecc3321c16a7 100644 --- a/dbaccess/source/core/resource/core_resource.cxx +++ b/dbaccess/source/core/resource/core_resource.cxx @@ -50,7 +50,7 @@ namespace dbaccess if (m_pImpl) return; - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); m_pImpl = ResMgr::CreateResMgr("dba", aLocale); } diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index c9b65cda0928..31b25862e3af 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -361,7 +361,7 @@ sal_Bool SbaTableQueryBrowser::Construct(Window* pParent) // the collator for the string compares m_xCollator = Reference< XCollator >( getORB()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.i18n.Collator")) ), UNO_QUERY_THROW ); - m_xCollator->loadDefaultCollator( Application::GetSettings().GetLocale(), 0 ); + m_xCollator->loadDefaultCollator( Application::GetSettings().GetLanguageTag().getLocale(), 0 ); } catch(const Exception&) { diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 307ee8b43851..5a46fcd5dff8 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -248,7 +248,7 @@ void OSqlEdit::ImplSetFont() get_value_or( rtl::OUString() ) ); if ( sFontName.isEmpty() ) { - Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguage(), 0 , this ) ); + Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, Application::GetSettings().GetUILanguageTag().getLanguageType(), 0 , this ) ); sFontName = aTmpFont.GetName(); } Size aFontSize( diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx index 0f605a4d2c3a..637475991391 100644 --- a/dbaccess/source/ui/dlg/tablespage.cxx +++ b/dbaccess/source/ui/dlg/tablespage.cxx @@ -273,7 +273,7 @@ DBG_NAME(OTableSubscriptionPage) { m_xCollator = Reference< XCollator >(m_xORB->createInstance(SERVICE_I18N_COLLATOR), UNO_QUERY); if (m_xCollator.is()) - m_xCollator->loadDefaultCollator(Application::GetSettings().GetLocale(), 0); + m_xCollator->loadDefaultCollator(Application::GetSettings().GetLanguageTag().getLocale(), 0); } catch(const Exception&) { diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index 90522f2e8f80..e414c9cebf59 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -345,7 +345,7 @@ void ODatabaseImportExport::initialize() { Font aApplicationFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE, - Application::GetSettings().GetUILanguage(), + Application::GetSettings().GetUILanguageTag().getLanguageType(), DEFAULTFONT_FLAGS_ONLYONE ); m_aFont = VCLUnoHelper::CreateFontDescriptor( aApplicationFont ); diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx index d43e4cdd7752..e28ad805f397 100644 --- a/dbaccess/source/ui/misc/UITools.cxx +++ b/dbaccess/source/ui/misc/UITools.cxx @@ -937,7 +937,7 @@ sal_Bool callColumnFormatDialog(Window* _pParent, pFormatDescriptor->Put(SfxBoolItem(SID_ATTR_NUMBERFORMAT_ONE_AREA, sal_True)); if (!_pFormatter->IsTextFormat(_nFormatKey)) // text fields can only have text formats - _nFormatKey = _pFormatter->GetStandardFormat(NUMBERFORMAT_TEXT,_pParent->GetSettings().GetLanguage()); + _nFormatKey = _pFormatter->GetStandardFormat(NUMBERFORMAT_TEXT,_pParent->GetSettings().GetLanguageTag().getLanguageType()); } pFormatDescriptor->Put(SfxUInt32Item(SBA_DEF_FMTVALUE, _nFormatKey)); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index ba731cea2a67..554454972b11 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -138,7 +138,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) // TriState der ::com::sun::star::form::CheckBox abschalten m_pVisibleCell->GetBox().EnableTriState( sal_False ); - Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguage(),DEFAULTFONT_FLAGS_ONLYONE); + Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguageTag().getLanguageType(),DEFAULTFONT_FLAGS_ONLYONE); aTitleFont.SetSize(Size(0, 6)); SetTitleFont(aTitleFont); diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 547ed4f57f6f..aa7083700b9a 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -349,6 +349,7 @@ ResMgr* Desktop::GetDesktopResManager() // Use VCL to get the correct language specific message as we // are in the bootstrap process and not able to get the installed // language!! + /* FIXME-BCP47: handle language tag! */ OUString aUILocaleString = LanguageSelection::getLanguageString(); sal_Int32 nIndex = 0; OUString aLanguage = aUILocaleString.getToken( 0, '-', nIndex); @@ -359,7 +360,7 @@ ResMgr* Desktop::GetDesktopResManager() Desktop::pResMgr = ResMgr::SearchCreateResMgr( "dkt", aLocale); AllSettings as = GetSettings(); - as.SetUILocale(aLocale); + as.SetUILanguageTag(LanguageTag(aLocale)); SetSettings(as); } } diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 20efb3011c20..b12b9927bd59 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -254,7 +254,7 @@ void ExtensionBox_Impl::Init() m_xRemoveListener = new ExtensionRemovedListener( this ); - m_pLocale = new lang::Locale( Application::GetSettings().GetLocale() ); + m_pLocale = new lang::Locale( Application::GetSettings().GetLanguageTag().getLocale() ); m_pCollator = new CollatorWrapper( ::comphelper::getProcessServiceFactory() ); m_pCollator->loadDefaultCollator( *m_pLocale, i18n::CollatorOptions::CollatorOptions_IGNORE_CASE ); diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx index d92ca972d939..de558fb27653 100644 --- a/desktop/source/deployment/gui/dp_gui_service.cxx +++ b/desktop/source/deployment/gui/dp_gui_service.cxx @@ -239,9 +239,7 @@ void ServiceImpl::startExecuteModal( throw RuntimeException( OUSTR("Cannot initialize VCL!"), static_cast<OWeakObject *>(this) ); AllSettings as = app->GetSettings(); - as.SetUILanguage( - LanguageTag( - utl::ConfigManager::getLocale() ).getLanguageType() ); + as.SetUILanguageTag( LanguageTag( utl::ConfigManager::getLocale() ) ); app->SetSettings( as ); app->SetDisplayName( utl::ConfigManager::getProductName() + diff --git a/drawinglayer/source/processor2d/getdigitlanguage.cxx b/drawinglayer/source/processor2d/getdigitlanguage.cxx index 000588e55614..012b39c08002 100644 --- a/drawinglayer/source/processor2d/getdigitlanguage.cxx +++ b/drawinglayer/source/processor2d/getdigitlanguage.cxx @@ -42,7 +42,7 @@ LanguageType drawinglayer::detail::getDigitLanguage() { case SvtCTLOptions::NUMERALS_HINDI: return LANGUAGE_ARABIC_SAUDI_ARABIA; default: - return Application::GetSettings().GetLanguage(); + return Application::GetSettings().GetLanguageTag().getLanguageType(); } } diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index 86084a7a1de0..f4301c9840fc 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -91,7 +91,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. @@ -123,9 +123,9 @@ static LanguageType lcl_CheckLanguage( // The default document language from "Tools/Options - Language Settings - Languages: Western" aLangList[0] = aLinguOpt.nDefaultLanguage; // 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; #ifdef DEBUG diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index 8836b4201019..740de3a76adb 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -211,7 +211,7 @@ EditResId::EditResId( sal_uInt16 nId ): EditDLL::EditDLL() { pGlobalData = new GlobalEditData; - pResMgr = ResMgr::CreateResMgr( "editeng", Application::GetSettings().GetUILocale() ); + pResMgr = ResMgr::CreateResMgr( "editeng", Application::GetSettings().GetUILanguageTag().getLocale() ); } EditDLL::~EditDLL() diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index b3217e70514c..b6c9f7fc4e44 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -4246,7 +4246,7 @@ void ImpEditEngine::ImplInitDigitMode( OutputDevice* pOutDev, String* pString, x else if ( SvtCTLOptions::NUMERALS_ARABIC == nCTLTextNumerals ) eLang = LANGUAGE_ENGLISH; else if ( SvtCTLOptions::NUMERALS_SYSTEM == nCTLTextNumerals ) - eLang = (LanguageType) Application::GetSettings().GetLanguage(); + eLang = (LanguageType) Application::GetSettings().GetLanguageTag().getLanguageType(); if(pOutDev) { @@ -4337,7 +4337,7 @@ void ImpEditEngine::ImplInitLayoutMode( OutputDevice* pOutDev, sal_uInt16 nPara, else if ( SvtCTLOptions::NUMERALS_ARABIC == pCTLOptions->GetCTLTextNumerals() ) eLang = LANGUAGE_ENGLISH; else - eLang = (LanguageType) Application::GetSettings().GetLanguage(); + eLang = (LanguageType) Application::GetSettings().GetLanguageTag().getLanguageType(); pOutDev->SetDigitLanguage( eLang ); } diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx index 6cf0953c5ed6..a8612478b19b 100644 --- a/editeng/source/items/numitem.cxx +++ b/editeng/source/items/numitem.cxx @@ -100,7 +100,7 @@ SvxNumberType::~SvxNumberType() String SvxNumberType::GetNumStr( sal_uLong nNo ) const { - LanguageType eLang = Application::GetSettings().GetLanguage(); + LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); Locale aLocale = SvxCreateLocale(eLang); return GetNumStr( nNo, aLocale ); } @@ -562,7 +562,7 @@ SvxNumRule::SvxNumRule( sal_uLong nFeatures, bContinuousNumbering(bCont) { ++nRefCount; - LanguageType eLang = Application::GetSettings().GetLanguage(); + LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); aLocale = SvxCreateLocale(eLang); for(sal_uInt16 i = 0; i < SVX_MAX_NUM; i++) { diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx index d8ae94cc93d5..9bce44939317 100644 --- a/editeng/source/misc/svxacorr.cxx +++ b/editeng/source/misc/svxacorr.cxx @@ -198,7 +198,7 @@ static ::com::sun::star::uno::Reference< static sal_uInt16 GetAppLang() { - return Application::GetSettings().GetLanguage(); + return Application::GetSettings().GetLanguageTag().getLanguageType(); } static LocaleDataWrapper& GetLocaleDataWrapper( sal_uInt16 nLang ) { diff --git a/editeng/source/rtf/svxrtf.cxx b/editeng/source/rtf/svxrtf.cxx index 9d2a3172259f..baccbdeb87ea 100644 --- a/editeng/source/rtf/svxrtf.cxx +++ b/editeng/source/rtf/svxrtf.cxx @@ -45,11 +45,7 @@ using namespace ::com::sun::star; static CharSet lcl_GetDefaultTextEncodingForRTF() { - ::com::sun::star::lang::Locale aLocale; - ::rtl::OUString aLangString; - - aLocale = Application::GetSettings().GetLocale(); - aLangString = aLocale.Language; + ::rtl::OUString aLangString( Application::GetSettings().GetLanguageTag().getLanguage()); if ( aLangString == "ru" || aLangString == "uk" ) return RTL_TEXTENCODING_MS_1251; diff --git a/extensions/Library_res.mk b/extensions/Library_res.mk index 953e369e4d48..3297b14200dd 100644 --- a/extensions/Library_res.mk +++ b/extensions/Library_res.mk @@ -36,6 +36,7 @@ $(eval $(call gb_Library_use_sdk_api,res)) $(eval $(call gb_Library_use_libraries,res,\ vcl \ + i18nisolang1 \ tl \ comphelper \ cppu \ diff --git a/extensions/source/propctrlr/fontdialog.cxx b/extensions/source/propctrlr/fontdialog.cxx index 2df5157ed67c..1661f6e0e967 100644 --- a/extensions/source/propctrlr/fontdialog.cxx +++ b/extensions/source/propctrlr/fontdialog.cxx @@ -239,7 +239,7 @@ namespace pcr aUnderlineItem.SetColor(Color(nTextLineColor)); SvxColorItem aSvxColorItem(nColor32,CFID_CHARCOLOR); - SvxLanguageItem aLanguageItem(Application::GetSettings().GetUILanguage(), CFID_LANGUAGE); + SvxLanguageItem aLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_LANGUAGE); // the 2 CJK props SvxCharReliefItem aFontReliefItem((FontRelief)nFontRelief, CFID_RELIEF); @@ -494,7 +494,7 @@ namespace pcr *pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_HEIGHT); *pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_WEIGHT); *pCounter++ = new SvxPostureItem(aDefaultVCLFont.GetItalic(), CFID_POSTURE); - *pCounter++ = new SvxLanguageItem(Application::GetSettings().GetUILanguage(), CFID_LANGUAGE); + *pCounter++ = new SvxLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_LANGUAGE); *pCounter++ = new SvxUnderlineItem(aDefaultVCLFont.GetUnderline(), CFID_UNDERLINE); *pCounter++ = new SvxCrossedOutItem(aDefaultVCLFont.GetStrikeout(), CFID_STRIKEOUT); *pCounter++ = new SvxWordLineModeItem(aDefaultVCLFont.IsWordLineMode(), CFID_WORDLINEMODE); @@ -506,7 +506,7 @@ namespace pcr *pCounter++ = new SvxFontHeightItem(aDefaultVCLFont.GetHeight(), 100, CFID_CJK_HEIGHT); *pCounter++ = new SvxWeightItem(aDefaultVCLFont.GetWeight(), CFID_CJK_WEIGHT); *pCounter++ = new SvxPostureItem(aDefaultVCLFont.GetItalic(), CFID_CJK_POSTURE); - *pCounter++ = new SvxLanguageItem(Application::GetSettings().GetUILanguage(), CFID_CJK_LANGUAGE); + *pCounter++ = new SvxLanguageItem(Application::GetSettings().GetUILanguageTag().getLanguageType(), CFID_CJK_LANGUAGE); *pCounter++ = new SvxCaseMapItem(SVX_CASEMAP_NOT_MAPPED, CFID_CASEMAP); *pCounter++ = new SvxContourItem(sal_False, CFID_CONTOUR); diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx index a1ee7f91c69f..2c0920c954cf 100644 --- a/extensions/source/resource/oooresourceloader.cxx +++ b/extensions/source/resource/oooresourceloader.cxx @@ -164,7 +164,7 @@ namespace extensions { namespace resource //-------------------------------------------------------------------- Reference< XResourceBundle > SAL_CALL OpenOfficeResourceLoader::loadBundle_Default( const ::rtl::OUString& _baseName ) throw (MissingResourceException, RuntimeException) { - return loadBundle( _baseName, Application::GetSettings().GetUILocale() ); + return loadBundle( _baseName, Application::GetSettings().GetUILanguageTag().getLocale() ); } //-------------------------------------------------------------------- diff --git a/filter/Library_eps.mk b/filter/Library_eps.mk index 5dda0d59957d..ca6648688b32 100644 --- a/filter/Library_eps.mk +++ b/filter/Library_eps.mk @@ -29,6 +29,7 @@ $(eval $(call gb_Library_use_libraries,eps,\ vcl \ utl \ tl \ + i18nisolang1 \ cppu \ sal \ $(gb_UWINAPI) \ diff --git a/filter/Library_flash.mk b/filter/Library_flash.mk index fd06b4c30f8b..8bf5c32f5662 100644 --- a/filter/Library_flash.mk +++ b/filter/Library_flash.mk @@ -31,6 +31,7 @@ $(eval $(call gb_Library_use_libraries,flash,\ vcl \ utl \ tl \ + i18nisolang1 \ comphelper \ basegfx \ cppuhelper \ diff --git a/filter/Library_pdffilter.mk b/filter/Library_pdffilter.mk index 1f108429f44e..a94c32c568ef 100644 --- a/filter/Library_pdffilter.mk +++ b/filter/Library_pdffilter.mk @@ -35,6 +35,7 @@ $(eval $(call gb_Library_use_libraries,pdffilter,\ utl \ tl \ svl \ + i18nisolang1 \ comphelper \ basegfx \ cppuhelper \ diff --git a/filter/Library_svgfilter.mk b/filter/Library_svgfilter.mk index bc8520b80724..43a890ad43a0 100644 --- a/filter/Library_svgfilter.mk +++ b/filter/Library_svgfilter.mk @@ -43,6 +43,7 @@ $(eval $(call gb_Library_use_libraries,svgfilter,\ svl \ utl \ tl \ + i18nisolang1 \ sax \ comphelper \ basegfx \ diff --git a/filter/Library_xsltdlg.mk b/filter/Library_xsltdlg.mk index 293721047d58..1819177414ba 100644 --- a/filter/Library_xsltdlg.mk +++ b/filter/Library_xsltdlg.mk @@ -35,6 +35,7 @@ $(eval $(call gb_Library_use_libraries,xsltdlg,\ svl \ utl \ tl \ + i18nisolang1 \ comphelper \ cppuhelper \ cppu \ diff --git a/filter/source/flash/swfdialog.cxx b/filter/source/flash/swfdialog.cxx index fe6bf861c46a..1480afeb2421 100644 --- a/filter/source/flash/swfdialog.cxx +++ b/filter/source/flash/swfdialog.cxx @@ -90,7 +90,7 @@ Reference< XInterface > SAL_CALL SWFDialog_createInstance( const Reference< XMul SWFDialog::SWFDialog( const Reference< XMultiServiceFactory > &rxMSF ) : OGenericUnoDialog( rxMSF ) { - mpResMgr = ResMgr::CreateResMgr( "flash", Application::GetSettings().GetUILocale() ); + mpResMgr = ResMgr::CreateResMgr( "flash", Application::GetSettings().GetUILanguageTag().getLocale() ); } // ----------------------------------------------------------------------------- diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index e8e0ab45543f..5304e03d5eac 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -294,7 +294,7 @@ sal_Bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Fi { ResMgr* pResMgr; - pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILocale() ); + pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILanguageTag().getLocale() ); if( pResMgr ) { @@ -440,7 +440,7 @@ sal_Bool PSWriter::WritePS( const Graphic& rGraphic, SvStream& rTargetStream, Fi if ( mbStatus && mnLevelWarning && pFilterConfigItem ) { ResMgr* pResMgr; - pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILocale() ); + pResMgr = ResMgr::CreateResMgr( "eps", Application::GetSettings().GetUILanguageTag().getLocale() ); if( pResMgr ) { InfoBox aInfoBox( NULL, String( ResId( KEY_VERSION_CHECK, *pResMgr ) ) ); diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 9c80c9838dc2..870209fb7bd2 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -41,7 +41,7 @@ static ResMgr& getPDFFilterResMgr() { - static ResMgr *pRes = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILocale()); + static ResMgr *pRes = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILanguageTag().getLocale()); return *pRes; } diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 8051cb810c24..336cda2bd973 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -887,7 +887,7 @@ sal_Bool PDFExport::Export( const OUString& rFile, const Sequence< PropertyValue if ( mxStatusIndicator.is() ) { - ResMgr* pResMgr = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILocale() ); + ResMgr* pResMgr = ResMgr::CreateResMgr( "pdffilter", Application::GetSettings().GetUILanguageTag().getLocale() ); if ( pResMgr ) { sal_Int32 nTotalPageCount = aRangeEnum.size(); diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index fb6c1b50ff5a..d9e6272db7ad 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -139,7 +139,7 @@ void SVGFontExport::implCollectGlyphs() if( xBI.is() ) { - const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLocale(); + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLanguageTag().getLocale(); sal_Int32 nCurPos = 0, nLastPos = -1; while( ( nCurPos < aText.getLength() ) && ( nCurPos > nLastPos ) ) diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index cf1602fdbc0b..b9e556db95f2 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -2796,7 +2796,7 @@ void SVGActionWriter::ImplWriteText( const Point& rPos, const String& rText, else { ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > xBI( ::vcl::unohelper::CreateBreakIterator() ); - const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLocale(); + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLanguageTag().getLocale(); sal_Int32 nCurPos = 0, nLastPos = 0, nX = aPos.X(); // write single glyphs at absolute text positions diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx index bb6c6b682dfe..0c1cbfd30176 100644 --- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx +++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx @@ -351,7 +351,7 @@ sal_Int16 SAL_CALL XMLFilterDialogComponent::execute( ) throw(RuntimeException) if( NULL == pXSLTResMgr ) { - pXSLTResMgr = ResMgr::CreateResMgr( "xsltdlg", Application::GetSettings().GetUILocale() ); + pXSLTResMgr = ResMgr::CreateResMgr( "xsltdlg", Application::GetSettings().GetUILanguageTag().getLocale() ); } if( NULL == mpDialog ) diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 91faaa6c01e4..b66a3971dce3 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -735,7 +735,7 @@ void OFormattedModel::onConnectedDbColumn( const Reference< XInterface >& _rxFor Reference<XNumberFormatTypes> xTypes(xSupplier->getNumberFormats(), UNO_QUERY); if (xTypes.is()) { - Locale aApplicationLocale = Application::GetSettings().GetUILocale(); + Locale aApplicationLocale = Application::GetSettings().GetUILanguageTag().getLocale(); if (m_bOriginalNumeric) aFmtKey <<= (sal_Int32)xTypes->getStandardFormat(NumberFormat::NUMBER, aApplicationLocale); diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index 561fa25905d9..0c43b4aeb6d4 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -247,7 +247,7 @@ void SAL_CALL OFormattedFieldWrapper::write(const Reference<XObjectOutputStream> Reference<XPropertySet> xEditProps( static_cast< OWeakObject * >(m_editPart.get()), UNO_QUERY); - Locale aAppLanguage = Application::GetSettings().GetUILocale(); + Locale aAppLanguage = Application::GetSettings().GetUILanguageTag().getLocale(); dbtools::TransferFormComponentProperties(xFormatProps, xEditProps, aAppLanguage); // then write the edit part, after switching to "fake mode" diff --git a/forms/source/resource/frm_resource.cxx b/forms/source/resource/frm_resource.cxx index 9d3bb3a4d108..a7df1ba18e76 100644 --- a/forms/source/resource/frm_resource.cxx +++ b/forms/source/resource/frm_resource.cxx @@ -57,7 +57,7 @@ namespace frm if (m_pImpl) return; - m_pImpl = SimpleResMgr::Create("frm", Application::GetSettings().GetUILocale()); + m_pImpl = SimpleResMgr::Create("frm", Application::GetSettings().GetUILanguageTag().getLocale()); if (m_pImpl) { diff --git a/forms/source/richtext/richtextimplcontrol.cxx b/forms/source/richtext/richtextimplcontrol.cxx index 463ae30622b5..50337ec1f185 100644 --- a/forms/source/richtext/richtextimplcontrol.cxx +++ b/forms/source/richtext/richtextimplcontrol.cxx @@ -281,7 +281,7 @@ namespace frm { ScriptType nScript = m_pView->GetSelectedScriptType(); if ( !nScript ) - nScript = SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguage() ); + nScript = SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); return nScript; } diff --git a/formula/Library_for.mk b/formula/Library_for.mk index 848103af2e7c..1bbd199d8d5f 100644 --- a/formula/Library_for.mk +++ b/formula/Library_for.mk @@ -47,6 +47,7 @@ $(eval $(call gb_Library_use_libraries,for,\ cppu \ cppuhelper \ sal \ + i18nisolang1 \ svl \ svt \ tl \ diff --git a/formula/source/core/resource/core_resource.cxx b/formula/source/core/resource/core_resource.cxx index 9b2971946148..63279d2db7ff 100644 --- a/formula/source/core/resource/core_resource.cxx +++ b/formula/source/core/resource/core_resource.cxx @@ -47,7 +47,7 @@ namespace formula if (m_pImpl) return; - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); m_pImpl = ResMgr::CreateResMgr("for", aLocale); } diff --git a/framework/Library_fwe.mk b/framework/Library_fwe.mk index 1723d723f532..ebbfc1709c03 100644 --- a/framework/Library_fwe.mk +++ b/framework/Library_fwe.mk @@ -37,6 +37,7 @@ $(eval $(call gb_Library_use_libraries,fwe,\ cppuhelper \ fwi \ sal \ + i18nisolang1 \ svl \ svt \ tl \ diff --git a/framework/source/classes/fwlresid.cxx b/framework/source/classes/fwlresid.cxx index 9d3d435692f2..ba3987a0c01d 100644 --- a/framework/source/classes/fwlresid.cxx +++ b/framework/source/classes/fwlresid.cxx @@ -34,7 +34,7 @@ ResMgr* FwlResId::GetResManager() if ( !pResMgr ) { SolarMutexGuard aSolarGuard; - pResMgr = ResMgr::CreateResMgr("fwe", Application::GetSettings().GetUILocale()); + pResMgr = ResMgr::CreateResMgr("fwe", Application::GetSettings().GetUILanguageTag().getLocale()); } return pResMgr; diff --git a/framework/source/fwe/classes/fwkresid.cxx b/framework/source/fwe/classes/fwkresid.cxx index 3533506f1247..ff78bb393238 100644 --- a/framework/source/fwe/classes/fwkresid.cxx +++ b/framework/source/fwe/classes/fwkresid.cxx @@ -34,7 +34,7 @@ ResMgr* FwkResId::GetResManager() if ( !pResMgr ) { SolarMutexGuard aSolarGuard; - pResMgr = ResMgr::CreateResMgr("fwe", Application::GetSettings().GetUILocale()); + pResMgr = ResMgr::CreateResMgr("fwe", Application::GetSettings().GetUILanguageTag().getLocale()); } return pResMgr; diff --git a/framework/source/fwi/helper/mischelper.cxx b/framework/source/fwi/helper/mischelper.cxx index 379ec36e67a0..bf7d275b85e7 100644 --- a/framework/source/fwi/helper/mischelper.cxx +++ b/framework/source/fwi/helper/mischelper.cxx @@ -159,7 +159,7 @@ void FillLangItems( std::set< OUString > &rLangItems, //2--System const AllSettings& rAllSettings = Application::GetSettings(); - LanguageType rSystemLanguage = rAllSettings.GetLanguage(); + LanguageType rSystemLanguage = rAllSettings.GetLanguageTag().getLanguageType(); if( rSystemLanguage != LANGUAGE_DONTKNOW ) { if ( IsScriptTypeMatchingToLanguage( nScriptType, rSystemLanguage )) @@ -167,7 +167,7 @@ void FillLangItems( std::set< OUString > &rLangItems, } //3--UI - LanguageType rUILanguage = rAllSettings.GetUILanguage(); + LanguageType rUILanguage = rAllSettings.GetUILanguageTag().getLanguageType(); if( rUILanguage != LANGUAGE_DONTKNOW ) { if ( IsScriptTypeMatchingToLanguage( nScriptType, rUILanguage )) diff --git a/framework/source/services/license.cxx b/framework/source/services/license.cxx index 8e4c1d395afd..e5c0b3b1f128 100644 --- a/framework/source/services/license.cxx +++ b/framework/source/services/license.cxx @@ -224,7 +224,7 @@ css::uno::Any SAL_CALL License::execute(const css::uno::Sequence< css::beans::Na ::rtl::OUString aLangString; ::com::sun::star::lang::Locale aLocale; AllSettings aSettings(Application::GetSettings()); - aLocale = aSettings.GetUILocale(); + aLocale = aSettings.GetUILanguageTag().getLocale(); ResMgr* pResMgr = ResMgr::SearchCreateResMgr("fwe", aLocale); aLangString = aLocale.Language; diff --git a/framework/source/uielement/controlmenucontroller.cxx b/framework/source/uielement/controlmenucontroller.cxx index 408af0b267b9..5ee41bc0da27 100644 --- a/framework/source/uielement/controlmenucontroller.cxx +++ b/framework/source/uielement/controlmenucontroller.cxx @@ -206,7 +206,7 @@ ControlMenuController::~ControlMenuController() // private function void ControlMenuController::updateImagesPopupMenu( PopupMenu* pPopupMenu ) { - ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILocale()); + ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILanguageTag().getLocale()); ResId aResId( RID_SVXIMGLIST_FMEXPL, *pResMgr ); aResId.SetRT( RSC_IMAGELIST ); @@ -355,7 +355,7 @@ void ControlMenuController::impl_setPopupMenu() { if ( m_pResPopupMenu == 0 ) { - ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILocale()); + ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILanguageTag().getLocale()); if ( pResMgr ) { ResId aResId( RID_FMSHELL_CONVERSIONMENU, *pResMgr ); diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index f8d050e692a4..87e1823bab1c 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -172,7 +172,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r // first insert font size names (for simplified/traditional chinese) float fPoint; - FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguage() ); + FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguageTag().getLanguageType() ); m_pHeightArray = new long[nSizeCount+aFontSizeNames.Count()]; rtl::OUString aCommand; diff --git a/framework/source/uielement/toolbarsmenucontroller.cxx b/framework/source/uielement/toolbarsmenucontroller.cxx index c5979614dfa8..b95af5f80936 100644 --- a/framework/source/uielement/toolbarsmenucontroller.cxx +++ b/framework/source/uielement/toolbarsmenucontroller.cxx @@ -141,7 +141,7 @@ ToolbarsMenuController::ToolbarsMenuController( const ::com::sun::star::uno::Ref m_aPropResourceURL( "ResourceURL" ), m_bModuleIdentified( sal_False ), m_bResetActive( sal_False ), - m_aIntlWrapper( xServiceManager, Application::GetSettings().GetLocale() ) + m_aIntlWrapper( xServiceManager, Application::GetSettings().GetLanguageTag().getLocale() ) { } diff --git a/lotuswordpro/Library_lwpft.mk b/lotuswordpro/Library_lwpft.mk index ab1f8a2f2ed6..a521edca33fc 100644 --- a/lotuswordpro/Library_lwpft.mk +++ b/lotuswordpro/Library_lwpft.mk @@ -38,6 +38,7 @@ $(eval $(call gb_Library_use_libraries,lwpft,\ cppu \ cppuhelper \ sal \ + i18nisolang1 \ sfx \ sot \ svt \ diff --git a/lotuswordpro/source/filter/lwptools.cxx b/lotuswordpro/source/filter/lwptools.cxx index 1a3e1aec3bbe..07879029c2e5 100644 --- a/lotuswordpro/source/filter/lwptools.cxx +++ b/lotuswordpro/source/filter/lwptools.cxx @@ -284,8 +284,9 @@ XFDateStyle* LwpTools::GetSystemDateStyle(sal_Bool bLongFormat) udat_toPattern(fmt,true,pattern,nLength,&status); } */ + /* FIXME-BCP47: handle language tags! */ //1 get locale for system - ::com::sun::star::lang::Locale aLocale=Application::GetSettings().GetLocale(); + ::com::sun::star::lang::Locale aLocale=Application::GetSettings().GetLanguageTag().getLocale(); rtl::OUString strLang = aLocale.Language; rtl::OUString strCountry = aLocale.Country; icu::Locale bLocale((char*)(OUStringToOString(strLang,RTL_TEXTENCODING_MS_1252).getStr()), @@ -697,8 +698,9 @@ XFTimeStyle* LwpTools::GetSystemTimeStyle() udat_toPattern(fmt,true,pattern,nLength,&status); } */ + /* FIXME-BCP47: handle language tags! */ //1 get locale for system - ::com::sun::star::lang::Locale aLocale=Application::GetSettings().GetLocale(); + ::com::sun::star::lang::Locale aLocale=Application::GetSettings().GetLanguageTag().getLocale(); rtl::OUString strLang = aLocale.Language; rtl::OUString strCountry = aLocale.Country; icu::Locale bLocale((char*)(OUStringToOString(strLang,RTL_TEXTENCODING_MS_1252).getStr()), diff --git a/oox/Library_oox.mk b/oox/Library_oox.mk index 878d4815ec31..b1b81646d036 100644 --- a/oox/Library_oox.mk +++ b/oox/Library_oox.mk @@ -64,6 +64,7 @@ $(eval $(call gb_Library_use_libraries,oox,\ editeng \ msfilter \ sal \ + i18nisolang1 \ sax \ sfx \ svl \ diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 7b3d72268629..e28aa4a15ad0 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -645,7 +645,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs Reference< XPropertyState > rXPropState( rRun, UNO_QUERY ); OUString usLanguage; PropertyState eState; - sal_Int16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguage() ); + sal_Int16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); sal_Bool bComplex = ( nScriptType == ScriptType::COMPLEX ); const char* bold = NULL; const char* italic = NULL; diff --git a/padmin/source/helper.cxx b/padmin/source/helper.cxx index 3c2df34439f4..54ff53726059 100644 --- a/padmin/source/helper.cxx +++ b/padmin/source/helper.cxx @@ -70,6 +70,7 @@ ResId padmin::PaResId( sal_uInt32 nId ) Any aValue = aNode.getNodeValue( OUString("ooLocale") ); if( aValue >>= aLoc ) { + /* FIXME-BCP47: handle language tags! */ sal_Int32 nIndex = 0; aLocale.Language = aLoc.getToken( 0, '-', nIndex ); aLocale.Country = aLoc.getToken( 0, '-', nIndex ); @@ -78,7 +79,7 @@ ResId padmin::PaResId( sal_uInt32 nId ) } pPaResMgr = ResMgr::SearchCreateResMgr( "spa", aLocale ); AllSettings aSettings = Application::GetSettings(); - aSettings.SetUILocale( aLocale ); + aSettings.SetUILanguageTag( LanguageTag( aLocale) ); Application::SetSettings( aSettings ); } return ResId( nId, *pPaResMgr ); diff --git a/reportdesign/source/core/api/ReportComponent.cxx b/reportdesign/source/core/api/ReportComponent.cxx index e463574a5248..33af30cbc1d0 100644 --- a/reportdesign/source/core/api/ReportComponent.cxx +++ b/reportdesign/source/core/api/ReportComponent.cxx @@ -49,7 +49,7 @@ void lcl_getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rCTLFont,Langu // If the UI language is Korean, the default Latin font has to // be queried for Korean, too (the Latin language from the document can't be Korean). // This is the same logic as in SwDocShell::InitNew. - LanguageType eUiLanguage = Application::GetSettings().GetUILanguage(); + LanguageType eUiLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType(); if (MsLangId::isKorean(eUiLanguage)) eLatin = eUiLanguage; diff --git a/reportdesign/source/core/resource/core_resource.cxx b/reportdesign/source/core/resource/core_resource.cxx index 7dc6f01551d5..df12dd0dcb1e 100644 --- a/reportdesign/source/core/resource/core_resource.cxx +++ b/reportdesign/source/core/resource/core_resource.cxx @@ -54,7 +54,7 @@ namespace reportdesign // now that we have an impl class make sure it's deleted on unloading the library static ResourceManager::EnsureDelete s_aDeleteTheImplClass; - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); m_pImpl = SimpleResMgr::Create("rpt", aLocale); } diff --git a/sc/Library_scfilt.mk b/sc/Library_scfilt.mk index 7a5256e4ec7a..8359c73c41d2 100644 --- a/sc/Library_scfilt.mk +++ b/sc/Library_scfilt.mk @@ -60,6 +60,7 @@ $(eval $(call gb_Library_use_libraries,scfilt,\ tl \ utl \ vcl \ + i18nisolang1 \ $(gb_UWINAPI) \ )) diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 4286cfd71794..23d4e8049c99 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -720,7 +720,7 @@ bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe sal_uInt16 nCellLang = ((const SvxLanguageItem&) pPattern->GetItem(ATTR_FONT_LANGUAGE)).GetValue(); if ( nCellLang == LANGUAGE_SYSTEM ) - nCellLang = Application::GetSettings().GetLanguage(); // never use SYSTEM for spelling + nCellLang = Application::GetSettings().GetLanguageTag().getLanguageType(); // never use SYSTEM for spelling pEngine->SetDefaultLanguage( nCellLang ); if ( eType == CELLTYPE_STRING ) diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index 61db8dbce155..0034d92caca2 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -240,7 +240,7 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, const String& rName ) : rPool.SetPoolDefaultItem(SdrShadowYDistItem(300)); // default for script spacing depends on locale, see SdDrawDocument ctor in sd - LanguageType eOfficeLanguage = Application::GetSettings().GetLanguage(); + LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); if (MsLangId::isKorean(eOfficeLanguage) || eOfficeLanguage == LANGUAGE_JAPANESE) { // secondary is edit engine pool diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 378a2d46bc7b..3b6e40ceed73 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -971,7 +971,7 @@ void ScGlobal::OpenURL( const String& rURL, const String& rTarget ) sal_Bool ScGlobal::IsSystemRTL() { - return MsLangId::isRightToLeft( Application::GetSettings().GetLanguage() ); + return MsLangId::isRightToLeft( Application::GetSettings().GetLanguageTag().getLanguageType() ); } sal_uInt8 ScGlobal::GetDefaultScriptType() @@ -981,14 +981,14 @@ sal_uInt8 ScGlobal::GetDefaultScriptType() // to get consistent behavior of text in simple cells and EditEngine, // also same as GetAppLanguage() in Writer) - return (sal_uInt8) SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguage() ); + return (sal_uInt8) SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); } LanguageType ScGlobal::GetEditDefaultLanguage() { // used for EditEngine::SetDefaultLanguage - return Application::GetSettings().GetLanguage(); + return Application::GetSettings().GetLanguageTag().getLanguageType(); } sal_uInt16 ScGlobal::GetScriptedWhichID( sal_uInt8 nScriptType, sal_uInt16 nWhich ) @@ -1115,7 +1115,7 @@ utl::TransliterationWrapper* ScGlobal::GetpTransliteration() { if ( !pTransliteration ) { - const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguage(); + const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); pTransliteration = new ::utl::TransliterationWrapper( ::comphelper::getProcessComponentContext(), SC_TRANSLITERATION_IGNORECASE ); pTransliteration->loadModuleIfNeeded( eOfficeLanguage ); @@ -1164,7 +1164,7 @@ CollatorWrapper* ScGlobal::GetCaseCollator() { if ( !pCaseTransliteration ) { - const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguage(); + const LanguageType eOfficeLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); pCaseTransliteration = new ::utl::TransliterationWrapper(::comphelper::getProcessComponentContext(), SC_TRANSLITERATION_CASESENSE ); pCaseTransliteration->loadModuleIfNeeded( eOfficeLanguage ); } @@ -1182,7 +1182,7 @@ IntlWrapper* ScGlobal::GetScIntlWrapper() { if ( !pLocale ) { - pLocale = new ::com::sun::star::lang::Locale( Application::GetSettings().GetLocale()); + pLocale = new ::com::sun::star::lang::Locale( Application::GetSettings().GetLanguageTag().getLocale()); } return pLocale; } diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx index 020967f57451..fb5365318678 100644 --- a/sc/source/core/data/stlpool.cxx +++ b/sc/source/core/data/stlpool.cxx @@ -291,7 +291,7 @@ void ScStyleSheetPool::CreateStandardStyles() // If the UI language is Korean, the default Latin font has to // be queried for Korean, too (the Latin language from the document can't be Korean). // This is the same logic as in SwDocShell::InitNew. - LanguageType eUiLanguage = Application::GetSettings().GetUILanguage(); + LanguageType eUiLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType(); if (MsLangId::isKorean(eUiLanguage)) eLatin = eUiLanguage; diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx index d7a19cd2f61d..b298969e1c58 100644 --- a/sc/source/core/tool/addincol.cxx +++ b/sc/source/core/tool/addincol.cxx @@ -790,9 +790,7 @@ void ScUnoAddInCollection::ReadFromAddIn( const uno::Reference<uno::XInterface>& if ( xAddIn.is() && xName.is() ) { // AddIns must use the language for which the office is installed - LanguageType eOfficeLang = Application::GetSettings().GetUILanguage(); - - lang::Locale aLocale( LanguageTag( eOfficeLang ).getLocale()); + lang::Locale aLocale( Application::GetSettings().GetUILanguageTag().getLocale()); xAddIn->setLocale( aLocale ); ::rtl::OUString aServiceName( xName->getServiceName() ); @@ -1046,8 +1044,7 @@ void ScUnoAddInCollection::UpdateFromAddIn( const uno::Reference<uno::XInterface uno::Reference<lang::XLocalizable> xLoc( xInterface, uno::UNO_QUERY ); if ( xLoc.is() ) // optional in new add-ins { - LanguageType eOfficeLang = Application::GetSettings().GetUILanguage(); - lang::Locale aLocale( LanguageTag( eOfficeLang ).getLocale()); + lang::Locale aLocale( Application::GetSettings().GetUILanguageTag().getLocale()); xLoc->setLocale( aLocale ); } diff --git a/sc/source/core/tool/callform.cxx b/sc/source/core/tool/callform.cxx index 8ba120bf861b..a07eea3d7e6a 100644 --- a/sc/source/core/tool/callform.cxx +++ b/sc/source/core/tool/callform.cxx @@ -206,7 +206,7 @@ bool InitExternalFunc(const rtl::OUString& rModuleName) FARPROC fpSetLanguage = (FARPROC)pLib->getFunctionSymbol(SETLANGUAGE); if ( fpSetLanguage ) { - LanguageType eLanguage = Application::GetSettings().GetUILanguage(); + LanguageType eLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType(); sal_uInt16 nLanguage = (sal_uInt16) eLanguage; (*((SetLanguagePtr)fpSetLanguage))( nLanguage ); } diff --git a/sc/source/core/tool/zforauto.cxx b/sc/source/core/tool/zforauto.cxx index d3ddf047857f..94a22a6d92be 100644 --- a/sc/source/core/tool/zforauto.cxx +++ b/sc/source/core/tool/zforauto.cxx @@ -66,7 +66,7 @@ void ScNumFormatAbbrev::Load( SvStream& rStream, CharSet eByteStrSet ) eLnge = (LanguageType) nLang; eSysLnge = (LanguageType) nSysLang; if ( eSysLnge == LANGUAGE_SYSTEM ) // old versions did write it - eSysLnge = Application::GetSettings().GetLanguage(); + eSysLnge = Application::GetSettings().GetLanguageTag().getLanguageType(); } void ScNumFormatAbbrev::Save( SvStream& rStream, CharSet eByteStrSet ) const @@ -81,7 +81,7 @@ void ScNumFormatAbbrev::PutFormatIndex(sal_uLong nFormat, const SvNumberformat* pFormat = rFormatter.GetEntry(nFormat); if (pFormat) { - eSysLnge = Application::GetSettings().GetLanguage(); + eSysLnge = Application::GetSettings().GetLanguageTag().getLanguageType(); eLnge = pFormat->GetLanguage(); sFormatstring = ((SvNumberformat*)pFormat)->GetFormatstring(); } diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index d5c9d7147aba..ecd7c0a66cb4 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -93,9 +93,9 @@ XclRootData::XclRootData( XclBiff eBiff, SfxMedium& rMedium, mrDoc( rDoc ), maDefPassword( CREATE_STRING( "VelvetSweatshop" ) ), meTextEnc( eTextEnc ), - meSysLang( Application::GetSettings().GetLanguage() ), - meDocLang( Application::GetSettings().GetLanguage() ), - meUILang( Application::GetSettings().GetUILanguage() ), + meSysLang( Application::GetSettings().GetLanguageTag().getLanguageType() ), + meDocLang( Application::GetSettings().GetLanguageTag().getLanguageType() ), + meUILang( Application::GetSettings().GetUILanguageTag().getLanguageType() ), mnDefApiScript( ApiScriptType::LATIN ), maScMaxPos( MAXCOL, MAXROW, MAXTAB ), maXclMaxPos( EXC_MAXCOL2, EXC_MAXROW2, EXC_MAXTAB2 ), diff --git a/sc/source/ui/dbgui/textimportoptions.cxx b/sc/source/ui/dbgui/textimportoptions.cxx index 503a5e4f5c4d..ba22489e1b9a 100644 --- a/sc/source/ui/dbgui/textimportoptions.cxx +++ b/sc/source/ui/dbgui/textimportoptions.cxx @@ -82,7 +82,7 @@ void ScTextImportOptionsDlg::init() m_pLbCustomLang->SetLanguageList( LANG_LIST_ALL | LANG_LIST_ONLY_KNOWN, false, false); - LanguageType eLang = Application::GetSettings().GetLanguage(); + LanguageType eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); m_pLbCustomLang->SelectLanguage(eLang); m_pLbCustomLang->Disable(); } diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx index b4470983235b..5ff8faf8901b 100644 --- a/sc/source/ui/view/spelleng.cxx +++ b/sc/source/ui/view/spelleng.cxx @@ -230,7 +230,7 @@ bool ScConversionEngineBase::FindNextConversionCell() { LanguageType eLang = static_cast< LanguageType >( pLangItem->GetValue() ); if( eLang == LANGUAGE_SYSTEM ) - eLang = Application::GetSettings().GetLanguage(); // never use SYSTEM for spelling + eLang = Application::GetSettings().GetLanguageTag().getLanguageType(); // never use SYSTEM for spelling if( eLang != meCurrLang ) { meCurrLang = eLang; diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx index 574d1c6d7904..7fae7783ebc8 100644 --- a/sc/source/ui/view/viewutil.cxx +++ b/sc/source/ui/view/viewutil.cxx @@ -104,7 +104,7 @@ sal_uInt16 ScViewUtil::GetEffLanguage( ScDocument* pDoc, const ScAddress& rPos ) else eLnge = LANGUAGE_ENGLISH_US; if ( eLnge == LANGUAGE_SYSTEM ) - eLnge = Application::GetSettings().GetLanguage(); // never use SYSTEM for spelling + eLnge = Application::GetSettings().GetLanguageTag().getLanguageType(); // never use SYSTEM for spelling return eLnge; } diff --git a/scripting/Library_dlgprov.mk b/scripting/Library_dlgprov.mk index c8efe563bb34..3219003f9566 100644 --- a/scripting/Library_dlgprov.mk +++ b/scripting/Library_dlgprov.mk @@ -46,6 +46,7 @@ $(eval $(call gb_Library_use_libraries,dlgprov,\ cppu \ cppuhelper \ sal \ + i18nisolang1 \ sb \ sfx \ tl \ diff --git a/scripting/source/dlgprov/dlgprov.cxx b/scripting/source/dlgprov/dlgprov.cxx index 61e60d951ebe..04c458f273de 100644 --- a/scripting/source/dlgprov/dlgprov.cxx +++ b/scripting/source/dlgprov/dlgprov.cxx @@ -95,7 +95,7 @@ static ::rtl::OUString aResourceResolverPropName("ResourceResolver"); aInetObj.removeSegment(); ::rtl::OUString aDlgLocation = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); bool bReadOnly = true; - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); ::rtl::OUString aComment; Sequence<Any> aArgs( 6 ); diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx index 6b5603c127e9..c35464fa9d10 100644 --- a/sd/source/core/drawdoc.cxx +++ b/sd/source/core/drawdoc.cxx @@ -236,7 +236,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) mpCharClass = new CharClass( *mpLocale ); // If the current application language is a language that uses right-to-left text... - LanguageType eRealCTLLanguage = Application::GetSettings().GetLanguage(); + LanguageType eRealCTLLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); if( MsLangId::isRightToLeft( eRealCTLLanguage ) ) { // ... then we have to set this as a default @@ -271,7 +271,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) OSL_FAIL("Can't get SpellChecker"); } - rOutliner.SetDefaultLanguage( Application::GetSettings().GetLanguage() ); + rOutliner.SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); if (mpDocSh) { @@ -325,7 +325,7 @@ SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) OSL_FAIL("Can't get SpellChecker"); } - pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguage() ); + pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); sal_uLong nCntrl2 = pHitTestOutliner->GetControlWord(); nCntrl2 |= EE_CNTRL_ALLOWBIGOBJS; diff --git a/sd/source/core/drawdoc2.cxx b/sd/source/core/drawdoc2.cxx index 354262187df5..8cbc2e82c962 100644 --- a/sd/source/core/drawdoc2.cxx +++ b/sd/source/core/drawdoc2.cxx @@ -922,8 +922,8 @@ void SdDrawDocument::SetLanguage( const LanguageType eLang, const sal_uInt16 nId if( bChanged ) { - GetDrawOutliner().SetDefaultLanguage( Application::GetSettings().GetLanguage() ); - pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguage() ); + GetDrawOutliner().SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); + pHitTestOutliner->SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); pItemPool->SetPoolDefaultItem( SvxLanguageItem( eLang, nId ) ); SetChanged( bChanged ); } diff --git a/sd/source/core/drawdoc4.cxx b/sd/source/core/drawdoc4.cxx index ad1cde5dd369..5429938aa075 100644 --- a/sd/source/core/drawdoc4.cxx +++ b/sd/source/core/drawdoc4.cxx @@ -1389,7 +1389,7 @@ void SdDrawDocument::getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rC // If the UI language is Korean, the default Latin font has to // be queried for Korean, too (the Latin language from the document can't be Korean). // This is the same logic as in SwDocShell::InitNew. - LanguageType eUiLanguage = Application::GetSettings().GetUILanguage(); + LanguageType eUiLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType(); if (MsLangId::isKorean(eUiLanguage)) eLatin = eUiLanguage; @@ -1401,7 +1401,7 @@ void SdDrawDocument::getDefaultFonts( Font& rLatinFont, Font& rCJKFont, Font& rC /* converts the given western font height to a corresponding ctl font height, deppending on the system language */ sal_uInt32 SdDrawDocument::convertFontHeightToCTL( sal_uInt32 nWesternFontHeight ) { - LanguageType eRealCTLLanguage = Application::GetSettings().GetLanguage(); + LanguageType eRealCTLLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); if( LANGUAGE_THAI == eRealCTLLanguage ) { // http://specs.openoffice.org/g11n/font_sizes/42775_42725_Individual_configurable_font_size_for_default_fonts.odt diff --git a/sd/source/filter/eppt/pptx-text.cxx b/sd/source/filter/eppt/pptx-text.cxx index 76e7202bd93b..3043bac3f44d 100644 --- a/sd/source/filter/eppt/pptx-text.cxx +++ b/sd/source/filter/eppt/pptx-text.cxx @@ -247,7 +247,7 @@ void PortionObj::ImplGetPortionValues( FontCollection& rFontCollection, sal_Bool } } - sal_Int16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguage() ); + sal_Int16 nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); if ( mpText && mnTextSize && xPPTBreakIter.is() ) { rtl::OUString sT( mpText, mnTextSize ); diff --git a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx index c470c60d3526..6df80e96c8f6 100644 --- a/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx +++ b/sd/source/ui/accessibility/AccessibleSlideSorterView.cxx @@ -374,7 +374,7 @@ lang::Locale SAL_CALL AccessibleSlideSorterView::getLocale (void) return xParentContext->getLocale(); else // Strange, no parent! Anyway, return the default locale. - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } diff --git a/sd/source/ui/accessibility/AccessibleTreeNode.cxx b/sd/source/ui/accessibility/AccessibleTreeNode.cxx index 5a0c014183db..d59748047dee 100644 --- a/sd/source/ui/accessibility/AccessibleTreeNode.cxx +++ b/sd/source/ui/accessibility/AccessibleTreeNode.cxx @@ -339,7 +339,7 @@ lang::Locale SAL_CALL AccessibleTreeNode::getLocale (void) return xParentContext->getLocale(); else // Strange, no parent! Anyway, return the default locale. - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index 1f8698e9b4c3..fc803fb3425b 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -232,7 +232,7 @@ ImplStlEffectCategorySortHelper::ImplStlEffectCategorySortHelper() if( mxCollator.is() ) { - const lang::Locale& rLocale = Application::GetSettings().GetLocale(); + const lang::Locale& rLocale = Application::GetSettings().GetLanguageTag().getLocale(); mxCollator->loadDefaultCollator(rLocale, 0); } } diff --git a/sd/source/ui/dlg/TemplateScanner.cxx b/sd/source/ui/dlg/TemplateScanner.cxx index 0f01371aa0c7..6bacc27a985f 100644 --- a/sd/source/ui/dlg/TemplateScanner.cxx +++ b/sd/source/ui/dlg/TemplateScanner.cxx @@ -146,7 +146,7 @@ namespace sd TemplateEntryCompare::TemplateEntryCompare(): mpStringSorter(new comphelper::string::NaturalStringSorter( ::comphelper::getProcessComponentContext(), - Application::GetSettings().GetLocale())) {} + Application::GetSettings().GetLanguageTag().getLocale())) {} bool TemplateEntryCompare::operator()(TemplateEntry* pA, TemplateEntry* pB) const { diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx index a89fe1120fec..28c6b1297189 100644 --- a/sd/source/ui/unoidl/unomodel.cxx +++ b/sd/source/ui/unoidl/unomodel.cxx @@ -1528,7 +1528,7 @@ void ImplPDFExportComments( uno::Reference< drawing::XDrawPage > xPage, vcl::PDF uno::Reference< office::XAnnotationAccess > xAnnotationAccess( xPage, uno::UNO_QUERY_THROW ); uno::Reference< office::XAnnotationEnumeration > xAnnotationEnumeration( xAnnotationAccess->createAnnotationEnumeration() ); - LanguageType eLanguage = Application::GetSettings().GetLanguage(); + LanguageType eLanguage = Application::GetSettings().GetLanguageTag().getLanguageType(); while( xAnnotationEnumeration->hasMoreElements() ) { uno::Reference< office::XAnnotation > xAnnotation( xAnnotationEnumeration->nextElement() ); diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index 43aa50210251..47b5768a328a 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -235,7 +235,7 @@ Outliner::Outliner( SdDrawDocument* pDoc, sal_uInt16 nMode ) if( xHyphenator.is() ) SetHyphenator( xHyphenator ); - SetDefaultLanguage( Application::GetSettings().GetLanguage() ); + SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); } diff --git a/sd/source/ui/view/drviews5.cxx b/sd/source/ui/view/drviews5.cxx index 62ebfda910c6..230a54e33eff 100644 --- a/sd/source/ui/view/drviews5.cxx +++ b/sd/source/ui/view/drviews5.cxx @@ -464,7 +464,7 @@ void DrawViewShell::Paint(const Rectangle& rRect, ::sd::Window* pWin) /* This is done before each text edit, so why not do it before every paint. The default language is only used if the outliner only contains one character in a symbol font */ - GetDoc()->GetDrawOutliner( NULL ).SetDefaultLanguage( Application::GetSettings().GetLanguage() ); + GetDoc()->GetDrawOutliner( NULL ).SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); mpDrawView->CompleteRedraw( pWin, Region( rRect ) ); diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 0912a8a808bb..5ab7bc0e6782 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -737,7 +737,7 @@ sal_Bool View::SdrBeginTextEdit( if( xHyphenator.is() ) pOutl->SetHyphenator( xHyphenator ); - pOutl->SetDefaultLanguage( Application::GetSettings().GetLanguage() ); + pOutl->SetDefaultLanguage( Application::GetSettings().GetLanguageTag().getLanguageType() ); } sal_Bool bReturn = FmFormView::SdrBeginTextEdit( diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 73429f14d1e9..7363fc48eefa 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -712,7 +712,7 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq ) void SfxApplication::MiscState_Impl(SfxItemSet &rSet) { - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); const sal_uInt16 *pRanges = rSet.GetRanges(); DBG_ASSERT(pRanges && *pRanges, "Set without range"); while ( *pRanges ) diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index ff6a8fc81d8b..0eca0918af27 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -205,7 +205,7 @@ namespace sfx2 { String sSearchStr; sal_Int32 nStartPos = 0; - const Locale aLocale = Application::GetSettings().GetUILocale(); + const Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); Boundary aBoundary = xBreak->getWordBoundary( rSearchString, nStartPos, aLocale, WordType::ANYWORD_IGNOREWHITESPACES, sal_True ); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 3dc9cdb78f1d..fcc09827b3a3 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -724,7 +724,7 @@ namespace { String GetDateTimeString( sal_Int32 _nDate, sal_Int32 _nTime ) { - LocaleDataWrapper aWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); Date aDate( _nDate ); Time aTime( _nTime ); @@ -878,7 +878,7 @@ IMPL_LINK_NOARG(SfxDocumentPage, DeleteHdl) String aName; if ( bEnableUseUserData && aUseUserDataCB.IsChecked() ) aName = SvtUserOptions().GetFullName(); - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); DateTime now( DateTime::SYSTEM ); util::DateTime uDT( now.Get100Sec(), now.GetSec(), now.GetMin(), now.GetHour(), @@ -1148,7 +1148,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) // handle access data sal_Bool m_bUseUserData = pInfoItem->IsUseUserData(); - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); aCreateValFt.SetText( ConvertDateTime_Impl( pInfoItem->getAuthor(), pInfoItem->getCreationDate(), aLocaleWrapper ) ); util::DateTime aTime( pInfoItem->getModificationDate() ); @@ -1810,7 +1810,7 @@ CustomPropertiesWindow::CustomPropertiesWindow( Window* pParent, const ResId& rR m_aRemoveButton ( this, SfxResId( SFX_PB_PROPERTY_REMOVE ) ), m_nScrollPos (0), m_aNumberFormatter( ::comphelper::getProcessServiceFactory(), - Application::GetSettings().GetLanguage() ) + Application::GetSettings().GetLanguageTag().getLanguageType() ) { m_aEditLoseFocusTimer.SetTimeout( 300 ); diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 3e610b6600ba..86002c53a37c 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -537,7 +537,7 @@ sal_Bool StyleTreeListBox_Impl::NotifyMoving(SvTreeListEntry* pTarget, const sal_Bool bRet = (sal_Bool)aDropLink.Call(this); rpNewParent = pTarget; lPos=0; - IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); + IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLanguageTag().getLocale() ); const CollatorWrapper* pCollator = aIntlWrapper.getCaseCollator(); for(SvTreeListEntry *pTmpEntry=FirstChild(pTarget); pTmpEntry && COMPARE_LESS==pCollator->compareString( @@ -667,7 +667,7 @@ StyleTreeArr_Impl &MakeTree_Impl(StyleTreeArr_Impl &rArr) comphelper::string::NaturalStringSorter aSorter( ::comphelper::getProcessComponentContext(), - Application::GetSettings().GetLocale()); + Application::GetSettings().GetLanguageTag().getLocale()); // Arrange all under their Parents sal_uInt16 i; @@ -1308,7 +1308,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags) comphelper::string::NaturalStringSorter aSorter( ::comphelper::getProcessComponentContext(), - Application::GetSettings().GetLocale()); + Application::GetSettings().GetLanguageTag().getLocale()); while( pStyle ) { diff --git a/sfx2/source/dialog/versdlg.cxx b/sfx2/source/dialog/versdlg.cxx index aca4e4aa65f7..6d992cfc134f 100644 --- a/sfx2/source/dialog/versdlg.cxx +++ b/sfx2/source/dialog/versdlg.cxx @@ -317,7 +317,7 @@ void SfxVersionDialog::RecalcDateColumn() { // recalculate the datetime column width DateTime aNow( DateTime::SYSTEM ); - mpLocaleWrapper = new LocaleDataWrapper( Application::GetSettings().GetLocale() ); + mpLocaleWrapper = new LocaleDataWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); String sDateTime = ConvertDateTime_Impl( aNow, *mpLocaleWrapper ); long nWidth = aVersionBox.GetTextWidth( sDateTime ); nWidth += 15; // a little offset @@ -451,7 +451,7 @@ SfxViewVersionDialog_Impl::SfxViewVersionDialog_Impl ( Window *pParent, SfxVersi { FreeResource(); - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); aDateTimeText.SetText( aDateTimeText.GetText().Append(ConvertDateTime_Impl( pInfo->aCreationDate, aLocaleWrapper )) ); aSavedByText.SetText( aSavedByText.GetText().Append(pInfo->aAuthor) ); aEdit.SetText( rInfo.aComment ); diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 8511f63354e9..64d4d4629c0b 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -157,7 +157,7 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent ) const else if ( SvtCTLOptions::NUMERALS_ARABIC == aCTLOptions.GetCTLTextNumerals() ) eLang = LANGUAGE_ENGLISH; else - eLang = (LanguageType) Application::GetSettings().GetLanguage(); + eLang = (LanguageType) Application::GetSettings().GetLanguageTag().getLanguageType(); aDevice.SetDigitLanguage( eLang ); diff --git a/sfx2/source/view/orgmgr.cxx b/sfx2/source/view/orgmgr.cxx index fc74480a544b..4ba59d686ab6 100644 --- a/sfx2/source/view/orgmgr.cxx +++ b/sfx2/source/view/orgmgr.cxx @@ -217,7 +217,7 @@ SfxOrganizeMgr::SfxOrganizeMgr( SfxOrganizeListBox_Impl *pLeft, */ { pImpl->pDocList = new SfxObjectList; - pImpl->pIntlWrapper = new IntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); + pImpl->pIntlWrapper = new IntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLanguageTag().getLocale() ); const CollatorWrapper* pCollator = pImpl->pIntlWrapper->getCaseCollator(); for ( SfxObjectShell* pTmp = SfxObjectShell::GetFirst(); pTmp; pTmp = SfxObjectShell::GetNext(*pTmp) ) { diff --git a/starmath/Library_sm.mk b/starmath/Library_sm.mk index af0e885146ee..e9978d606475 100644 --- a/starmath/Library_sm.mk +++ b/starmath/Library_sm.mk @@ -40,6 +40,7 @@ $(eval $(call gb_Library_use_libraries,sm,\ cppuhelper \ editeng \ i18nutil \ + i18nisolang1 \ msfilter \ oox \ sal \ diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx index 508208c27e81..1140f6003d1f 100644 --- a/starmath/source/accessibility.cxx +++ b/starmath/source/accessibility.cxx @@ -400,7 +400,7 @@ Locale SAL_CALL SmGraphicAccessible::getLocale() SolarMutexGuard aGuard; // should be the document language... // We use the language of the localized symbol names here. - return Application::GetSettings().GetUILocale(); + return Application::GetSettings().GetUILanguageTag().getLocale(); } @@ -1918,7 +1918,7 @@ Locale SAL_CALL SmEditAccessible::getLocale( ) SolarMutexGuard aGuard; // should be the document language... // We use the language of the localized symbol names here. - return Application::GetSettings().GetUILocale(); + return Application::GetSettings().GetUILanguageTag().getLocale(); } diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx index 939dd2c93e75..56ba7bc77a8a 100644 --- a/starmath/source/cfgitem.cxx +++ b/starmath/source/cfgitem.cxx @@ -999,7 +999,7 @@ void SmMathConfig::LoadFormat() ++pVal; } - LanguageType nLang = Application::GetSettings().GetUILanguage(); + LanguageType nLang = Application::GetSettings().GetUILanguageTag().getLanguageType(); for (i = FNT_BEGIN; i < FNT_END; ++i) { Font aFnt; diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx index f783c710e259..e8aecc11a07a 100644 --- a/starmath/source/parse.cxx +++ b/starmath/source/parse.cxx @@ -2423,7 +2423,7 @@ SmParser::SmParser() { m_eConversion = CONVERT_NONE; bImportSymNames = m_bExportSymNames = false; - m_nLang = Application::GetSettings().GetUILanguage(); + m_nLang = Application::GetSettings().GetUILanguageTag().getLanguageType(); } SmNode *SmParser::Parse(const String &rBuffer) @@ -2444,7 +2444,7 @@ SmNode *SmParser::Parse(const String &rBuffer) while ( !m_aNodeStack.empty() ) m_aNodeStack.pop(); - SetLanguage( Application::GetSettings().GetUILanguage() ); + SetLanguage( Application::GetSettings().GetUILanguageTag().getLanguageType() ); NextToken(); Table(); @@ -2468,7 +2468,7 @@ SmNode *SmParser::ParseExpression(const OUString &rBuffer) while ( !m_aNodeStack.empty() ) m_aNodeStack.pop(); - SetLanguage( Application::GetSettings().GetUILanguage() ); + SetLanguage( Application::GetSettings().GetUILanguageTag().getLanguageType() ); NextToken(); Expression(); diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index efa322573de9..9e9228888918 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -953,7 +953,7 @@ sal_Int32 SAL_CALL SmModel::getRendererCount( static Size lcl_GuessPaperSize() { Size aRes; - LocaleDataWrapper aLocWrp( AllSettings().GetLocale() ); + LocaleDataWrapper aLocWrp( AllSettings().GetLanguageTag().getLocale() ); if( MEASURE_METRIC == aLocWrp.getMeasurementSystemEnum() ) { // in 100th mm diff --git a/svtools/source/contnr/DocumentInfoPreview.cxx b/svtools/source/contnr/DocumentInfoPreview.cxx index 80745859addf..048b0d834618 100644 --- a/svtools/source/contnr/DocumentInfoPreview.cxx +++ b/svtools/source/contnr/DocumentInfoPreview.cxx @@ -155,7 +155,7 @@ void ODocumentInfoPreview::insertDateTime( Time( value.Hours, value.Minutes, value.Seconds, value.HundredthSeconds)); if (aToolsDT.IsValidAndGregorian()) { - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); rtl::OUStringBuffer buf(aLocaleWrapper.getDate(aToolsDT)); buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(", ")); buf.append(aLocaleWrapper.getTime(aToolsDT)); diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 35caa93a76d7..1f02aff742a3 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -1710,7 +1710,7 @@ SvtFileView_Impl::SvtFileView_Impl( SvtFileView* pAntiImpl, Reference < XCommand ,mbReplaceNames ( sal_False ) ,mnSuspendSelectCallback ( 0 ) ,mbIsFirstResort ( sal_True ) - ,aIntlWrapper ( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ) + ,aIntlWrapper ( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLanguageTag().getLocale() ) ,maFolderImage ( SvtResId( IMG_SVT_FOLDER ) ) ,mxCmdEnv ( xEnv ) diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 5fb56b0c6e83..a81ec7602802 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -125,7 +125,7 @@ SvImpLBox::~SvImpLBox() void SvImpLBox::UpdateStringSorter() { - const ::com::sun::star::lang::Locale& rNewLocale = Application::GetSettings().GetLocale(); + const ::com::sun::star::lang::Locale& rNewLocale = Application::GetSettings().GetLanguageTag().getLocale(); if( m_pStringSorter ) { diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index cebc2feaca6b..4a2c156e2d91 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -1460,7 +1460,7 @@ void FontStyleBox::LoseFocus() void FontStyleBox::Modify() { CharClass aChrCls( ::comphelper::getProcessComponentContext(), - GetSettings().GetLocale() ); + GetSettings().GetLanguageTag().getLocale() ); XubString aStr = GetText(); sal_uInt16 nEntryCount = GetEntryCount(); @@ -1682,7 +1682,7 @@ void FontSizeBox::ImplInit() void FontSizeBox::Reformat() { - FontSizeNames aFontSizeNames( GetSettings().GetUILanguage() ); + FontSizeNames aFontSizeNames( GetSettings().GetUILanguageTag().getLanguageType() ); if ( !bRelativeMode || !aFontSizeNames.IsEmpty() ) { long nNewValue = aFontSizeNames.Name2Size( GetText() ); @@ -1776,7 +1776,7 @@ void FontSizeBox::Fill( const FontInfo* pInfo, const FontList* pList ) } // first insert font size names (for simplified/traditional chinese) - FontSizeNames aFontSizeNames( GetSettings().GetUILanguage() ); + FontSizeNames aFontSizeNames( GetSettings().GetUILanguageTag().getLanguageType() ); if ( pAry == pList->GetStdSizeAry() ) { // for standard sizes we don't need to bother @@ -1943,7 +1943,7 @@ void FontSizeBox::SetValue( sal_Int64 nNewValue, FieldUnit eInUnit ) if ( !bRelative ) { sal_Int64 nTempValue = MetricField::ConvertValue( nNewValue, GetBaseValue(), GetDecimalDigits(), eInUnit, GetUnit() ); - FontSizeNames aFontSizeNames( GetSettings().GetUILanguage() ); + FontSizeNames aFontSizeNames( GetSettings().GetUILanguageTag().getLanguageType() ); // conversion loses precision; however font sizes should // never have a problem with that String aName = aFontSizeNames.Size2Name( static_cast<long>(nTempValue) ); @@ -1971,7 +1971,7 @@ sal_Int64 FontSizeBox::GetValue( FieldUnit eOutUnit ) const { if ( !bRelative ) { - FontSizeNames aFontSizeNames( GetSettings().GetUILanguage() ); + FontSizeNames aFontSizeNames( GetSettings().GetUILanguageTag().getLanguageType() ); sal_Int64 nValue = aFontSizeNames.Name2Size( GetText() ); if ( nValue) return MetricField::ConvertValue( nValue, GetBaseValue(), GetDecimalDigits(), GetUnit(), eOutUnit ); diff --git a/svtools/source/control/ctrltool.cxx b/svtools/source/control/ctrltool.cxx index 918920c066cf..5861b23d05da 100644 --- a/svtools/source/control/ctrltool.cxx +++ b/svtools/source/control/ctrltool.cxx @@ -779,7 +779,7 @@ static const ImplFSNameItem aImplSimplifiedChinese[] = FontSizeNames::FontSizeNames( LanguageType eLanguage ) { if ( eLanguage == LANGUAGE_DONTKNOW ) - eLanguage = Application::GetSettings().GetUILanguage(); + eLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType(); if ( eLanguage == LANGUAGE_SYSTEM ) eLanguage = MsLangId::getSystemUILanguage(); diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 71a98a403eee..ab684460f512 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -176,7 +176,7 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList ) sal_uInt16 nPos = 0; // first insert font size names (for simplified/traditional chinese) - FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguage() ); + FontSizeNames aFontSizeNames( Application::GetSettings().GetUILanguageTag().getLanguageType() ); mpHeightAry = new long[nSizeCount+aFontSizeNames.Count()]; if ( !aFontSizeNames.IsEmpty() ) { diff --git a/svtools/source/edit/syntaxhighlight.cxx b/svtools/source/edit/syntaxhighlight.cxx index b7889c58baa1..2efa5a96d93f 100644 --- a/svtools/source/edit/syntaxhighlight.cxx +++ b/svtools/source/edit/syntaxhighlight.cxx @@ -330,7 +330,7 @@ bool LetterTable::isLetterUnicode( sal_Unicode c ) { static CharClass* pCharClass = NULL; if( pCharClass == NULL ) - pCharClass = new CharClass( Application::GetSettings().GetLocale() ); + pCharClass = new CharClass( Application::GetSettings().GetLanguageTag().getLocale() ); rtl::OUString aStr( c ); bool bRet = pCharClass->isLetter( aStr, 0 ); return bRet; diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index d5cad36e0f22..320354bcf74a 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -210,7 +210,7 @@ sal_Int16 SvFilterOptionsDialog::execute() ResMgr* pResMgr; - pResMgr = ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILocale() ); + pResMgr = ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag().getLocale() ); aFltCallDlgPara.pResMgr = pResMgr; aFltCallDlgPara.aFilterExt = aGraphicFilter.pConfig->GetExportFormatShortName( nFormat ); diff --git a/svtools/source/filter/filter.cxx b/svtools/source/filter/filter.cxx index 4db83cce97b9..4d7aeff86569 100644 --- a/svtools/source/filter/filter.cxx +++ b/svtools/source/filter/filter.cxx @@ -847,7 +847,7 @@ static Graphic ImpGetScaledGraphic( const Graphic& rGraphic, FilterConfigItem& r { Graphic aGraphic; - ResMgr* pResMgr = ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILocale() ); + ResMgr* pResMgr = ResMgr::CreateResMgr( "svt", Application::GetSettings().GetUILanguageTag().getLocale() ); sal_Int32 nLogicalWidth = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalWidth" ) ), 0 ); sal_Int32 nLogicalHeight = rConfigItem.ReadInt32( String( RTL_CONSTASCII_USTRINGPARAM( "LogicalHeight" ) ), 0 ); diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index cb328464f284..f49ebb620073 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -280,7 +280,7 @@ uno::Reference< ::graphic::XGraphic > GraphicProvider::implLoadResource( const : rtl::OString aResMgrName(rtl::OUStringToOString( rResourceURL.getToken(0, '/', nIndex), RTL_TEXTENCODING_ASCII_US)); - ResMgr* pResMgr = ResMgr::CreateResMgr( aResMgrName.getStr(), Application::GetSettings().GetUILocale() ); + ResMgr* pResMgr = ResMgr::CreateResMgr( aResMgrName.getStr(), Application::GetSettings().GetUILanguageTag().getLocale() ); if( pResMgr ) { diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx index ea42a5ef41c3..89d43c2fa916 100644 --- a/svtools/source/misc/ehdl.cxx +++ b/svtools/source/misc/ehdl.cxx @@ -151,7 +151,7 @@ SfxErrorHandler::SfxErrorHandler(sal_uInt16 nIdP, sal_uLong lStartP, sal_uLong l RegisterDisplay(&aWndFunc); if( ! pMgr ) { - com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); pFreeMgr = pMgr = ResMgr::CreateResMgr("ofa", aLocale ); } } @@ -278,7 +278,7 @@ sal_Bool SfxErrorHandler::GetClassString(sal_uLong lClassId, String &rStr) const { sal_Bool bRet = sal_False; - com::sun::star::lang::Locale aLocale( Application::GetSettings().GetUILocale() ); + com::sun::star::lang::Locale aLocale( Application::GetSettings().GetUILanguageTag().getLocale() ); ResMgr* pResMgr = ResMgr::CreateResMgr("ofa", aLocale ); if( pResMgr ) { @@ -407,7 +407,7 @@ sal_Bool SfxErrorContext::GetString(sal_uLong nErrId, OUString &rStr) ResMgr* pFreeMgr = NULL; if( ! pMgr ) { - com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); pFreeMgr = pMgr = ResMgr::CreateResMgr("ofa", aLocale ); } if( pMgr ) diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx index 88a8c785061f..e4168a8907b2 100644 --- a/svtools/source/misc/langhelp.cxx +++ b/svtools/source/misc/langhelp.cxx @@ -32,9 +32,9 @@ void localizeWebserviceURI( ::rtl::OUString& rURI ) { - ::rtl::OUString aLang = Application::GetSettings().GetUILocale().Language; + ::rtl::OUString aLang = Application::GetSettings().GetUILanguageTag().getLanguage(); if ( aLang.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("pt")) - && Application::GetSettings().GetUILocale().Country.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("br")) ) + && Application::GetSettings().GetUILanguageTag().getCountry().equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("br")) ) { aLang = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "pt-br" )); } diff --git a/svtools/source/misc/svtresid.cxx b/svtools/source/misc/svtresid.cxx index 64efb02fe80f..33ca09fe1095 100644 --- a/svtools/source/misc/svtresid.cxx +++ b/svtools/source/misc/svtresid.cxx @@ -34,7 +34,7 @@ namespace ResMgr* getResMgr() { - return getResMgr(Application::GetSettings().GetUILocale()); + return getResMgr(Application::GetSettings().GetUILanguageTag().getLocale()); } } diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 6f3b57395a12..14d62066d3f1 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -954,7 +954,7 @@ rtl::OString HTMLOutFuncs::CreateTableDataOptionsValNum( append(OOO_STRING_SVTOOLS_HTML_O_SDnum). append(RTL_CONSTASCII_STRINGPARAM("=\"")). append(static_cast<sal_Int32>( - Application::GetSettings().GetLanguage())). + Application::GetSettings().GetLanguageTag().getLanguageType())). append(';'); // Language fuer Format 0 if ( nFormat ) { diff --git a/svx/Library_textconversiondlgs.mk b/svx/Library_textconversiondlgs.mk index 87840de9b1c0..40bc8a96036c 100644 --- a/svx/Library_textconversiondlgs.mk +++ b/svx/Library_textconversiondlgs.mk @@ -46,6 +46,7 @@ $(eval $(call gb_Library_use_libraries,textconversiondlgs,\ cppuhelper \ cppu \ sal \ + i18nisolang1 \ svl \ svt \ tk \ diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx index 1def70a851db..a7be107782d8 100644 --- a/svx/source/accessibility/AccessibleFrameSelector.cxx +++ b/svx/source/accessibility/AccessibleFrameSelector.cxx @@ -290,7 +290,7 @@ Locale AccFrameSelector::getLocale( ) throw (IllegalAccessibleComponentStateException, RuntimeException) { Locale aRet; - SvxLanguageToLocale( aRet, Application::GetSettings().GetUILanguage() ); + SvxLanguageToLocale( aRet, Application::GetSettings().GetUILanguageTag().getLanguageType() ); return aRet; } diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 90c0fc3d8e92..cb9ab5a13087 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -568,7 +568,7 @@ IMPL_LINK( SvxSuperContourDlg, MousePosHdl, ContourWindow*, pWnd ) String aStr; const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit(); const Point& rMousePos = pWnd->GetMousePos(); - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0]; aStr.Assign( GetUnitString( rMousePos.X(), eFieldUnit, cSep ) ); @@ -585,7 +585,7 @@ IMPL_LINK( SvxSuperContourDlg, GraphSizeHdl, ContourWindow*, pWnd ) String aStr; const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit(); const Size& rSize = pWnd->GetGraphicSize(); - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0]; aStr.Assign( GetUnitString( rSize.Width(), eFieldUnit, cSep ) ); diff --git a/svx/source/dialog/compressgraphicdialog.cxx b/svx/source/dialog/compressgraphicdialog.cxx index 73c4face8330..7a0de83fc0a2 100644 --- a/svx/source/dialog/compressgraphicdialog.cxx +++ b/svx/source/dialog/compressgraphicdialog.cxx @@ -106,7 +106,7 @@ CompressGraphicsDialog::~CompressGraphicsDialog() void CompressGraphicsDialog::Update() { const FieldUnit eFieldUnit = m_rBindings.GetDispatcher()->GetModule()->GetFieldUnit(); - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0]; VirtualDevice* pDummyVDev = new VirtualDevice(); diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index ce44493b2e3a..e17ec29abd07 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -442,7 +442,7 @@ void DialControl::Init( const Size& rWinSize, const Font& rWinFont ) void DialControl::Init( const Size& rWinSize ) { Font aFont( OutputDevice::GetDefaultFont( - DEFAULTFONT_UI_SANS, Application::GetSettings().GetUILanguage(), DEFAULTFONT_FLAGS_ONLYONE ) ); + DEFAULTFONT_UI_SANS, Application::GetSettings().GetUILanguageTag().getLanguageType(), DEFAULTFONT_FLAGS_ONLYONE ) ); Init( rWinSize, aFont ); } diff --git a/svx/source/dialog/dialmgr.cxx b/svx/source/dialog/dialmgr.cxx index cba29102d0b2..099897352965 100644 --- a/svx/source/dialog/dialmgr.cxx +++ b/svx/source/dialog/dialmgr.cxx @@ -41,7 +41,7 @@ static ResMgr* pResMgr=0; ResMgr* DialogsResMgr::GetResMgr() { if ( !pResMgr ) - pResMgr = ResMgr::CreateResMgr( "svx", Application::GetSettings().GetUILocale() ); + pResMgr = ResMgr::CreateResMgr( "svx", Application::GetSettings().GetUILanguageTag().getLocale() ); return pResMgr; } diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index fa07b8153215..38670f0da426 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -665,7 +665,7 @@ IMPL_LINK( SvxIMapDlg, MousePosHdl, IMapWindow*, pWnd ) String aStr; const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit(); const Point& rMousePos = pWnd->GetMousePos(); - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0]; aStr.Assign( GetUnitString( rMousePos.X(), eFieldUnit, cSep ) ); @@ -682,7 +682,7 @@ IMPL_LINK( SvxIMapDlg, GraphSizeHdl, IMapWindow*, pWnd ) String aStr; const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit(); const Size& rSize = pWnd->GetGraphicSize(); - LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLocale() ); + LocaleDataWrapper aLocaleWrapper( Application::GetSettings().GetLanguageTag().getLocale() ); const sal_Unicode cSep = aLocaleWrapper.getNumDecimalSep()[0]; aStr.Assign( GetUnitString( rSize.Width(), eFieldUnit, cSep ) ); diff --git a/svx/source/dialog/simptabl.cxx b/svx/source/dialog/simptabl.cxx index 2618e19e7678..bb20aee77d82 100644 --- a/svx/source/dialog/simptabl.cxx +++ b/svx/source/dialog/simptabl.cxx @@ -458,7 +458,7 @@ StringCompare SvxSimpleTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* if(nRightKind == SV_ITEM_ID_LBOXSTRING && nLeftKind == SV_ITEM_ID_LBOXSTRING ) { - IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); + IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLanguageTag().getLocale() ); const CollatorWrapper* pCollator = aIntlWrapper.getCaseCollator(); eCompare=(StringCompare)pCollator->compareString( ((SvLBoxString*)pLeftItem)->GetText(), diff --git a/svx/source/dialog/swframeexample.cxx b/svx/source/dialog/swframeexample.cxx index 7825c6f019fc..4a694409d6c1 100644 --- a/svx/source/dialog/swframeexample.cxx +++ b/svx/source/dialog/swframeexample.cxx @@ -160,7 +160,7 @@ void SvxSwFrameExample::InitAllRects_Impl() if (nAnchor == TextContentAnchorType_AS_CHARACTER || nAnchor == TextContentAnchorType_AT_CHARACTER) { Font aFont = OutputDevice::GetDefaultFont( - DEFAULTFONT_LATIN_TEXT, Application::GetSettings().GetLanguage(), + DEFAULTFONT_LATIN_TEXT, Application::GetSettings().GetLanguageTag().getLanguageType(), DEFAULTFONT_FLAGS_ONLYONE, this ); aFont.SetColor( m_aTxtCol ); aFont.SetFillColor( m_aBgCol ); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index acbf420435a4..9887575e3526 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -937,7 +937,7 @@ void FmGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupMe Reference< XPropertySet > xReplaced( xCols->getByIndex( nPos ), UNO_QUERY ); OStaticDataAccessTools().TransferFormComponentProperties( - xReplaced, xNewCol, Application::GetSettings().GetUILocale() ); + xReplaced, xNewCol, Application::GetSettings().GetUILanguageTag().getLocale() ); xCols->replaceByIndex( nPos, makeAny( xNewCol ) ); ::comphelper::disposeComponent( xReplaced ); diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 47ac9d70e189..47117c184873 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1985,7 +1985,7 @@ void DbNumericField::implAdjustGenericFieldSetting( const Reference< XPropertySe static_cast< DoubleNumericField* >( m_pPainter )->SetFormatter( pFormatterUsed ); // und dann ein Format generieren, dass die gewuenschten Nachkommastellen usw. hat - LanguageType aAppLanguage = Application::GetSettings().GetUILanguage(); + LanguageType aAppLanguage = Application::GetSettings().GetUILanguageTag().getLanguageType(); OUString sFormatString = pFormatterUsed->GenerateFormat(0, aAppLanguage, bThousand, sal_False, nScale); static_cast< DoubleNumericField* >( m_pWindow )->SetFormat( sFormatString, aAppLanguage ); @@ -2985,7 +2985,7 @@ sal_Bool DbFilterField::commitControl() { OUString aPreparedText; - ::com::sun::star::lang::Locale aAppLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aAppLocale = Application::GetSettings().GetUILanguageTag().getLocale(); Reference< XRowSet > xDataSourceRowSet( (Reference< XInterface >)*m_rColumn.GetParent().getDataSource(), UNO_QUERY); diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 6f7c70056edf..4d993b31c128 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -500,7 +500,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls() { Font aApplFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE, - Application::GetSettings().GetUILanguage(), + Application::GetSettings().GetUILanguageTag().getLanguageType(), DEFAULTFONT_FLAGS_ONLYONE, this ); diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index ebe4aad2e1ca..9baa79f27f3a 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -799,7 +799,7 @@ namespace svxform // create a resource manager, for the svx resource file // and the UI locale ResMgr* pResMgr = ResMgr::CreateResMgr( - "svx", Application::GetSettings().GetUILocale() ); + "svx", Application::GetSettings().GetUILanguageTag().getLocale() ); // load the resources for the AddSubmission modal dialog. // This will create our own resource context. diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index ee2d8b9ba63a..bc851291456c 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -914,7 +914,7 @@ sal_Bool FmFilterModel::ValidateText(FmFilterItem* pItem, UniString& rText, UniS if ( xParseNode.is() ) { ::rtl::OUString aPreparedText; - Locale aAppLocale = Application::GetSettings().GetUILocale(); + Locale aAppLocale = Application::GetSettings().GetUILanguageTag().getLocale(); xParseNode->parseNodeToPredicateStr( aPreparedText, xConnection, xFormatter, xField, aAppLocale, '.', getParseContext() ); rText = aPreparedText; diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 813d43629c7c..7000608a9d5f 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1188,7 +1188,7 @@ bool FmXFormShell::executeControlConversionSlot( const Reference< XFormComponent Reference< XPropertySet> xNewSet(xNewModel, UNO_QUERY); - Locale aNewLanguage = Application::GetSettings().GetUILocale(); + Locale aNewLanguage = Application::GetSettings().GetUILanguageTag().getLocale(); TransferFormComponentProperties(xOldSet, xNewSet, aNewLanguage); Sequence< ::com::sun::star::script::ScriptEventDescriptor> aOldScripts; diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index dd3854b5a316..58e9997704ca 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -3171,7 +3171,7 @@ void FormController::setFilter(::std::vector<FmFieldInfo>& rFieldInfos) Reference< XNumberFormatsSupplier> xFormatSupplier( aStaticTools.getNumberFormats(xConnection, sal_True)); Reference< XNumberFormatter> xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW ); xFormatter->attachNumberFormatsSupplier(xFormatSupplier); - Locale aAppLocale = Application::GetSettings().GetUILocale(); + Locale aAppLocale = Application::GetSettings().GetUILanguageTag().getLocale(); LocaleDataWrapper aLocaleWrapper( m_aContext.getUNOContext(), aAppLocale ); // retrieving the filter diff --git a/svx/source/gallery2/galmisc.cxx b/svx/source/gallery2/galmisc.cxx index 4fd476915e20..8f70e1cec89e 100644 --- a/svx/source/gallery2/galmisc.cxx +++ b/svx/source/gallery2/galmisc.cxx @@ -76,7 +76,7 @@ ResMgr* GetGalleryResMgr() if( !pGalleryResMgr ) { pGalleryResMgr = ResMgr::CreateResMgr( - "gal", Application::GetSettings().GetUILocale() ); + "gal", Application::GetSettings().GetUILanguageTag().getLocale() ); } return pGalleryResMgr; diff --git a/svx/source/gallery2/galobj.cxx b/svx/source/gallery2/galobj.cxx index f0a7b5541419..ab42c7125af0 100644 --- a/svx/source/gallery2/galobj.cxx +++ b/svx/source/gallery2/galobj.cxx @@ -207,7 +207,7 @@ const String SgaObject::GetTitle() const { rtl::OString aMgrName(rtl::OUStringToOString(aResourceName, RTL_TEXTENCODING_UTF8)); ResMgr* pResMgr = ResMgr::CreateResMgr( aMgrName.getStr(), - Application::GetSettings().GetUILocale() ); + Application::GetSettings().GetUILanguageTag().getLocale() ); if ( pResMgr ) { ResId aResId( (sal_uInt16)nResId, *pResMgr ); diff --git a/svx/source/items/numfmtsh.cxx b/svx/source/items/numfmtsh.cxx index 5e12eb8ace56..5f8314d2ef07 100644 --- a/svx/source/items/numfmtsh.cxx +++ b/svx/source/items/numfmtsh.cxx @@ -1584,7 +1584,7 @@ void SvxNumberFormatShell::GetCurrencySymbols(std::vector<rtl::OUString>& rList, } CollatorWrapper aCollator( ::comphelper::getProcessServiceFactory()); - aCollator.loadDefaultCollator( Application::GetSettings().GetLocale(), 0); + aCollator.loadDefaultCollator( Application::GetSettings().GetLanguageTag().getLocale(), 0); const String aTwoSpace( RTL_CONSTASCII_USTRINGPARAM( " ")); diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx index 9d36dccb0527..8e711f0988fc 100644 --- a/svx/source/svdraw/svdattr.cxx +++ b/svx/source/svdraw/svdattr.cxx @@ -878,7 +878,7 @@ SfxItemPresentation SdrAngleItem::GetPresentation( if(!pIntlWrapper) pIntlWrapper = pMyIntlWrapper = new IntlWrapper( ::comphelper::getProcessServiceFactory(), - Application::GetSettings().GetLanguage() ); + Application::GetSettings().GetLanguageTag().getLanguageType() ); if(pIntlWrapper->getLocaleData()->isNumLeadingZero()) nAnz++; diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx index 54d9ae6faa82..8d85e941acd4 100644 --- a/svx/source/svdraw/svdetc.cxx +++ b/svx/source/svdraw/svdetc.cxx @@ -446,7 +446,7 @@ ResMgr* ImpGetResMgr() if(!rGlobalData.pResMgr) { rGlobalData.pResMgr = - ResMgr::CreateResMgr( "svx", Application::GetSettings().GetUILocale() ); + ResMgr::CreateResMgr( "svx", Application::GetSettings().GetUILanguageTag().getLocale() ); } return rGlobalData.pResMgr; diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx index 8bcb27df0fbb..073701e1679a 100644 --- a/svx/source/svdraw/svdmodel.cxx +++ b/svx/source/svdraw/svdmodel.cxx @@ -787,7 +787,7 @@ void SdrModel::SetTextDefaults( SfxItemPool* pItemPool, sal_uIntPtr nDefTextHgt SvxFontItem aSvxFontItem( EE_CHAR_FONTINFO) ; SvxFontItem aSvxFontItemCJK(EE_CHAR_FONTINFO_CJK); SvxFontItem aSvxFontItemCTL(EE_CHAR_FONTINFO_CTL); - sal_uInt16 nLanguage(Application::GetSettings().GetLanguage()); + sal_uInt16 nLanguage(Application::GetSettings().GetLanguageTag().getLanguageType()); // get DEFAULTFONT_LATIN_TEXT and set at pool as dynamic default Font aFont(OutputDevice::GetDefaultFont(DEFAULTFONT_LATIN_TEXT, nLanguage, DEFAULTFONT_FLAGS_ONLYONE, 0)); diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 63a0f9f7bdde..c4710abcf4d8 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -396,7 +396,7 @@ StringCompare DictionaryList::ColumnCompare( SvTreeListEntry* pLeft, SvTreeListE if(nRightKind == SV_ITEM_ID_LBOXSTRING && nLeftKind == SV_ITEM_ID_LBOXSTRING ) { - IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLocale() ); + IntlWrapper aIntlWrapper( ::comphelper::getProcessServiceFactory(), Application::GetSettings().GetLanguageTag().getLocale() ); const CollatorWrapper* pCollator = aIntlWrapper.getCaseCollator(); eCompare=(StringCompare)pCollator->compareString( ((SvLBoxString*)pLeftItem)->GetText(), 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 )) diff --git a/toolkit/Library_tk.mk b/toolkit/Library_tk.mk index cfd0079c2978..7385829e8965 100644 --- a/toolkit/Library_tk.mk +++ b/toolkit/Library_tk.mk @@ -49,6 +49,7 @@ $(eval $(call gb_Library_use_libraries,tk,\ cppu \ cppuhelper \ sal \ + i18nisolang1 \ tl \ utl \ vcl \ diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 6f260a4093bf..106cb0810474 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -713,7 +713,7 @@ lang::Locale VCLXAccessibleComponent::getLocale() throw (accessibility::IllegalA { OExternalLockGuard aGuard( this ); - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } uno::Reference< accessibility::XAccessible > VCLXAccessibleComponent::getAccessibleAtPoint( const awt::Point& rPoint ) throw (uno::RuntimeException) diff --git a/toolkit/source/controls/grid/sortablegriddatamodel.cxx b/toolkit/source/controls/grid/sortablegriddatamodel.cxx index 109478c5b9cf..5343050a3e95 100644 --- a/toolkit/source/controls/grid/sortablegriddatamodel.cxx +++ b/toolkit/source/controls/grid/sortablegriddatamodel.cxx @@ -216,7 +216,7 @@ namespace toolkit Reference< XCollator > lcl_loadDefaultCollator_throw( ::comphelper::ComponentContext const & i_context ) { Reference< XCollator > const xCollator( i_context.createComponent( "com.sun.star.i18n.Collator" ), UNO_QUERY_THROW ); - xCollator->loadDefaultCollator( Application::GetSettings().GetLocale(), 0 ); + xCollator->loadDefaultCollator( Application::GetSettings().GetLanguageTag().getLocale(), 0 ); return xCollator; } } diff --git a/toolkit/source/helper/tkresmgr.cxx b/toolkit/source/helper/tkresmgr.cxx index bd514d9099b6..ae197370a355 100644 --- a/toolkit/source/helper/tkresmgr.cxx +++ b/toolkit/source/helper/tkresmgr.cxx @@ -55,7 +55,7 @@ void TkResMgr::ensureImplExists() if (m_pSimpleResMgr) return; - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); m_pSimpleResMgr = SimpleResMgr::Create( "tk", aLocale ); m_pResMgr = ResMgr::CreateResMgr( "tk" ); diff --git a/uui/Library_uui.mk b/uui/Library_uui.mk index 69335bf0ad26..bc075f99ae1a 100644 --- a/uui/Library_uui.mk +++ b/uui/Library_uui.mk @@ -37,6 +37,7 @@ $(eval $(call gb_Library_use_libraries,uui,\ cppu \ cppuhelper \ sal \ + i18nisolang1 \ svl \ svt \ tk \ diff --git a/uui/source/iahndl-ssl.cxx b/uui/source/iahndl-ssl.cxx index 029c83ad7868..5f220a4d9626 100644 --- a/uui/source/iahndl-ssl.cxx +++ b/uui/source/iahndl-ssl.cxx @@ -113,7 +113,7 @@ getLocalizedDatTimeStr( aDate = Date( rDateTime.Day, rDateTime.Month, rDateTime.Year ); aTime = Time( rDateTime.Hours, rDateTime.Minutes, rDateTime.Seconds ); - LanguageType eUILang = Application::GetSettings().GetUILanguage(); + LanguageType eUILang = Application::GetSettings().GetUILanguageTag().getLanguageType(); SvNumberFormatter *pNumberFormatter = new SvNumberFormatter( xServiceFactory, eUILang ); String aTmpStr; diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index 24278f3fe488..9949eae4b6c0 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -1104,7 +1104,7 @@ sal_Bool PspSalPrinter::StartJob( const rtl::OUString* i_pFileName, const rtl::O aContext.Version = vcl::PDFWriter::PDF_1_4; aContext.Tagged = false; aContext.EmbedStandardFonts = true; - aContext.DocumentLocale = Application::GetSettings().GetLocale(); + aContext.DocumentLocale = Application::GetSettings().GetLanguageTag().getLocale(); aContext.ColorMode = i_rController.getPrinter()->GetPrinterOptions().IsConvertToGreyscales() ? vcl::PDFWriter::DrawGreyscale : vcl::PDFWriter::DrawColor; diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx index d49515b42d0a..3365fbb569e0 100644 --- a/vcl/generic/print/genpspgraphics.cxx +++ b/vcl/generic/print/genpspgraphics.cxx @@ -1185,7 +1185,7 @@ namespace vcl const char* getLangBoost() { const char* pLangBoost; - const LanguageType eLang = Application::GetSettings().GetUILanguage(); + const LanguageType eLang = Application::GetSettings().GetUILanguageTag().getLanguageType(); if (eLang == LANGUAGE_JAPANESE) pLangBoost = "jan"; else if (MsLangId::isKorean(eLang)) diff --git a/vcl/inc/vcl/settings.hxx b/vcl/inc/vcl/settings.hxx index 0b8009607925..3a18de34a705 100644 --- a/vcl/inc/vcl/settings.hxx +++ b/vcl/inc/vcl/settings.hxx @@ -26,7 +26,7 @@ #include "vcl/font.hxx" #include "vcl/accel.hxx" #include "vcl/wall.hxx" -#include "com/sun/star/lang/Locale.hpp" +#include <i18npool/languagetag.hxx> #include <unotools/syslocale.hxx> class CollatorWrapper; @@ -992,17 +992,15 @@ class ImplAllSettingsData ~ImplAllSettingsData(); private: - sal_uLong mnRefCount; + sal_uLong mnRefCount; MouseSettings maMouseSettings; StyleSettings maStyleSettings; MiscSettings maMiscSettings; HelpSettings maHelpSettings; - ::com::sun::star::lang::Locale maLocale; - sal_uLong mnSystemUpdate; - sal_uLong mnWindowUpdate; - ::com::sun::star::lang::Locale maUILocale; - LanguageType meLanguage; - LanguageType meUILanguage; + LanguageTag maLocale; + sal_uLong mnSystemUpdate; + sal_uLong mnWindowUpdate; + LanguageTag maUILocale; LocaleDataWrapper* mpLocaleDataWrapper; LocaleDataWrapper* mpUILocaleDataWrapper; vcl::I18nHelper* mpI18nHelper; @@ -1062,14 +1060,10 @@ public: const HelpSettings& GetHelpSettings() const { return mpData->maHelpSettings; } - void SetLocale( const ::com::sun::star::lang::Locale& rLocale ); - const ::com::sun::star::lang::Locale& GetLocale() const; - void SetUILocale( const ::com::sun::star::lang::Locale& rLocale ); - const ::com::sun::star::lang::Locale& GetUILocale() const; - void SetLanguage( LanguageType eLang ); - LanguageType GetLanguage() const; - void SetUILanguage( LanguageType eLang ); - LanguageType GetUILanguage() const; + void SetLanguageTag( const LanguageTag& rLanguageTag ); + const LanguageTag& GetLanguageTag() const; + void SetUILanguageTag( const LanguageTag& rLanguageTag ); + const LanguageTag& GetUILanguageTag() const; bool GetLayoutRTL() const; // returns true if UI language requires right-to-left UI const LocaleDataWrapper& GetLocaleDataWrapper() const; const LocaleDataWrapper& GetUILocaleDataWrapper() const; diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index b4601b5416d1..ee72e0201f9b 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -1257,7 +1257,7 @@ void DbgDialogTest( Window* pWindow ) nAccelPos = aText.Search( '~' ); if ( nAccelPos != STRING_NOTFOUND ) { - const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLocale(); + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetLanguageTag().getLocale(); uno::Reference < i18n::XCharacterClassification > xCharClass = vcl::unohelper::CreateCharacterClassification(); XubString aUpperText = xCharClass->toUpper( aText, 0, aText.Len(), rLocale ); cAccel = aUpperText.GetChar( nAccelPos+1 ); diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index aa42cb6c8ecd..cc89b324b986 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -1195,12 +1195,13 @@ sal_Bool HelpSettings::operator ==( const HelpSettings& rSet ) const // ======================================================================= ImplAllSettingsData::ImplAllSettingsData() + : + maLocale( LANGUAGE_SYSTEM ), + maUILocale( LANGUAGE_SYSTEM ) { mnRefCount = 1; mnSystemUpdate = SETTINGS_ALLSETTINGS; mnWindowUpdate = SETTINGS_ALLSETTINGS; - meLanguage = LANGUAGE_SYSTEM; - meUILanguage = LANGUAGE_SYSTEM; mpLocaleDataWrapper = NULL; mpUILocaleDataWrapper = NULL; mpI18nHelper = NULL; @@ -1215,12 +1216,12 @@ ImplAllSettingsData::ImplAllSettingsData( const ImplAllSettingsData& rData ) : maStyleSettings( rData.maStyleSettings ), maMiscSettings( rData.maMiscSettings ), maHelpSettings( rData.maHelpSettings ), - maLocale( rData.maLocale ) + maLocale( rData.maLocale ), + maUILocale( rData.maUILocale ) { mnRefCount = 1; mnSystemUpdate = rData.mnSystemUpdate; mnWindowUpdate = rData.mnWindowUpdate; - meLanguage = rData.meLanguage; // Pointer couldn't shared and objects haven't a copy ctor // So we create the cache objects new, if the GetFunction is // called @@ -1363,9 +1364,9 @@ sal_uLong AllSettings::Update( sal_uLong nFlags, const AllSettings& rSet ) if ( nFlags & SETTINGS_LOCALE ) { - if ( mpData->meLanguage || rSet.mpData->meLanguage ) + if ( mpData->maLocale != rSet.mpData->maLocale ) { - SetLanguage( rSet.mpData->meLanguage ); + SetLanguageTag( rSet.mpData->maLocale ); nChangeFlags |= SETTINGS_LOCALE; } } @@ -1399,7 +1400,7 @@ sal_uLong AllSettings::GetChangeFlags( const AllSettings& rSet ) const if ( mpData->maHelpSettings != rSet.mpData->maHelpSettings ) nChangeFlags |= SETTINGS_HELP; - if ( mpData->meLanguage || rSet.mpData->meLanguage ) + if ( mpData->maLocale != rSet.mpData->maLocale ) nChangeFlags |= SETTINGS_LOCALE; return nChangeFlags; @@ -1431,45 +1432,14 @@ sal_Bool AllSettings::operator ==( const AllSettings& rSet ) const // ----------------------------------------------------------------------- -void AllSettings::SetLocale( const ::com::sun::star::lang::Locale& rLocale ) +void AllSettings::SetLanguageTag( const LanguageTag& rLanguageTag ) { - CopyData(); - - mpData->maLocale = rLocale; - - if ( rLocale.Language.isEmpty() ) - mpData->meLanguage = LANGUAGE_SYSTEM; - else - mpData->meLanguage = LanguageTag( rLocale ).getLanguageType( false); - if ( mpData->mpLocaleDataWrapper ) - { - delete mpData->mpLocaleDataWrapper; - mpData->mpLocaleDataWrapper = NULL; - } - if ( mpData->mpI18nHelper ) - { - delete mpData->mpI18nHelper; - mpData->mpI18nHelper = NULL; - } -} - -// ----------------------------------------------------------------------- - -void AllSettings::SetUILocale( const ::com::sun::star::lang::Locale& ) -{ - // there is only one UILocale per process -} - -// ----------------------------------------------------------------------- - -void AllSettings::SetLanguage( LanguageType eLang ) -{ - if ( eLang != mpData->meLanguage ) + if (mpData->maLocale != rLanguageTag) { CopyData(); - mpData->meLanguage = eLang; - mpData->maLocale = LanguageTag( GetLanguage() ).getLocale(); + mpData->maLocale = rLanguageTag; + if ( mpData->mpLocaleDataWrapper ) { delete mpData->mpLocaleDataWrapper; @@ -1485,9 +1455,9 @@ void AllSettings::SetLanguage( LanguageType eLang ) // ----------------------------------------------------------------------- -void AllSettings::SetUILanguage( LanguageType ) +void AllSettings::SetUILanguageTag( const LanguageTag& ) { - // there is only one UILanguage per process + // there is only one UILocale per process } // ----------------------------------------------------------------------- @@ -1526,7 +1496,7 @@ bool AllSettings::GetLayoutRTL() const LanguageType aLang = LANGUAGE_DONTKNOW; ImplSVData* pSVData = ImplGetSVData(); if ( pSVData->maAppData.mpSettings ) - aLang = pSVData->maAppData.mpSettings->GetUILanguage(); + aLang = pSVData->maAppData.mpSettings->GetUILanguageTag().getLanguageType(); bRTL = MsLangId::isRightToLeft( aLang ); } else @@ -1537,50 +1507,33 @@ bool AllSettings::GetLayoutRTL() const // ----------------------------------------------------------------------- -const ::com::sun::star::lang::Locale& AllSettings::GetLocale() const +const LanguageTag& AllSettings::GetLanguageTag() const { - if ( mpData->maLocale.Language.isEmpty() ) - mpData->maLocale = mpData->maSysLocale.GetLanguageTag().getLocale(); + // SYSTEM locale means: use settings from SvtSysLocale that is resolved + if ( mpData->maLocale.isSystemLocale() ) + mpData->maLocale = mpData->maSysLocale.GetLanguageTag(); return mpData->maLocale; } // ----------------------------------------------------------------------- -const ::com::sun::star::lang::Locale& AllSettings::GetUILocale() const +const LanguageTag& AllSettings::GetUILanguageTag() const { // the UILocale is never changed - if ( mpData->maUILocale.Language.isEmpty() ) - mpData->maUILocale = mpData->maSysLocale.GetUILanguageTag().getLocale(); + if ( mpData->maUILocale.isSystemLocale() ) + mpData->maUILocale = mpData->maSysLocale.GetUILanguageTag(); return mpData->maUILocale; } // ----------------------------------------------------------------------- -LanguageType AllSettings::GetLanguage() const -{ - // meLanguage == LANGUAGE_SYSTEM means: use settings from SvtSysLocale - if ( mpData->meLanguage == LANGUAGE_SYSTEM ) - return mpData->maSysLocale.GetLanguageTag().getLanguageType(); - - return mpData->meLanguage; -} - -// ----------------------------------------------------------------------- - -LanguageType AllSettings::GetUILanguage() const -{ - // the UILanguage is never changed - return mpData->maSysLocale.GetUILanguageTag().getLanguageType(); -} - -// ----------------------------------------------------------------------- - const LocaleDataWrapper& AllSettings::GetLocaleDataWrapper() const { if ( !mpData->mpLocaleDataWrapper ) - ((AllSettings*)this)->mpData->mpLocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessComponentContext(), GetLocale() ); + ((AllSettings*)this)->mpData->mpLocaleDataWrapper = new LocaleDataWrapper( + comphelper::getProcessComponentContext(), GetLanguageTag().getLocale() ); return *mpData->mpLocaleDataWrapper; } @@ -1589,7 +1542,8 @@ const LocaleDataWrapper& AllSettings::GetLocaleDataWrapper() const const LocaleDataWrapper& AllSettings::GetUILocaleDataWrapper() const { if ( !mpData->mpUILocaleDataWrapper ) - ((AllSettings*)this)->mpData->mpUILocaleDataWrapper = new LocaleDataWrapper( comphelper::getProcessComponentContext(), GetUILocale() ); + ((AllSettings*)this)->mpData->mpUILocaleDataWrapper = new LocaleDataWrapper( + comphelper::getProcessComponentContext(), GetUILanguageTag().getLocale() ); return *mpData->mpUILocaleDataWrapper; } @@ -1598,7 +1552,8 @@ const LocaleDataWrapper& AllSettings::GetUILocaleDataWrapper() const const vcl::I18nHelper& AllSettings::GetLocaleI18nHelper() const { if ( !mpData->mpI18nHelper ) { - ((AllSettings*)this)->mpData->mpI18nHelper = new vcl::I18nHelper( comphelper::getProcessComponentContext(), GetLocale() ); + ((AllSettings*)this)->mpData->mpI18nHelper = new vcl::I18nHelper( + comphelper::getProcessComponentContext(), GetLanguageTag().getLocale() ); } return *mpData->mpI18nHelper; } @@ -1608,7 +1563,8 @@ const vcl::I18nHelper& AllSettings::GetLocaleI18nHelper() const const vcl::I18nHelper& AllSettings::GetUILocaleI18nHelper() const { if ( !mpData->mpUII18nHelper ) { - ((AllSettings*)this)->mpData->mpUII18nHelper = new vcl::I18nHelper( comphelper::getProcessComponentContext(), GetUILocale() ); + ((AllSettings*)this)->mpData->mpUII18nHelper = new vcl::I18nHelper( + comphelper::getProcessComponentContext(), GetUILanguageTag().getLocale() ); } return *mpData->mpUII18nHelper; } @@ -1628,7 +1584,7 @@ void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint ) } if ( (nHint & SYSLOCALEOPTIONS_HINT_LOCALE) ) - aAllSettings.SetLocale( aAllSettings.mpData->maSysLocale.GetOptions().GetLanguageTag().getLocale() ); + aAllSettings.SetLanguageTag( aAllSettings.mpData->maSysLocale.GetOptions().GetLanguageTag() ); Application::SetSettings( aAllSettings ); } diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 5fee6d9f117d..45147d1d6105 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -619,17 +619,18 @@ void Application::SetSettings( const AllSettings& rSettings ) { GetSettings(); *pSVData->maAppData.mpSettings = rSettings; - ResMgr::SetDefaultLocale( rSettings.GetUILocale() ); + ResMgr::SetDefaultLocale( rSettings.GetUILanguageTag().getLocale() ); } else { AllSettings aOldSettings = *pSVData->maAppData.mpSettings; - if( aOldSettings.GetUILanguage() != rSettings.GetUILanguage() && pSVData->mpResMgr ) + if( aOldSettings.GetUILanguageTag().getLanguageType() != rSettings.GetUILanguageTag().getLanguageType() && + pSVData->mpResMgr ) { delete pSVData->mpResMgr; pSVData->mpResMgr = NULL; } - ResMgr::SetDefaultLocale( rSettings.GetUILocale() ); + ResMgr::SetDefaultLocale( rSettings.GetUILanguageTag().getLocale() ); *pSVData->maAppData.mpSettings = rSettings; sal_uLong nChangeFlags = aOldSettings.GetChangeFlags( *pSVData->maAppData.mpSettings ); if ( nChangeFlags ) diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index d9af0b698a50..b238497e3a00 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -181,7 +181,7 @@ ResMgr* ImplGetResMgr() ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->mpResMgr ) { - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); pSVData->mpResMgr = ResMgr::SearchCreateResMgr( VCL_CREATERESMGR_NAME( vcl ), aLocale ); static bool bMessageOnce = false; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index eed89146bd3b..0c1ae909cd4b 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -795,9 +795,11 @@ void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uI { if ( nMode == EDIT_DELMODE_RESTOFWORD ) { - i18n::Boundary aBoundary = xBI->getWordBoundary( maText, aSelection.Min(), GetSettings().GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True ); + i18n::Boundary aBoundary = xBI->getWordBoundary( maText, aSelection.Min(), + GetSettings().GetLanguageTag().getLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True ); if ( aBoundary.startPos == aSelection.Min() ) - aBoundary = xBI->previousWord( maText, aSelection.Min(), GetSettings().GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES ); + aBoundary = xBI->previousWord( maText, aSelection.Min(), + GetSettings().GetLanguageTag().getLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES ); aSelection.Min() = aBoundary.startPos; } else if ( nMode == EDIT_DELMODE_RESTOFCONTENT ) @@ -807,14 +809,16 @@ void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uI else { sal_Int32 nCount = 1; - aSelection.Min() = xBI->previousCharacters( maText, aSelection.Min(), GetSettings().GetLocale(), i18n::CharacterIteratorMode::SKIPCHARACTER, nCount, nCount ); + aSelection.Min() = xBI->previousCharacters( maText, aSelection.Min(), + GetSettings().GetLanguageTag().getLocale(), i18n::CharacterIteratorMode::SKIPCHARACTER, nCount, nCount ); } } else { if ( nMode == EDIT_DELMODE_RESTOFWORD ) { - i18n::Boundary aBoundary = xBI->nextWord( maText, aSelection.Max(), GetSettings().GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES ); + i18n::Boundary aBoundary = xBI->nextWord( maText, aSelection.Max(), + GetSettings().GetLanguageTag().getLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES ); aSelection.Max() = aBoundary.startPos; } else if ( nMode == EDIT_DELMODE_RESTOFCONTENT ) @@ -824,7 +828,8 @@ void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uI else { sal_Int32 nCount = 1; - aSelection.Max() = xBI->nextCharacters( maText, aSelection.Max(), GetSettings().GetLocale(), i18n::CharacterIteratorMode::SKIPCHARACTER, nCount, nCount ); + aSelection.Max() = xBI->nextCharacters( maText, aSelection.Max(), + GetSettings().GetLanguageTag().getLocale(), i18n::CharacterIteratorMode::SKIPCHARACTER, nCount, nCount ); } } } @@ -1509,7 +1514,8 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt ) else if ( rMEvt.GetClicks() == 2 ) { uno::Reference < i18n::XBreakIterator > xBI = ImplGetBreakIterator(); - i18n::Boundary aBoundary = xBI->getWordBoundary( maText, aSelection.Max(), GetSettings().GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True ); + i18n::Boundary aBoundary = xBI->getWordBoundary( maText, aSelection.Max(), + GetSettings().GetLanguageTag().getLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True ); ImplSetSelection( Selection( aBoundary.startPos, aBoundary.endPos ) ); ImplCopyToSelectionClipboard(); } @@ -1742,28 +1748,33 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) { if ( bWord ) { - i18n::Boundary aBoundary = xBI->getWordBoundary( maText, aSel.Max(), GetSettings().GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True ); + i18n::Boundary aBoundary = xBI->getWordBoundary( maText, aSel.Max(), + GetSettings().GetLanguageTag().getLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES, sal_True ); if ( aBoundary.startPos == aSel.Max() ) - aBoundary = xBI->previousWord( maText, aSel.Max(), GetSettings().GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES ); + aBoundary = xBI->previousWord( maText, aSel.Max(), + GetSettings().GetLanguageTag().getLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES ); aSel.Max() = aBoundary.startPos; } else { sal_Int32 nCount = 1; - aSel.Max() = xBI->previousCharacters( maText, aSel.Max(), GetSettings().GetLocale(), i18n::CharacterIteratorMode::SKIPCHARACTER, nCount, nCount ); + aSel.Max() = xBI->previousCharacters( maText, aSel.Max(), + GetSettings().GetLanguageTag().getLocale(), i18n::CharacterIteratorMode::SKIPCHARACTER, nCount, nCount ); } } else if ( bGoRight && ( aSel.Max() < maText.Len() ) ) { if ( bWord ) { - i18n::Boundary aBoundary = xBI->nextWord( maText, aSel.Max(), GetSettings().GetLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES ); + i18n::Boundary aBoundary = xBI->nextWord( maText, aSel.Max(), + GetSettings().GetLanguageTag().getLocale(), i18n::WordType::ANYWORD_IGNOREWHITESPACES ); aSel.Max() = aBoundary.startPos; } else { sal_Int32 nCount = 1; - aSel.Max() = xBI->nextCharacters( maText, aSel.Max(), GetSettings().GetLocale(), i18n::CharacterIteratorMode::SKIPCHARACTER, nCount, nCount ); + aSel.Max() = xBI->nextCharacters( maText, aSel.Max(), + GetSettings().GetLanguageTag().getLocale(), i18n::CharacterIteratorMode::SKIPCHARACTER, nCount, nCount ); } } else if ( bGoHome ) diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 9600e447c9bb..28db0e2735b1 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -360,9 +360,9 @@ const lang::Locale& FormatterBase::GetLocale() const if ( !mpLocaleDataWrapper || mbDefaultLocale ) { if ( mpField ) - return mpField->GetSettings().GetLocale(); + return mpField->GetSettings().GetLanguageTag().getLocale(); else - return Application::GetSettings().GetLocale(); + return Application::GetSettings().GetLanguageTag().getLocale(); } return mpLocaleDataWrapper->getLocale(); @@ -885,7 +885,7 @@ void NumericField::DataChanged( const DataChangedEvent& rDCEvt ) String sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); if ( IsDefaultLocale() ) - ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLocale() ); + ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLanguageTag().getLocale() ); String sNewDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sNewThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); ImplUpdateSeparators( sOldDecSep, sNewDecSep, sOldThSep, sNewThSep, this ); @@ -1043,7 +1043,7 @@ void NumericBox::DataChanged( const DataChangedEvent& rDCEvt ) String sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); if ( IsDefaultLocale() ) - ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLocale() ); + ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLanguageTag().getLocale() ); String sNewDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sNewThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); ImplUpdateSeparators( sOldDecSep, sNewDecSep, sOldThSep, sNewThSep, this ); @@ -1887,7 +1887,7 @@ void MetricField::DataChanged( const DataChangedEvent& rDCEvt ) String sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); if ( IsDefaultLocale() ) - ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLocale() ); + ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLanguageTag().getLocale() ); String sNewDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sNewThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); ImplUpdateSeparators( sOldDecSep, sNewDecSep, sOldThSep, sNewThSep, this ); @@ -2013,7 +2013,7 @@ void MetricBox::DataChanged( const DataChangedEvent& rDCEvt ) String sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); if ( IsDefaultLocale() ) - ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLocale() ); + ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLanguageTag().getLocale() ); String sNewDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sNewThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); ImplUpdateSeparators( sOldDecSep, sNewDecSep, sOldThSep, sNewThSep, this ); @@ -2299,7 +2299,7 @@ void CurrencyField::DataChanged( const DataChangedEvent& rDCEvt ) String sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); if ( IsDefaultLocale() ) - ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLocale() ); + ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLanguageTag().getLocale() ); String sNewDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sNewThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); ImplUpdateSeparators( sOldDecSep, sNewDecSep, sOldThSep, sNewThSep, this ); @@ -2401,7 +2401,7 @@ void CurrencyBox::DataChanged( const DataChangedEvent& rDCEvt ) String sOldDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sOldThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); if ( IsDefaultLocale() ) - ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLocale() ); + ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLanguageTag().getLocale() ); String sNewDecSep = ImplGetLocaleDataWrapper().getNumDecimalSep(); String sNewThSep = ImplGetLocaleDataWrapper().getNumThousandSep(); ImplUpdateSeparators( sOldDecSep, sNewDecSep, sOldThSep, sNewThSep, this ); diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index eb7958658810..cc9061f89cbd 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -159,7 +159,8 @@ static int ImplIsPatternChar( sal_Unicode cChar, sal_Char cEditMask ) try { rtl::OUString aCharStr(cChar); - nType = ImplGetCharClass()->getStringType( aCharStr, 0, aCharStr.getLength(), Application::GetSettings().GetLocale() ); + nType = ImplGetCharClass()->getStringType( aCharStr, 0, aCharStr.getLength(), + Application::GetSettings().GetLanguageTag().getLocale() ); } catch (const ::com::sun::star::uno::Exception&) { @@ -208,7 +209,8 @@ static sal_Unicode ImplPatternChar( sal_Unicode cChar, sal_Char cEditMask ) (cEditMask == EDITMASK_UPPERALPHANUM) || ( cEditMask == EDITMASK_UPPERALLCHAR ) ) { - cChar = ImplGetCharClass()->toUpper(rtl::OUString(cChar), 0, 1, Application::GetSettings().GetLocale())[0]; + cChar = ImplGetCharClass()->toUpper(rtl::OUString(cChar), 0, 1, + Application::GetSettings().GetLanguageTag().getLocale())[0]; } return cChar; } @@ -2011,7 +2013,7 @@ void DateField::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & (SETTINGS_LOCALE|SETTINGS_MISC)) ) { if ( IsDefaultLocale() && ( rDCEvt.GetFlags() & SETTINGS_LOCALE ) ) - ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLocale() ); + ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLanguageTag().getLocale() ); ReformatAll(); } } @@ -2096,7 +2098,7 @@ void DateBox::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) { if ( IsDefaultLocale() ) - ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLocale() ); + ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLanguageTag().getLocale() ); ReformatAll(); } } @@ -2957,7 +2959,7 @@ void TimeField::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) { if ( IsDefaultLocale() ) - ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLocale() ); + ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLanguageTag().getLocale() ); ReformatAll(); } } @@ -3109,7 +3111,7 @@ void TimeBox::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_LOCALE) ) { if ( IsDefaultLocale() ) - ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLocale() ); + ImplGetLocaleDataWrapper().setLocale( GetSettings().GetLanguageTag().getLocale() ); ReformatAll(); } } diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index 6894675b8b29..34fd3fb053bb 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -146,7 +146,7 @@ namespace { return comphelper::string::NaturalStringSorter( ::comphelper::getProcessComponentContext(), - Application::GetSettings().GetLocale()); + Application::GetSettings().GetLanguageTag().getLocale()); } }; } diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index b719b7eed54f..0c7d132f334e 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -2962,7 +2962,7 @@ void TextEngine::SetLocale( const ::com::sun::star::lang::Locale& rLocale ) { if ( maLocale.Language.isEmpty() ) { - maLocale = Application::GetSettings().GetUILocale(); + maLocale = Application::GetSettings().GetUILanguageTag().getLocale(); // XXX why UI locale? } return maLocale; } diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 10fadc705b90..05bc05532001 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -721,7 +721,7 @@ TextWindow::TextWindow( Window* pParent ) : Window( pParent ) mpExtTextEngine->SetMaxTextLen( STRING_MAXLEN ); if( pParent->GetStyle() & WB_BORDER ) mpExtTextEngine->SetLeftMargin( 2 ); - mpExtTextEngine->SetLocale( GetSettings().GetLocale() ); + mpExtTextEngine->SetLocale( GetSettings().GetLanguageTag().getLocale() ); mpExtTextView = new ExtTextView( mpExtTextEngine, this ); mpExtTextEngine->InsertView( mpExtTextView ); mpExtTextEngine->EnableUndo( sal_True ); diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx index 6b8744acd206..4fe25637a86e 100644 --- a/vcl/source/edit/xtextedt.cxx +++ b/vcl/source/edit/xtextedt.cxx @@ -162,7 +162,7 @@ sal_Bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& nStartNode = aStartPaM.GetPara(); util::SearchOptions aOptions( rSearchOptions ); - aOptions.Locale = Application::GetSettings().GetLocale(); + aOptions.Locale = Application::GetSettings().GetLanguageTag().getLocale(); utl::TextSearch aSearcher( rSearchOptions ); // ueber die Absaetze iterieren... diff --git a/vcl/source/gdi/impimagetree.cxx b/vcl/source/gdi/impimagetree.cxx index 1f7a329da17e..a67e8f56f0cf 100644 --- a/vcl/source/gdi/impimagetree.cxx +++ b/vcl/source/gdi/impimagetree.cxx @@ -237,8 +237,9 @@ bool ImplImageTree::doLoadImage( if (localized) { sal_Int32 pos = name.lastIndexOf('/'); if (pos != -1) { + /* FIXME-BCP47: this needs to be changed for language tags! */ css::lang::Locale const & loc = - Application::GetSettings().GetUILocale(); + Application::GetSettings().GetUILanguageTag().getLocale(); paths.push_back(createPath(name, pos, loc.Language)); if (!loc.Country.isEmpty()) { rtl::OUStringBuffer b(loc.Language); diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index 00b9cc34ab05..74519ad6c870 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -473,7 +473,7 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang, com::sun::star::lang::Locale aLocale; if( eLang == LANGUAGE_NONE || eLang == LANGUAGE_SYSTEM || eLang == LANGUAGE_DONTKNOW ) { - aLocale = Application::GetSettings().GetUILocale(); + aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); } else { @@ -4945,7 +4945,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, if ( xBI.is() ) { - const com::sun::star::lang::Locale& rDefLocale(Application::GetSettings().GetUILocale()); + const com::sun::star::lang::Locale& rDefLocale(Application::GetSettings().GetUILanguageTag().getLocale()); xub_StrLen nSoftBreak = _rLayout.GetTextBreak( rStr, nWidth, nPos, nBreakPos - nPos ); DBG_ASSERT( nSoftBreak < nBreakPos, "Break?!" ); //aHyphOptions.hyphenIndex = nSoftBreak; diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index e2fcca66d36c..463dad0187e4 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -132,7 +132,7 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri OUString sUri = sUIDir + sUIFile; - com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); bool bEN_US = aLocale.Language == "en" && aLocale.Country == "US" && aLocale.Variant.isEmpty(); if (!bEN_US) loadTranslations(aLocale, sUri); diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index 11194b453a94..26f730016a15 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -417,7 +417,7 @@ static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Uni if ( !xCharClass.is() ) xCharClass = vcl::unohelper::CreateCharacterClassification(); - const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILocale(); + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILanguageTag().getLocale(); cCharCode = xCharClass->toUpper( rtl::OUString(cCharCode), 0, 1, rLocale )[0]; if ( i < nFormEnd ) diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index b6606b365999..926438c17fc1 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -370,7 +370,8 @@ MenuItemData* MenuItemList::SearchItem( sal_Unicode mnUnicode = pData->aText.GetChar(n+1); Window* pDefWindow = ImplGetDefaultWindow(); if( ( pDefWindow - && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode, Application::GetSettings().GetUILanguage(), mnKeyCode ) + && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( mnUnicode, + Application::GetSettings().GetUILanguageTag().getLanguageType(), mnKeyCode ) && aKeyCode.GetCode() == mnKeyCode.GetCode() ) || ( ascii @@ -430,7 +431,8 @@ size_t MenuItemList::GetItemCount( KeyCode aKeyCode ) const // so we have working shortcuts when ascii mnemonics are used Window* pDefWindow = ImplGetDefaultWindow(); if( ( pDefWindow - && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText.GetChar(n+1), Application::GetSettings().GetUILanguage(), mnKeyCode ) + && pDefWindow->ImplGetFrame()->MapUnicodeToKeyCode( pData->aText.GetChar(n+1), + Application::GetSettings().GetUILanguageTag().getLanguageType(), mnKeyCode ) && aKeyCode.GetCode() == mnKeyCode.GetCode() ) || ( ascii diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx index da6394df0afc..877e1dd9d2d3 100644 --- a/vcl/source/window/mnemonic.cxx +++ b/vcl/source/window/mnemonic.cxx @@ -82,7 +82,7 @@ sal_Unicode MnemonicGenerator::ImplFindMnemonic( const XubString& rKey ) void MnemonicGenerator::RegisterMnemonic( const XubString& rKey ) { - const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILocale(); + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILanguageTag().getLocale(); uno::Reference < i18n::XCharacterClassification > xCharClass = GetCharClass(); // Don't crash even when we don't have access to i18n service @@ -128,7 +128,7 @@ sal_Bool MnemonicGenerator::CreateMnemonic( XubString& rKey ) if ( !rKey.Len() || ImplFindMnemonic( rKey ) ) return sal_False; - const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILocale(); + const ::com::sun::star::lang::Locale& rLocale = Application::GetSettings().GetUILanguageTag().getLocale(); uno::Reference < i18n::XCharacterClassification > xCharClass = GetCharClass(); // Don't crash even when we don't have access to i18n service @@ -140,7 +140,7 @@ sal_Bool MnemonicGenerator::CreateMnemonic( XubString& rKey ) sal_Bool bChanged = sal_False; xub_StrLen nLen = aKey.Len(); - bool bCJK = MsLangId::isCJK(Application::GetSettings().GetUILanguage()); + bool bCJK = MsLangId::isCJK(Application::GetSettings().GetUILanguageTag().getLanguageType()); // #107889# in CJK versions ALL strings (even those that contain latin characters) // will get mnemonics in the form: xyz (M) diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 22c35fa01282..db996f3e22c0 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -315,7 +315,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl if ( !bUseSystemFont ) { ImplInitFontList(); - String aConfigFont = utl::DefaultFontConfiguration::get().getUserInterfaceFont( rSettings.GetUILocale() ); + String aConfigFont = utl::DefaultFontConfiguration::get().getUserInterfaceFont( rSettings.GetUILanguageTag().getLocale() ); xub_StrLen nIndex = 0; while( nIndex != STRING_NOTFOUND ) { @@ -397,7 +397,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl // if the UI is korean, chinese or another locale // where the system font size is kown to be often too small to // generate readable fonts enforce a minimum font size of 9 points - bool bBrokenLangFontHeight = MsLangId::isCJK(Application::GetSettings().GetUILanguage()); + bool bBrokenLangFontHeight = MsLangId::isCJK(Application::GetSettings().GetUILanguageTag().getLanguageType()); if (bBrokenLangFontHeight) defFontheight = Max(9, defFontheight); diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index c0d013d9c518..318534a5a2aa 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -894,7 +894,7 @@ void Window::SetZoomedPointFont( const Font& rFont ) nType = DEFAULTFONT_FIXED; else nType = DEFAULTFONT_UI_SANS; - Font aTempFont = GetDefaultFont( nType, GetSettings().GetLanguage(), 0 ); + Font aTempFont = GetDefaultFont( nType, GetSettings().GetLanguageTag().getLanguageType(), 0 ); aFont.SetName( aTempFont.GetName() ); SetPointFont( aFont ); } diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 3310e6da6f5d..725bd19f1d9f 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -739,7 +739,7 @@ sal_uInt16 SalDisplay::GetIndicatorState() const rtl::OUString SalDisplay::GetKeyNameFromKeySym( KeySym nKeySym ) const { - rtl::OUString aLang = Application::GetSettings().GetUILocale().Language; + rtl::OUString aLang = Application::GetSettings().GetUILanguageTag().getLanguage(); rtl::OUString aRet; // return an empty string for keysyms that are not bound to diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index d5951112e575..d746b726d70d 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -132,7 +132,7 @@ namespace psp if( bInsertDefault && aLoc.Language.isEmpty() ) { // empty locale requested, fill in application UI locale - aLoc = Application::GetSettings().GetUILocale(); + aLoc = Application::GetSettings().GetUILanguageTag().getLocale(); #if OSL_DEBUG_LEVEL > 1 static const char* pEnvLocale = getenv( "SAL_PPDPARSER_LOCALE" ); diff --git a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx index 15e29b10405e..2481e314c9d5 100644 --- a/vcl/unx/gtk/fpicker/SalGtkPicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkPicker.cxx @@ -187,7 +187,8 @@ void SalGtkPicker::setGtkLanguage() if (bSet) return; - ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILocale(); + /* FIXME-BCP47: let LanguageTag create glibc locale string! */ + ::com::sun::star::lang::Locale aLocale = Application::GetSettings().GetUILanguageTag().getLocale(); rtl::OUStringBuffer aBuffer; aBuffer.append( aLocale.Language ); aBuffer.appendAscii( "_" ); diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 5a1d37693e22..839750d79ebd 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -3911,7 +3911,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) #endif // match font to e.g. resolve "Sans" - psp::PrintFontManager::get().matchFont( aInfo, rSettings.GetUILocale() ); + psp::PrintFontManager::get().matchFont( aInfo, rSettings.GetUILanguageTag().getLocale() ); #if OSL_DEBUG_LEVEL > 1 std::fprintf( stderr, "font match %s, name AFTER: \"%s\"\n", diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx index 8ef259fdad2c..c8992ecfb780 100644 --- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx +++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx @@ -544,7 +544,7 @@ rtl_TextEncoding RTFDocumentImpl::getEncoding(sal_uInt32 nFontIndex) std::map<int, rtl_TextEncoding>::iterator it = m_aFontEncodings.find(nFontIndex); if (it != m_aFontEncodings.end()) return it->second; - return msfilter::util::getBestTextEncodingFromLocale(Application::GetSettings().GetLocale()); + return msfilter::util::getBestTextEncodingFromLocale(Application::GetSettings().GetLanguageTag().getLocale()); } else return m_pSuperstream->getEncoding(nFontIndex); diff --git a/writerfilter/source/rtftok/rtftokenizer.cxx b/writerfilter/source/rtftok/rtftokenizer.cxx index de5cffff6cc2..b2fe78cab66b 100644 --- a/writerfilter/source/rtftok/rtftokenizer.cxx +++ b/writerfilter/source/rtftok/rtftokenizer.cxx @@ -75,7 +75,7 @@ int RTFTokenizer::resolveParse() if (m_xStatusIndicator.is()) { - static ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILocale()); + static ResMgr* pResMgr = ResMgr::CreateResMgr("svx", Application::GetSettings().GetUILanguageTag().getLocale()); OUString sDocLoad(ResId(RID_SVXSTR_DOC_LOAD, *pResMgr).toString()); sal_uInt32 nCurrentPos = Strm().Tell(); |