diff options
author | Noel Grandin <noel@peralex.com> | 2015-02-13 13:31:57 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-02-16 06:38:42 +0000 |
commit | 9f8ffc8dfed61eb8460d92ce85b20effe5114f87 (patch) | |
tree | 22345276a060d99201fa271486b785a5b56dc87b /reportdesign/source | |
parent | 031166e43ff2e476df5158ff3e6e631b0c346441 (diff) |
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 <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'reportdesign/source')
-rw-r--r-- | reportdesign/source/ui/dlg/DateTime.cxx | 8 | ||||
-rw-r--r-- | reportdesign/source/ui/dlg/GroupsSorting.cxx | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/reportdesign/source/ui/dlg/DateTime.cxx b/reportdesign/source/ui/dlg/DateTime.cxx index e77d254610cd..eaba66735718 100644 --- a/reportdesign/source/ui/dlg/DateTime.cxx +++ b/reportdesign/source/ui/dlg/DateTime.cxx @@ -142,12 +142,12 @@ short ODateTimeDialog::Execute() sal_Int32 nWidth = 0; if ( m_pDate->IsChecked() ) { - OUString sDateFormat = m_pDateListBox->GetEntry( m_pDateListBox->GetSelectEntryPos() ); + OUString sDateFormat = m_pDateListBox->GetSelectEntry(); nWidth = LogicToLogic(PixelToLogic(Size(GetCtrlTextWidth(sDateFormat),0)).Width(),GetMapMode().GetMapUnit(),MAP_100TH_MM); } if ( m_pTime->IsChecked() ) { - OUString sDateFormat = m_pTimeListBox->GetEntry( m_pTimeListBox->GetSelectEntryPos() ); + OUString sDateFormat = m_pTimeListBox->GetSelectEntry(); nWidth = ::std::max<sal_Int32>(LogicToLogic(PixelToLogic(Size(GetCtrlTextWidth(sDateFormat),0)).Width(),GetMapMode().GetMapUnit(),MAP_100TH_MM),nWidth); } @@ -217,11 +217,11 @@ sal_Int32 ODateTimeDialog::getFormatKey(bool _bDate) const sal_Int32 nFormatKey; if ( _bDate ) { - nFormatKey = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(m_pDateListBox->GetEntryData( m_pDateListBox->GetSelectEntryPos() ))); + nFormatKey = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(m_pDateListBox->GetSelectEntryData())); } else { - nFormatKey = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(m_pTimeListBox->GetEntryData( m_pTimeListBox->GetSelectEntryPos() ))); + nFormatKey = static_cast<sal_Int32>(reinterpret_cast<sal_IntPtr>(m_pTimeListBox->GetSelectEntryData())); } return nFormatKey; } diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index 171ce3768cd4..8f2607fedca4 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -1024,7 +1024,7 @@ void OGroupsSortingDialog::SaveData( sal_Int32 _nRow) xGroup->setKeepTogether( m_pKeepTogetherLst->GetSelectEntryPos() ); if ( m_pGroupOnLst->IsValueChangedFromSaved() ) { - sal_Int16 nGroupOn = static_cast<sal_Int16>(reinterpret_cast<sal_IntPtr>(m_pGroupOnLst->GetEntryData(m_pGroupOnLst->GetSelectEntryPos()))); + sal_Int16 nGroupOn = static_cast<sal_Int16>(reinterpret_cast<sal_IntPtr>(m_pGroupOnLst->GetSelectEntryData())); xGroup->setGroupOn( nGroupOn ); } if ( m_pGroupIntervalEd->IsValueChangedFromSaved() ) |