summaryrefslogtreecommitdiff
path: root/basctl
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 /basctl
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 'basctl')
-rw-r--r--basctl/source/basicide/basicbox.cxx2
-rw-r--r--basctl/source/basicide/baside2b.cxx8
2 files changed, 5 insertions, 5 deletions
diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx
index 198e003e320b..8abae513fe10 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -452,7 +452,7 @@ void LanguageBox::ClearBox()
void LanguageBox::SetLanguage()
{
- LanguageEntry* pEntry = (LanguageEntry*)GetEntryData( GetSelectEntryPos() );
+ LanguageEntry* pEntry = (LanguageEntry*)GetSelectEntryData();
if ( pEntry )
GetShell()->GetCurLocalizationMgr()->handleSetCurrentLocale( pEntry->m_aLocale );
}
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 60fa48ad46dc..3413afa7d3c7 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2669,16 +2669,16 @@ void CodeCompleteListBox::InsertSelectedEntry()
GetParentEditView()->SetSelection( pCodeCompleteWindow->pParent->GetLastHighlightPortionTextSelection() );
GetParentEditView()->DeleteSelected();
- if( !GetEntry( GetSelectEntryPos() ).isEmpty() )
+ if( !GetSelectEntry().isEmpty() )
{//if the user selected something
- GetParentEditView()->InsertText( GetEntry(GetSelectEntryPos()), false );
+ GetParentEditView()->InsertText( GetSelectEntry(), false );
}
}
else
{
- if( !GetEntry( GetSelectEntryPos() ).isEmpty() )
+ if( !GetSelectEntry().isEmpty() )
{//if the user selected something
- GetParentEditView()->InsertText( GetEntry(GetSelectEntryPos()), false );
+ GetParentEditView()->InsertText( GetSelectEntry(), false );
}
}
HideAndRestoreFocus();