From 9955dbebbdf1b7d36fec272dfea46f57fab47e19 Mon Sep 17 00:00:00 2001 From: Eike Rathke Date: Thu, 22 Nov 2012 12:26:52 +0100 Subject: AllSettings with LanguageTag Change-Id: I710ae66e51139662eb442b681fdf9cc9d158551d --- cui/source/dialogs/insdlg.cxx | 2 +- cui/source/dialogs/pastedlg.cxx | 2 +- cui/source/dialogs/postdlg.cxx | 6 +++--- cui/source/factory/cuiresmgr.cxx | 2 +- cui/source/options/optasian.cxx | 2 +- cui/source/options/optdict.cxx | 2 +- cui/source/options/optgdlg.cxx | 4 ++-- cui/source/options/optgenrl.cxx | 2 +- cui/source/options/optlingu.cxx | 2 +- cui/source/options/optupdt.cxx | 2 +- cui/source/tabpages/autocdlg.cxx | 4 ++-- cui/source/tabpages/numpages.cxx | 4 ++-- cui/source/tabpages/tabstpge.cxx | 2 +- 13 files changed, 18 insertions(+), 18 deletions(-) (limited to 'cui/source') 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 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 > 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(); } -- cgit