summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-09-19 10:25:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-09-19 12:41:03 +0200
commita9e0ca2a5f816d4d8a4cd5f079aee0fc2aab0b7a (patch)
tree4ae9a5ec503de0f5024b63c5c812096f6023b1c8 /cui
parent82572caae4a282cdf79456b977508ca71507c584 (diff)
use an explicit id for the default currency
Change-Id: I437966b55226805d6de83b17221318eb1f0279b8 Reviewed-on: https://gerrit.libreoffice.org/79116 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/options/optgdlg.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 2ef0e6fa8b78..1d95f8ab8720 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -1192,7 +1192,8 @@ OfaLanguagesTabPage::OfaLanguagesTabPage(TabPageParent pParent, const SfxItemSet
const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry( LANGUAGE_SYSTEM );
// insert SYSTEM entry
OUString aDefaultCurr = m_sSystemDefaultString + " - " + rCurr.GetBankSymbol();
- m_xCurrencyLB->append_text(aDefaultCurr);
+ m_xCurrencyLB->append("default", aDefaultCurr);
+ assert(m_xCurrencyLB->find_id("default") != -1);
// all currencies
OUString aTwoSpace( " " );
sal_uInt16 nCurrCount = rCurrTab.size();
@@ -1708,9 +1709,10 @@ IMPL_LINK_NOARG(OfaLanguagesTabPage, LocaleSettingHdl, weld::ComboBox&, void)
const NfCurrencyEntry& rCurr = SvNumberFormatter::GetCurrencyEntry(
(eLang == LANGUAGE_USER_SYSTEM_CONFIG) ? MsLangId::getSystemLanguage() : eLang);
// Update the "Default ..." currency.
- m_xCurrencyLB->remove_id("");
+ m_xCurrencyLB->remove_id("default");
OUString aDefaultCurr = m_sSystemDefaultString + " - " + rCurr.GetBankSymbol();
- m_xCurrencyLB->append_text(aDefaultCurr);
+ m_xCurrencyLB->append("default", aDefaultCurr);
+ assert(m_xCurrencyLB->find_id("default") != -1);
m_xCurrencyLB->set_active_text(aDefaultCurr);
// obtain corresponding locale data