diff options
author | Eike Rathke <erack@redhat.com> | 2013-12-18 21:37:57 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2013-12-18 21:38:55 +0100 |
commit | aec792c1a429bd96a172d529521247a2b3391987 (patch) | |
tree | c2be971d21a47f8a89b6b5fba12b9e8eafec4b38 /cui/source/options/optgdlg.cxx | |
parent | c30de064af34e288f3e224c1c7cf1923858eb738 (diff) |
resolved fdo#51961 let "Default ..." currency entry follow selected locale
Change-Id: I69b13d1009638451fa6c2bc9336cdac0bab6ec32
Diffstat (limited to 'cui/source/options/optgdlg.cxx')
-rw-r--r-- | cui/source/options/optgdlg.cxx | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 9904688772a7..f4599e117e3a 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1025,9 +1025,9 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe // initialize user interface language selection SvtLanguageTable* pLanguageTable = new SvtLanguageTable; - const OUString aStr( pLanguageTable->GetString( LANGUAGE_SYSTEM ) ); + m_sSystemDefaultString = pLanguageTable->GetString( LANGUAGE_SYSTEM ); - OUString aUILang = aStr + + OUString aUILang = m_sSystemDefaultString + " - " + pLanguageTable->GetString( Application::GetSettings().GetUILanguageTag().getLanguageType(), true ); @@ -1100,7 +1100,7 @@ OfaLanguagesTabPage::OfaLanguagesTabPage( Window* pParent, const SfxItemSet& rSe const NfCurrencyTable& rCurrTab = SvNumberFormatter::GetTheCurrencyTable(); const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry( LANGUAGE_SYSTEM ); // insert SYSTEM entry - OUString aDefaultCurr = aStr + " - " + rCurr.GetBankSymbol(); + OUString aDefaultCurr = m_sSystemDefaultString + " - " + rCurr.GetBankSymbol(); m_pCurrencyLB->InsertEntry( aDefaultCurr ); // all currencies OUString aTwoSpace( " " ); @@ -1633,13 +1633,15 @@ IMPL_LINK( OfaLanguagesTabPage, LocaleSettingHdl, SvxLanguageBox*, pBox ) SupportHdl( m_pAsianSupportCB ); } - sal_uInt16 nPos; - if ( eLang == LANGUAGE_USER_SYSTEM_CONFIG ) - nPos = m_pCurrencyLB->GetEntryPos( (void*) NULL ); - else + const NfCurrencyEntry* pCurr = &SvNumberFormatter::GetCurrencyEntry( + ((eLang == LANGUAGE_USER_SYSTEM_CONFIG) ? MsLangId::getSystemLanguage() : eLang)); + sal_uInt16 nPos = m_pCurrencyLB->GetEntryPos( (void*) NULL ); + if (pCurr) { - const NfCurrencyEntry* pCurr = &SvNumberFormatter::GetCurrencyEntry( eLang ); - nPos = m_pCurrencyLB->GetEntryPos( (void*) pCurr ); + // Update the "Default ..." currency. + m_pCurrencyLB->RemoveEntry( nPos ); + OUString aDefaultCurr = m_sSystemDefaultString + " - " + pCurr->GetBankSymbol(); + nPos = m_pCurrencyLB->InsertEntry( aDefaultCurr ); } m_pCurrencyLB->SelectEntryPos( nPos ); |