From 9f8ffc8dfed61eb8460d92ce85b20effe5114f87 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 13 Feb 2015 13:31:57 +0200 Subject: add GetSelectEntryData to ListBox and ComboBox to reduce code clutter like pLbSelect->GetEntryData(pLbSelect->GetSelectEntryPos()) since this is a fairly frequent operation. Change-Id: I41daf30fdeda2442ad1ac829e12f553233bae184 Reviewed-on: https://gerrit.libreoffice.org/14472 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- cui/source/options/optgdlg.cxx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'cui/source/options/optgdlg.cxx') diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index 512e8ad2c024..207addc847b7 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1254,7 +1254,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) // handle settings for UI Language // a change of setting needs to bring up a warning message OUString aLangString; - sal_Int32 d = (sal_Int32)reinterpret_cast(m_pUserInterfaceLB->GetEntryData(m_pUserInterfaceLB->GetSelectEntryPos())); + sal_Int32 d = (sal_Int32)reinterpret_cast(m_pUserInterfaceLB->GetSelectEntryData()); if( d > 0 && seqInstalledLanguages.getLength() > d-1) aLangString = seqInstalledLanguages[d-1]; @@ -1331,9 +1331,7 @@ bool OfaLanguagesTabPage::FillItemSet( SfxItemSet* rSet ) // Configured currency, for example, USD-en-US or EUR-de-DE, or empty for locale default. OUString sOldCurr = pLangConfig->aSysLocaleOptions.GetCurrencyConfigString(); - sal_Int32 nCurrPos = m_pCurrencyLB->GetSelectEntryPos(); - const NfCurrencyEntry* pCurr = (const NfCurrencyEntry*) - m_pCurrencyLB->GetEntryData( nCurrPos ); + const NfCurrencyEntry* pCurr = (const NfCurrencyEntry*) m_pCurrencyLB->GetSelectEntryData(); OUString sNewCurr; if ( pCurr ) sNewCurr = SvtSysLocaleOptions::CreateCurrencyConfigString( -- cgit