summaryrefslogtreecommitdiff
path: root/sd/source
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 /sd/source
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 'sd/source')
-rw-r--r--sd/source/ui/animations/CustomAnimationCreateDialog.cxx4
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx6
-rw-r--r--sd/source/ui/dlg/headerfooterdlg.cxx4
3 files changed, 7 insertions, 7 deletions
diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
index 6a68229968fc..b258ba270f0b 100644
--- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx
@@ -318,7 +318,7 @@ IMPL_LINK( CustomAnimationCreateTabPage, implDoubleClickHdl, Control*, pControl
void CustomAnimationCreateTabPage::onSelectEffect()
{
- CustomAnimationPresetPtr*p = static_cast< CustomAnimationPresetPtr* >( mpLBEffects->GetEntryData( mpLBEffects->GetSelectEntryPos() ) );
+ CustomAnimationPresetPtr*p = static_cast< CustomAnimationPresetPtr* >( mpLBEffects->GetSelectEntryData() );
if( !p )
return;
@@ -366,7 +366,7 @@ CustomAnimationPresetPtr CustomAnimationCreateTabPage::getSelectedPreset() const
if( mpLBEffects->GetSelectEntryCount() == 1 )
{
- void* pEntryData = mpLBEffects->GetEntryData( mpLBEffects->GetSelectEntryPos() );
+ void* pEntryData = mpLBEffects->GetSelectEntryData();
if( pEntryData )
pPreset = *static_cast< CustomAnimationPresetPtr* >( pEntryData );
}
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index e4d5e9285286..cb4889aa583e 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -524,8 +524,8 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, DownHdl)
sal_uInt16 nActPos = pImagesLst->GetSelectEntryPos();
if (!pImagesLst->GetEntry(nActPos + 1).isEmpty())
{
- OUString sActEntry( pImagesLst->GetEntry(pImagesLst->GetSelectEntryPos()) );
- OUString* pActData = (OUString*) pImagesLst->GetEntryData(pImagesLst->GetSelectEntryPos());
+ OUString sActEntry( pImagesLst->GetSelectEntry() );
+ OUString* pActData = (OUString*) pImagesLst->GetSelectEntryData();
OUString sAct(*pActData);
OUString sDownEntry( pImagesLst->GetEntry(nActPos + 1) );
@@ -559,7 +559,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, RemoveHdl)
IMPL_LINK_NOARG(SdPhotoAlbumDialog, SelectHdl)
{
- OUString* pData = (OUString*) pImagesLst->GetEntryData(pImagesLst->GetSelectEntryPos());
+ OUString* pData = (OUString*) pImagesLst->GetSelectEntryData();
OUString sImgUrl = pData ? OUString(*pData) : "";
if (sImgUrl != SD_RESSTR(STR_PHOTO_ALBUM_TEXTBOX))
diff --git a/sd/source/ui/dlg/headerfooterdlg.cxx b/sd/source/ui/dlg/headerfooterdlg.cxx
index 2d402c682114..8b59c3559f8d 100644
--- a/sd/source/ui/dlg/headerfooterdlg.cxx
+++ b/sd/source/ui/dlg/headerfooterdlg.cxx
@@ -455,7 +455,7 @@ HeaderFooterTabPage::~HeaderFooterTabPage()
IMPL_LINK_NOARG(HeaderFooterTabPage, LanguageChangeHdl)
{
- FillFormatList( (int)reinterpret_cast<sal_IntPtr>(mpCBDateTimeFormat->GetEntryData( mpCBDateTimeFormat->GetSelectEntryPos() )) );
+ FillFormatList( (int)reinterpret_cast<sal_IntPtr>(mpCBDateTimeFormat->GetSelectEntryData()) );
return 0L;
}
@@ -531,7 +531,7 @@ void HeaderFooterTabPage::getData( HeaderFooterSettings& rSettings, bool& rNotOn
rSettings.maHeaderText = mpTBHeader->GetText();
if( mpCBDateTimeFormat->GetSelectEntryCount() == 1 )
- rSettings.meDateTimeFormat = (int)reinterpret_cast<sal_IntPtr>(mpCBDateTimeFormat->GetEntryData( mpCBDateTimeFormat->GetSelectEntryPos() ));
+ rSettings.meDateTimeFormat = (int)reinterpret_cast<sal_IntPtr>(mpCBDateTimeFormat->GetSelectEntryData());
LanguageType eLanguage = mpCBDateTimeLanguage->GetSelectLanguage();
if( eLanguage != meOldLanguage )