summaryrefslogtreecommitdiff
path: root/sw/source/ui/misc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-02-13 13:31:57 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-02-16 06:38:42 +0000
commit9f8ffc8dfed61eb8460d92ce85b20effe5114f87 (patch)
tree22345276a060d99201fa271486b785a5b56dc87b /sw/source/ui/misc
parent031166e43ff2e476df5158ff3e6e631b0c346441 (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 'sw/source/ui/misc')
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/misc/srtdlg.cxx11
2 files changed, 5 insertions, 8 deletions
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index ca1eff0631ad..385ce257cfeb 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -318,7 +318,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, ModifyHdl)
bool bEnableNew = true;
bool bEnableDel = false;
sal_uLong nCaseReadonly =
- reinterpret_cast<sal_uLong>(m_pPathLB->GetEntryData(m_pPathLB->GetSelectEntryPos()));
+ reinterpret_cast<sal_uLong>(m_pPathLB->GetSelectEntryData());
bool bDirReadonly = 0 != (nCaseReadonly&PATH_READONLY);
if(sEntry.isEmpty() || bDirReadonly)
diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx
index 4adaec9a62e9..093faac1f791 100644
--- a/sw/source/ui/misc/srtdlg.cxx
+++ b/sw/source/ui/misc/srtdlg.cxx
@@ -299,8 +299,7 @@ void SwSortDlg::Apply()
OUString sEntry( m_pTypDLB1->GetSelectEntry() );
if( sEntry == aNumericTxt )
sEntry.clear();
- else if( 0 != (pUserData = m_pTypDLB1->GetEntryData(
- m_pTypDLB1->GetSelectEntryPos())) )
+ else if( 0 != (pUserData = m_pTypDLB1->GetSelectEntryData()) )
sEntry = *(OUString*)pUserData;
SwSortKey *pKey = new SwSortKey( nCol1, sEntry,
@@ -313,8 +312,7 @@ void SwSortDlg::Apply()
OUString sEntry( m_pTypDLB2->GetSelectEntry() );
if( sEntry == aNumericTxt )
sEntry.clear();
- else if( 0 != (pUserData = m_pTypDLB2->GetEntryData(
- m_pTypDLB2->GetSelectEntryPos())) )
+ else if( 0 != (pUserData = m_pTypDLB2->GetSelectEntryData()) )
sEntry = *(OUString*)pUserData;
SwSortKey *pKey = new SwSortKey( nCol2, sEntry,
@@ -327,8 +325,7 @@ void SwSortDlg::Apply()
OUString sEntry( m_pTypDLB3->GetSelectEntry() );
if( sEntry == aNumericTxt )
sEntry.clear();
- else if( 0 != (pUserData = m_pTypDLB3->GetEntryData(
- m_pTypDLB3->GetSelectEntryPos())) )
+ else if( 0 != (pUserData = m_pTypDLB3->GetSelectEntryData()) )
sEntry = *(OUString*)pUserData;
SwSortKey *pKey = new SwSortKey( nCol3, sEntry,
@@ -429,7 +426,7 @@ IMPL_LINK( SwSortDlg, LanguageHdl, ListBox*, pLBox )
for( int n = 0; n < nLstBoxCnt; ++n )
{
ListBox* pL = aLstArr[ n ];
- void* pUserData = pL->GetEntryData( pL->GetSelectEntryPos() );
+ void* pUserData = pL->GetSelectEntryData();
if (pUserData)
aOldStrArr[ n ] = *(OUString*)pUserData;
::lcl_ClearLstBoxAndDelUserData( *pL );