diff options
42 files changed, 83 insertions, 94 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(); diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 85e49f637b09..0ce111ffdce0 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -201,7 +201,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, if( Dialog::Execute() == RET_OK ) { - nSelFormat = reinterpret_cast<sal_uLong>(ObjectLB().GetEntryData( ObjectLB().GetSelectEntryPos() )); + nSelFormat = reinterpret_cast<sal_uLong>(ObjectLB().GetSelectEntryData()); } return nSelFormat; 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<sal_IntPtr>(m_pUserInterfaceLB->GetEntryData(m_pUserInterfaceLB->GetSelectEntryPos())); + sal_Int32 d = (sal_Int32)reinterpret_cast<sal_IntPtr>(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( diff --git a/cui/source/options/optopencl.cxx b/cui/source/options/optopencl.cxx index cbc8a38cf2ab..9910d962566b 100644 --- a/cui/source/options/optopencl.cxx +++ b/cui/source/options/optopencl.cxx @@ -247,7 +247,7 @@ IMPL_LINK(ListEntryDialog, OSSelectHdl, ListBox*, pListBox) if (mpOS->GetSelectEntryPos() == 0) maEntry.maOS.clear(); else - maEntry.maOS = mpOS->GetEntry(mpOS->GetSelectEntryPos()); + maEntry.maOS = mpOS->GetSelectEntry(); } return 0; diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx index 465be9c6f59c..bbecdaab6ef9 100644 --- a/cui/source/options/optsave.cxx +++ b/cui/source/options/optsave.cxx @@ -251,7 +251,7 @@ bool SfxSaveTabPage::FillItemSet( SfxItemSet* rSet ) if ( aODFVersionLB->IsValueChangedFromSaved() ) { - sal_IntPtr nVersion = sal_IntPtr( aODFVersionLB->GetEntryData( aODFVersionLB->GetSelectEntryPos() ) ); + sal_IntPtr nVersion = sal_IntPtr( aODFVersionLB->GetSelectEntryData() ); aSaveOpt.SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion( nVersion ) ); } @@ -607,7 +607,7 @@ IMPL_LINK( SfxSaveTabPage, FilterHdl_Impl, ListBox *, pBox ) IMPL_LINK_NOARG(SfxSaveTabPage, ODFVersionHdl_Impl) { - sal_IntPtr nVersion = sal_IntPtr( aODFVersionLB->GetEntryData( aODFVersionLB->GetSelectEntryPos() ) ); + sal_IntPtr nVersion = sal_IntPtr( aODFVersionLB->GetSelectEntryData() ); bool bShown = SvtSaveOptions::ODFDefaultVersion( nVersion ) != SvtSaveOptions::ODFVER_LATEST; if ( bShown ) { @@ -623,7 +623,7 @@ IMPL_LINK_NOARG(SfxSaveTabPage, ODFVersionHdl_Impl) } bShown = !bHasODFFormat - || ( aSaveAsLB->GetEntryData( aSaveAsLB->GetSelectEntryPos() ) != NULL ); + || ( aSaveAsLB->GetSelectEntryData() != NULL ); } aODFWarningFI->Show( bShown ); diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index a764095e5a13..a04040670717 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -134,7 +134,7 @@ static void lcl_SetTransparency(SvxBrushItem& rBrush, long nTransparency) /// Returns the fill style of the currently selected entry. static drawing::FillStyle lcl_getFillStyle(ListBox* pLbSelect) { - return (drawing::FillStyle)reinterpret_cast<sal_uLong>(pLbSelect->GetEntryData(pLbSelect->GetSelectEntryPos())); + return (drawing::FillStyle)reinterpret_cast<sal_uLong>(pLbSelect->GetSelectEntryData()); } // Selects the entry matching the specified fill style. diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 71f90f564e1f..d472852270cb 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1713,7 +1713,7 @@ IMPL_LINK( SvxNumOptionsTabPage, NumberTypeSelectHdl_Impl, ListBox *, pBox ) { SvxNumberFormat aNumFmt(pActNum->GetLevel(i)); // PAGEDESC does not exist - sal_uInt16 nNumType = (sal_uInt16)reinterpret_cast<sal_uLong>(pBox->GetEntryData(pBox->GetSelectEntryPos())); + sal_uInt16 nNumType = (sal_uInt16)reinterpret_cast<sal_uLong>(pBox->GetSelectEntryData()); aNumFmt.SetNumberingType((sal_Int16)nNumType); sal_uInt16 nNumberingType = aNumFmt.GetNumberingType(); if(SVX_NUM_BITMAP == (nNumberingType&(~LINK_TOKEN))) diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index e9a451625c8f..bb26490ee9fb 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -1281,7 +1281,7 @@ IMPL_LINK( SvxSwPosSizeTabPage, PosHdl, ListBox *, pLB ) { if (pRelLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) - nRel = ((RelationMap *)pRelLB->GetEntryData(pRelLB->GetSelectEntryPos()))->nRelation; + nRel = ((RelationMap *)pRelLB->GetSelectEntryData())->nRelation; FillRelLB(pMap, nMapPos, nAlign, nRel, *pRelLB, *pRelFT); } @@ -1406,7 +1406,7 @@ short SvxSwPosSizeTabPage::GetAlignment(FrmMap *pMap, sal_uInt16 nMapPos, ListBo { if (rRelationLB.GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) { - sal_uLong nRel = ((RelationMap *)rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()))->nLBRelation; + sal_uLong nRel = ((RelationMap *)rRelationLB.GetSelectEntryData())->nLBRelation; std::size_t nMapCount = ::lcl_GetFrmMapCount(pMap); SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 01420bf6d7ca..5a66653d400e 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -1139,7 +1139,7 @@ IMPL_LINK_NOARG(UpdateDialog, selectionHandler) { OUStringBuffer b; UpdateDialog::Index const * p = static_cast< UpdateDialog::Index const * >( - m_pUpdates->GetEntryData(m_pUpdates->GetSelectEntryPos())); + m_pUpdates->GetSelectEntryData()); clearDescription(); if ( p != NULL ) diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx index fdd481c87331..5a9817164ca0 100644 --- a/extensions/source/dbpilots/commonpagesdbp.cxx +++ b/extensions/source/dbpilots/commonpagesdbp.cxx @@ -164,7 +164,7 @@ namespace dbp rContext.xForm->setPropertyValue("DataSourceName", makeAny( sDataSource ) ); } OUString sCommand = m_pTable->GetSelectEntry(); - sal_Int32 nCommandType = reinterpret_cast< sal_IntPtr >( m_pTable->GetEntryData( m_pTable->GetSelectEntryPos() ) ); + sal_Int32 nCommandType = reinterpret_cast< sal_IntPtr >( m_pTable->GetSelectEntryData() ); rContext.xForm->setPropertyValue("Command", makeAny( sCommand ) ); rContext.xForm->setPropertyValue("CommandType", makeAny( nCommandType ) ); diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index f835d7ae0f6b..6767c5434253 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -1518,7 +1518,7 @@ ImplErrorDialog::~ImplErrorDialog() IMPL_LINK_NOARG(ImplErrorDialog, SelectHdl) { - OUString* pStr = reinterpret_cast<OUString*>(m_pErrors->GetEntryData( m_pErrors->GetSelectEntryPos() )); + OUString* pStr = reinterpret_cast<OUString*>(m_pErrors->GetSelectEntryData()); m_pExplanation->SetText( pStr ? *pStr : OUString() ); return 0; } diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx index db2987c401ac..2af75e6cb7b1 100644 --- a/fpicker/source/office/iodlgimp.hxx +++ b/fpicker/source/office/iodlgimp.hxx @@ -244,7 +244,7 @@ inline void SvtExpFileDlg_Impl::SetNoFilterListSelection( ) inline SvtFileDialogFilter_Impl* SvtExpFileDlg_Impl::GetSelectedFilterEntry( OUString& _rDisplayName ) const { _rDisplayName = _pLbFilter->GetSelectEntry(); - return static_cast< SvtFileDialogFilter_Impl* >( _pLbFilter->GetEntryData ( _pLbFilter->GetSelectEntryPos() ) ); + return static_cast< SvtFileDialogFilter_Impl* >( _pLbFilter->GetSelectEntryData () ); } inline bool SvtExpFileDlg_Impl::IsFilterListTravelSelect() const diff --git a/include/svx/checklbx.hxx b/include/svx/checklbx.hxx index a709487f1a56..eb587db0924f 100644 --- a/include/svx/checklbx.hxx +++ b/include/svx/checklbx.hxx @@ -56,6 +56,7 @@ public: void SelectEntryPos ( sal_uLong nPos, bool bSelect = true ); sal_uLong GetSelectEntryPos () const; + void* GetSelectEntryData () const { return GetEntryData(GetSelectEntryPos()); } OUString GetText ( sal_uLong nPos ) const; sal_uLong GetCheckedEntryCount() const; diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx index 2da1f1b1e2c8..c7a8cef99851 100644 --- a/include/vcl/combobox.hxx +++ b/include/vcl/combobox.hxx @@ -193,6 +193,7 @@ public: sal_Int32 GetSelectEntryCount() const; sal_Int32 GetSelectEntryPos( sal_Int32 nSelIndex = 0 ) const; + OUString GetSelectEntry() const { return GetEntry( GetSelectEntryPos() ); } bool IsEntryPosSelected( sal_Int32 nPos ) const; void SelectEntryPos( sal_Int32 nPos, bool bSelect = true ); void SetNoSelection(); diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index 621b571c224a..29d219920844 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -143,6 +143,7 @@ public: void SetEntryData( sal_Int32 nPos, void* pNewData ); void* GetEntryData( sal_Int32 nPos ) const; + void* GetSelectEntryData() const { return GetEntryData(GetSelectEntryPos()); } /** this methods stores a combination of flags from the LISTBOX_ENTRY_FLAG_* defines at the given entry. 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() ) 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 ) diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 9cd3947bec1a..e5f2ab135b42 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1071,7 +1071,7 @@ void SearchTabPage_Impl::SetDoubleClickHdl( const Link& rLink ) OUString SearchTabPage_Impl::GetSelectEntry() const { OUString aRet; - OUString* pData = reinterpret_cast<OUString*>(m_pResultsLB->GetEntryData( m_pResultsLB->GetSelectEntryPos() )); + OUString* pData = reinterpret_cast<OUString*>(m_pResultsLB->GetSelectEntryData()); if ( pData ) aRet = *pData; return aRet; @@ -1298,7 +1298,7 @@ void BookmarksTabPage_Impl::SetDoubleClickHdl( const Link& rLink ) OUString BookmarksTabPage_Impl::GetSelectEntry() const { OUString aRet; - OUString* pData = reinterpret_cast<OUString*>(m_pBookmarksBox->GetEntryData(m_pBookmarksBox->GetSelectEntryPos())); + OUString* pData = reinterpret_cast<OUString*>(m_pBookmarksBox->GetSelectEntryData()); if ( pData ) aRet = *pData; return aRet; @@ -1540,7 +1540,7 @@ IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, InitHdl) IMPL_LINK_NOARG(SfxHelpIndexWindow_Impl, SelectFactoryHdl) { - OUString* pFactory = reinterpret_cast<OUString*>(m_pActiveLB->GetEntryData( m_pActiveLB->GetSelectEntryPos() )); + OUString* pFactory = reinterpret_cast<OUString*>(m_pActiveLB->GetSelectEntryData()); if ( pFactory ) { SetFactory( OUString( *pFactory ).toAsciiLowerCase(), false ); diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 487dab7552ad..13b92e2ff3d2 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1433,7 +1433,7 @@ CustomPropertiesWindow::~CustomPropertiesWindow() IMPL_LINK( CustomPropertiesWindow, TypeHdl, CustomPropertiesTypeBox*, pBox ) { - long nType = reinterpret_cast<long>( pBox->GetEntryData( pBox->GetSelectEntryPos() ) ); + long nType = reinterpret_cast<long>( pBox->GetSelectEntryData() ); CustomPropertyLine* pLine = pBox->GetLine(); pLine->m_aValueEdit.Show( (CUSTOM_TYPE_TEXT == nType) || (CUSTOM_TYPE_NUMBER == nType) ); pLine->m_aDateField.Show( (CUSTOM_TYPE_DATE == nType) || (CUSTOM_TYPE_DATETIME == nType) ); @@ -1539,7 +1539,7 @@ bool CustomPropertiesWindow::IsLineValid( CustomPropertyLine* pLine ) const bool bIsValid = true; pLine->m_bTypeLostFocus = false; long nType = reinterpret_cast<long>( - pLine->m_aTypeBox.GetEntryData( pLine->m_aTypeBox.GetSelectEntryPos() ) ); + pLine->m_aTypeBox.GetSelectEntryData() ); OUString sValue = pLine->m_aValueEdit.GetText(); if ( sValue.isEmpty() ) return true; @@ -1891,7 +1891,7 @@ Sequence< beans::PropertyValue > CustomPropertiesWindow::GetCustomProperties() c { aPropertiesSeq[i].Name = sPropertyName; long nType = reinterpret_cast<long>( - pLine->m_aTypeBox.GetEntryData( pLine->m_aTypeBox.GetSelectEntryPos() ) ); + pLine->m_aTypeBox.GetSelectEntryData() ); if ( CUSTOM_TYPE_NUMBER == nType ) { double nValue = 0; diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index 86eb2c65e6c4..fbd63402f0d8 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -210,7 +210,7 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu } } - m_pReduceBitmapsResolutionLB->SetText( m_pReduceBitmapsResolutionLB->GetEntry( m_pReduceBitmapsResolutionLB->GetSelectEntryPos() ) ); + m_pReduceBitmapsResolutionLB->SetText( m_pReduceBitmapsResolutionLB->GetSelectEntry() ); m_pReduceBitmapsTransparencyCB->Check( pCurrentOptions->IsReducedBitmapIncludesTransparency() ); m_pConvertToGreyscalesCB->Check( pCurrentOptions->IsConvertToGreyscales() ); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index c4cb82ac7a32..0b91a6385a21 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -621,7 +621,7 @@ IMPL_LINK_NOARG(SvxRubyDialog, CharStyleHdl_Impl) AssertOneEntry(); OUString sStyleName; if(LISTBOX_ENTRY_NOTFOUND != m_pCharStyleLB->GetSelectEntryPos()) - sStyleName = *(OUString*) m_pCharStyleLB->GetEntryData(m_pCharStyleLB->GetSelectEntryPos()); + sStyleName = *(OUString*) m_pCharStyleLB->GetSelectEntryData(); Sequence<PropertyValues>& aRubyValues = pImpl->GetRubyValues(); for(sal_Int32 nRuby = 0; nRuby < aRubyValues.getLength(); nRuby++) { diff --git a/svx/source/gallery2/galbrws1.hxx b/svx/source/gallery2/galbrws1.hxx index 1751586f9505..ce391f0d170a 100644 --- a/svx/source/gallery2/galbrws1.hxx +++ b/svx/source/gallery2/galbrws1.hxx @@ -130,7 +130,7 @@ public: void SelectTheme( const OUString& rThemeName ) { mpThemes->SelectEntry( rThemeName ); SelectThemeHdl( NULL ); } void SelectTheme( sal_uIntPtr nThemePos ) { mpThemes->SelectEntryPos( (sal_uInt16) nThemePos ); SelectThemeHdl( NULL ); } - OUString GetSelectedTheme() { return mpThemes->GetEntryCount() ? mpThemes->GetEntry( mpThemes->GetSelectEntryPos() ) : OUString(); } + OUString GetSelectedTheme() { return mpThemes->GetEntryCount() ? mpThemes->GetSelectEntry() : OUString(); } void ShowContextMenu(); bool KeyInput( const KeyEvent& rKEvt, vcl::Window* pWindow ); diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index e99190ce81a2..57a960290645 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -348,7 +348,7 @@ void SvxStyleBox_Impl::ReleaseFocus() IMPL_LINK( SvxStyleBox_Impl, MenuSelectHdl, Menu*, pMenu) { - OUString sEntry = OUString( (GetEntry(GetSelectEntryPos())) ); + OUString sEntry = OUString( GetSelectEntry() ); ReleaseFocus(); // It must be after getting entry pos! Sequence< PropertyValue > aArgs( 2 ); aArgs[0].Name = "Param"; diff --git a/sw/source/ui/config/optload.cxx b/sw/source/ui/config/optload.cxx index b665e824ff5d..7915bc90efb2 100644 --- a/sw/source/ui/config/optload.cxx +++ b/sw/source/ui/config/optload.cxx @@ -760,7 +760,7 @@ void SwCaptionOptPage::SaveEntry(SvTreeListEntry* pEntry) pOpt->SetCategory(""); else pOpt->SetCategory(comphelper::string::strip(aName, ' ')); - pOpt->SetNumType((sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatBox->GetEntryData(m_pFormatBox->GetSelectEntryPos()))); + pOpt->SetNumType((sal_uInt16)reinterpret_cast<sal_uLong>(m_pFormatBox->GetSelectEntryData())); pOpt->SetCaption(m_pTextEdit->IsEnabled() ? m_pTextEdit->GetText() : OUString() ); pOpt->SetPos(m_pPosBox->GetSelectEntryPos()); sal_Int32 nPos = m_pLbLevel->GetSelectEntryPos(); diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 4f20503a5105..691ada28fdc6 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -445,7 +445,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton) OUString sAttach( m_sDefaultAttachmentST ); sAttach += "."; sAttach += lcl_GetExtensionForDocType( - reinterpret_cast<sal_uLong>(m_pSendAsLB->GetEntryData(m_pSendAsLB->GetSelectEntryPos()))); + reinterpret_cast<sal_uLong>(m_pSendAsLB->GetSelectEntryData())); m_pAttachmentED->SetText( sAttach ); } @@ -890,7 +890,7 @@ IMPL_LINK(SwMailMergeOutputPage, PrinterSetupHdl_Impl, PushButton*, pButton) IMPL_LINK(SwMailMergeOutputPage, SendTypeHdl_Impl, ListBox*, pBox) { - sal_uLong nDocType = reinterpret_cast<sal_uLong>(pBox->GetEntryData(pBox->GetSelectEntryPos())); + sal_uLong nDocType = reinterpret_cast<sal_uLong>(pBox->GetSelectEntryData()); bool bEnable = MM_DOCTYPE_HTML != nDocType && MM_DOCTYPE_TEXT != nDocType; m_pSendAsPB->Enable( bEnable ); m_pAttachmentGroup->Enable( bEnable ); @@ -970,7 +970,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) rtl_TextEncoding eEncoding = ::osl_getThreadTextEncoding(); SfxFilterContainer* pFilterContainer = SwDocShell::Factory().GetFilterContainer(); const SfxFilter *pSfxFlt = 0; - sal_uLong nDocType = reinterpret_cast<sal_uLong>(m_pSendAsLB->GetEntryData(m_pSendAsLB->GetSelectEntryPos())); + sal_uLong nDocType = reinterpret_cast<sal_uLong>(m_pSendAsLB->GetSelectEntryData()); OUString sExtension = lcl_GetExtensionForDocType(nDocType); switch( nDocType ) { @@ -1060,7 +1060,7 @@ IMPL_LINK(SwMailMergeOutputPage, SendDocumentsHdl_Impl, PushButton*, pButton) ++nTokenCount; } sAttach = comphelper::string::setToken(sAttach, nTokenCount - 1, '.', lcl_GetExtensionForDocType( - reinterpret_cast<sal_uLong>(m_pSendAsLB->GetEntryData(m_pSendAsLB->GetSelectEntryPos())))); + reinterpret_cast<sal_uLong>(m_pSendAsLB->GetSelectEntryData()))); m_pAttachmentED->SetText(sAttach); } else diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 6747f745cfe8..9369b79660b1 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -254,7 +254,7 @@ IMPL_LINK_NOARG(SwEnvPage, FieldHdl) { OUString aStr("<" + m_pDatabaseLB->GetSelectEntry() + "." + m_pTableLB->GetSelectEntry() + "." + - OUString(m_pTableLB->GetEntryData(m_pTableLB->GetSelectEntryPos()) == 0 ? '0' : '1') + "." + + OUString(m_pTableLB->GetSelectEntryData() == 0 ? '0' : '1') + "." + m_pDBFieldLB->GetSelectEntry() + ">"); m_pAddrEdit->ReplaceSelected(aStr); Selection aSel = m_pAddrEdit->GetSelection(); diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx index f217acdb2d6d..98bdf99e7757 100644 --- a/sw/source/ui/envelp/label1.cxx +++ b/sw/source/ui/envelp/label1.cxx @@ -326,7 +326,7 @@ IMPL_LINK_NOARG(SwLabPage, FieldHdl) { OUString aStr("<" + m_pDatabaseLB->GetSelectEntry() + "." + m_pTableLB->GetSelectEntry() + "." + - (m_pTableLB->GetEntryData(m_pTableLB->GetSelectEntryPos()) == 0 ? OUString("0") : OUString("1")) + "." + + (m_pTableLB->GetSelectEntryData() == 0 ? OUString("0") : OUString("1")) + "." + m_pDBFieldLB->GetSelectEntry() + ">"); m_pWritingEdit->ReplaceSelected(aStr); Selection aSel = m_pWritingEdit->GetSelection(); @@ -614,8 +614,7 @@ int SwVisitingCardPage::DeactivatePage(SfxItemSet* _pSet) bool SwVisitingCardPage::FillItemSet(SfxItemSet* rSet) { - const OUString* pGroup = (const OUString*)m_pAutoTextGroupLB->GetEntryData( - m_pAutoTextGroupLB->GetSelectEntryPos()); + const OUString* pGroup = (const OUString*)m_pAutoTextGroupLB->GetSelectEntryData(); OSL_ENSURE(pGroup, "no group selected?"); if (pGroup) diff --git a/sw/source/ui/envelp/labelexp.cxx b/sw/source/ui/envelp/labelexp.cxx index ba14f0e17ae6..0babacb2b69c 100644 --- a/sw/source/ui/envelp/labelexp.cxx +++ b/sw/source/ui/envelp/labelexp.cxx @@ -79,7 +79,7 @@ void SwVisitingCardPage::InitFrameControl() if(LISTBOX_ENTRY_NOTFOUND == m_pAutoTextGroupLB->GetSelectEntryPos()) m_pAutoTextGroupLB->SelectEntryPos(0); const OUString *pCurGroupName( - (const OUString*)m_pAutoTextGroupLB->GetEntryData(m_pAutoTextGroupLB->GetSelectEntryPos())); + (const OUString*)m_pAutoTextGroupLB->GetSelectEntryData()); if(m_xAutoText->hasByName(*pCurGroupName)) { uno::Any aGroup = m_xAutoText->getByName(*pCurGroupName); @@ -112,8 +112,7 @@ IMPL_LINK_NOARG(SwVisitingCardPage, FrameControlInitializedHdl) if(LISTBOX_ENTRY_NOTFOUND != m_pAutoTextGroupLB->GetSelectEntryPos()) { - const OUString *pGroup( (const OUString*)m_pAutoTextGroupLB->GetEntryData( - m_pAutoTextGroupLB->GetSelectEntryPos() ) ); + const OUString *pGroup( (const OUString*)m_pAutoTextGroupLB->GetSelectEntryData() ); uno::Any aGroup = m_xAutoText->getByName(*pGroup); uno::Reference< text::XAutoTextGroup > xGroup; aGroup >>= xGroup; @@ -140,8 +139,7 @@ IMPL_LINK( SwVisitingCardPage, AutoTextSelectHdl, void*, pBox ) { if (m_pAutoTextGroupLB == pBox) { - const OUString *pGroup( (const OUString*)m_pAutoTextGroupLB->GetEntryData( - m_pAutoTextGroupLB->GetSelectEntryPos())); + const OUString *pGroup( (const OUString*)m_pAutoTextGroupLB->GetSelectEntryData()); uno::Any aGroup = m_xAutoText->getByName(*pGroup); uno::Reference< text::XAutoTextGroup > xGroup; aGroup >>= xGroup; diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 9adfbb84a758..aa5918d3f446 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -518,7 +518,7 @@ bool SwMailMergeDlg::ExecQryShell() pMgr->SetEMailColumn(m_pColumnLB->GetSelectEntry()); pModOpt->SetNameFromColumn(m_pColumnLB->GetSelectEntry()); if( m_pFilterLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) - m_sSaveFilter = *static_cast<const OUString*>(m_pFilterLB->GetEntryData( m_pFilterLB->GetSelectEntryPos() )); + m_sSaveFilter = *static_cast<const OUString*>(m_pFilterLB->GetSelectEntryData()); } else { diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 5a94ba40d538..661227bb543b 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -249,7 +249,7 @@ IMPL_LINK(SwColumnDlg, ObjectHdl, ListBox*, pBox) { pTabPage->FillItemSet(pSet); } - nOldSelection = reinterpret_cast<sal_IntPtr>(m_pApplyToLB->GetEntryData(m_pApplyToLB->GetSelectEntryPos())); + nOldSelection = reinterpret_cast<sal_IntPtr>(m_pApplyToLB->GetSelectEntryData()); long nWidth = nSelectionWidth; switch(nOldSelection) { diff --git a/sw/source/ui/frmdlg/cption.cxx b/sw/source/ui/frmdlg/cption.cxx index ff754b6af4d9..22709debcdce 100644 --- a/sw/source/ui/frmdlg/cption.cxx +++ b/sw/source/ui/frmdlg/cption.cxx @@ -268,7 +268,7 @@ void SwCaptionDialog::Apply() aOpt.SetCategory(comphelper::string::strip(aName, ' ')); aOpt.SetNumSeparator( m_pNumberingSeparatorED->GetText() ); } - aOpt.SetNumType( (sal_uInt16)reinterpret_cast<sal_uIntPtr>(m_pFormatBox->GetEntryData( m_pFormatBox->GetSelectEntryPos() )) ); + aOpt.SetNumType( (sal_uInt16)reinterpret_cast<sal_uIntPtr>(m_pFormatBox->GetSelectEntryData()) ); aOpt.SetSeparator( m_pSepEdit->IsEnabled() ? m_pSepEdit->GetText() : OUString() ); aOpt.SetCaption( m_pTextEdit->GetText() ); aOpt.SetPos( m_pPosBox->GetSelectEntryPos() ); @@ -354,8 +354,7 @@ void SwCaptionDialog::DrawSample() bool bNone = sFldTypeName == m_sNone; if( !bNone ) { - const sal_uInt16 nNumFmt = (sal_uInt16)reinterpret_cast<sal_uIntPtr>(m_pFormatBox->GetEntryData( - m_pFormatBox->GetSelectEntryPos() )); + const sal_uInt16 nNumFmt = (sal_uInt16)reinterpret_cast<sal_uIntPtr>(m_pFormatBox->GetSelectEntryData()); if( SVX_NUM_NUMBER_NONE != nNumFmt ) { // category diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index f989dc8b1398..6ad97d55d97a 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -1619,7 +1619,7 @@ sal_Int16 SwFrmPage::GetAlignment(FrmMap *pMap, sal_Int32 nMapPos, return 0; const RelationMap *const pRelationMap = (const RelationMap *const ) - rRelationLB.GetEntryData(rRelationLB.GetSelectEntryPos()); + rRelationLB.GetSelectEntryData(); const sal_uLong nRel = pRelationMap->nLBRelation; const SvxSwFramePosString::StringId eStrId = pMap[nMapPos].eStrId; @@ -1937,7 +1937,7 @@ IMPL_LINK( SwFrmPage, PosHdl, ListBox *, pLB ) { if (pRelLB->GetSelectEntryPos() != LISTBOX_ENTRY_NOTFOUND) - nRel = ((RelationMap *)pRelLB->GetEntryData(pRelLB->GetSelectEntryPos()))->nRelation; + nRel = ((RelationMap *)pRelLB->GetSelectEntryData())->nRelation; FillRelLB(pMap, nMapPos, nAlign, nRel, *pRelLB, *pRelFT); } diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index b1db99a296c8..6675da9ccd6f 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1184,8 +1184,7 @@ void SwTOXSelectTabPage::FillTOXDescription() rDesc.SetStyleNames(aStyleArr[i], i); rDesc.SetLanguage(m_pLanguageLB->GetSelectLanguage()); - const OUString* pEntryData = (const OUString*)m_pSortAlgorithmLB->GetEntryData( - m_pSortAlgorithmLB->GetSelectEntryPos() ); + const OUString* pEntryData = (const OUString*)m_pSortAlgorithmLB->GetSelectEntryData(); OSL_ENSURE(pEntryData, "no entry data available"); if(pEntryData) rDesc.SetSortAlgorithm(*pEntryData); @@ -1241,7 +1240,7 @@ int SwTOXSelectTabPage::DeactivatePage( SfxItemSet* _pSet ) { if(_pSet) _pSet->Put(SfxUInt16Item(FN_PARAM_TOX_TYPE, - (sal_uInt16)reinterpret_cast<sal_IntPtr>(m_pTypeLB->GetEntryData( m_pTypeLB->GetSelectEntryPos() )))); + (sal_uInt16)reinterpret_cast<sal_IntPtr>(m_pTypeLB->GetSelectEntryData()))); FillTOXDescription(); return LEAVE_PAGE; } @@ -1255,7 +1254,7 @@ IMPL_LINK(SwTOXSelectTabPage, TOXTypeHdl, ListBox*, pBox) { SwMultiTOXTabDialog* pTOXDlg = static_cast<SwMultiTOXTabDialog*>(GetTabDialog()); const sal_uInt16 nType = sal::static_int_cast< sal_uInt16 >(reinterpret_cast< sal_uIntPtr >( - pBox->GetEntryData( pBox->GetSelectEntryPos() ))); + pBox->GetSelectEntryData())); CurTOXType eCurType = lcl_UserData2TOXTypes(nType); pTOXDlg->SetCurrentTOXType(eCurType); @@ -1379,7 +1378,7 @@ IMPL_LINK(SwTOXSelectTabPage, LanguageHdl, ListBox*, pBox) OUString sOldString; void* pUserData; - if( 0 != (pUserData = m_pSortAlgorithmLB->GetEntryData( m_pSortAlgorithmLB->GetSelectEntryPos())) ) + if( 0 != (pUserData = m_pSortAlgorithmLB->GetSelectEntryData()) ) sOldString = *(OUString*)pUserData; sal_Int32 nEnd = m_pSortAlgorithmLB->GetEntryCount(); for( sal_Int32 n = 0; n < nEnd; ++n ) @@ -2051,14 +2050,11 @@ void SwTOXEntryTabPage::UpdateDescriptor() { rDesc.SetSortByDocument(m_pSortDocPosRB->IsChecked()); SwTOXSortKey aKey1, aKey2, aKey3; - aKey1.eField = (ToxAuthorityField)reinterpret_cast<sal_uIntPtr>(m_pFirstKeyLB->GetEntryData( - m_pFirstKeyLB->GetSelectEntryPos())); + aKey1.eField = (ToxAuthorityField)reinterpret_cast<sal_uIntPtr>(m_pFirstKeyLB->GetSelectEntryData()); aKey1.bSortAscending = m_pFirstSortUpRB->IsChecked(); - aKey2.eField = (ToxAuthorityField)reinterpret_cast<sal_uIntPtr>(m_pSecondKeyLB->GetEntryData( - m_pSecondKeyLB->GetSelectEntryPos())); + aKey2.eField = (ToxAuthorityField)reinterpret_cast<sal_uIntPtr>(m_pSecondKeyLB->GetSelectEntryData()); aKey2.bSortAscending = m_pSecondSortUpRB->IsChecked(); - aKey3.eField = (ToxAuthorityField)reinterpret_cast<sal_uIntPtr>(m_pThirdKeyLB->GetEntryData( - m_pThirdKeyLB->GetSelectEntryPos())); + aKey3.eField = (ToxAuthorityField)reinterpret_cast<sal_uIntPtr>(m_pThirdKeyLB->GetSelectEntryData()); aKey3.bSortAscending = m_pThirdSortUpRB->IsChecked(); rDesc.SetSortKeys(aKey1, aKey2, aKey3); @@ -2413,7 +2409,7 @@ IMPL_LINK(SwTOXEntryTabPage, TokenSelectedHdl, SwFormToken*, pToken) IMPL_LINK(SwTOXEntryTabPage, StyleSelectHdl, ListBox*, pBox) { OUString sEntry = pBox->GetSelectEntry(); - const sal_uInt16 nId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(pBox->GetEntryData(pBox->GetSelectEntryPos())); + const sal_uInt16 nId = (sal_uInt16)reinterpret_cast<sal_IntPtr>(pBox->GetSelectEntryData()); const bool bEqualsNoCharStyle = sEntry == sNoCharStyle; m_pEditStylePB->Enable(!bEqualsNoCharStyle); if (bEqualsNoCharStyle) 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 ); diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index 0fa0a4dfa491..0a0bd7e9c64d 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -1414,7 +1414,7 @@ bool SwTextFlowPage::FillItemSet( SfxItemSet* rSet ) { bModified |= 0 != rSet->Put( SvxFrameDirectionItem( - (SvxFrameDirection)reinterpret_cast<sal_uLong>(m_pTextDirectionLB->GetEntryData(m_pTextDirectionLB->GetSelectEntryPos())) + (SvxFrameDirection)reinterpret_cast<sal_uLong>(m_pTextDirectionLB->GetSelectEntryData()) , FN_TABLE_BOX_TEXTORIENTATION)); } diff --git a/vcl/generic/print/prtsetup.cxx b/vcl/generic/print/prtsetup.cxx index 7118850236b1..a2e5255a64fe 100644 --- a/vcl/generic/print/prtsetup.cxx +++ b/vcl/generic/print/prtsetup.cxx @@ -260,8 +260,7 @@ IMPL_LINK( RTSPaperPage, SelectHdl, ListBox*, pBox ) } if( pKey ) { - PPDValue* pValue = - (PPDValue*)pBox->GetEntryData( pBox->GetSelectEntryPos() ); + PPDValue* pValue = (PPDValue*)pBox->GetSelectEntryData(); m_pParent->m_aJobData.m_aContext.setValue( pKey, pValue ); update(); } @@ -390,7 +389,7 @@ sal_uLong RTSDevicePage::getColorDevice() sal_uLong RTSDevicePage::getLevel() { - sal_uLong nLevel = reinterpret_cast<sal_uLong>(m_pLevelBox->GetEntryData( m_pLevelBox->GetSelectEntryPos() )); + sal_uLong nLevel = reinterpret_cast<sal_uLong>(m_pLevelBox->GetSelectEntryData()); if (nLevel == 0) return 0; //automatic return nLevel < 10 ? nLevel-1 : 0; @@ -398,7 +397,7 @@ sal_uLong RTSDevicePage::getLevel() sal_uLong RTSDevicePage::getPDFDevice() { - sal_uLong nLevel = reinterpret_cast<sal_uLong>(m_pLevelBox->GetEntryData( m_pLevelBox->GetSelectEntryPos() )); + sal_uLong nLevel = reinterpret_cast<sal_uLong>(m_pLevelBox->GetSelectEntryData()); if (nLevel > 9) return 2; //explicitly PDF else if (nLevel == 0) @@ -419,13 +418,13 @@ IMPL_LINK( RTSDevicePage, SelectHdl, ListBox*, pBox ) { if( pBox == m_pPPDKeyBox ) { - const PPDKey* pKey = (PPDKey*)m_pPPDKeyBox->GetEntryData( m_pPPDKeyBox->GetSelectEntryPos() ); + const PPDKey* pKey = (PPDKey*)m_pPPDKeyBox->GetSelectEntryData(); FillValueBox( pKey ); } else if( pBox == m_pPPDValueBox ) { - const PPDKey* pKey = (PPDKey*)m_pPPDKeyBox->GetEntryData( m_pPPDKeyBox->GetSelectEntryPos() ); - const PPDValue* pValue = (PPDValue*)m_pPPDValueBox->GetEntryData( m_pPPDValueBox->GetSelectEntryPos() ); + const PPDKey* pKey = (PPDKey*)m_pPPDKeyBox->GetSelectEntryData(); + const PPDValue* pValue = (PPDValue*)m_pPPDValueBox->GetSelectEntryData(); if (pKey && pValue) { m_pParent->m_aJobData.m_aContext.setValue( pKey, pValue ); diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index 5cbe58569334..2b599e3ef0f4 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -1361,7 +1361,7 @@ Size PrintDialog::getJobPageSize() void PrintDialog::updateNupFromPages() { - sal_IntPtr nPages = sal_IntPtr(maNUpPage.mpNupPagesBox->GetEntryData(maNUpPage.mpNupPagesBox->GetSelectEntryPos())); + sal_IntPtr nPages = sal_IntPtr(maNUpPage.mpNupPagesBox->GetSelectEntryData()); int nRows = int(maNUpPage.mpNupRowsEdt->GetValue()); int nCols = int(maNUpPage.mpNupColEdt->GetValue()); long nPageMargin = long(maNUpPage.mpPageMarginEdt->Denormalize(maNUpPage.mpPageMarginEdt->GetValue( FUNIT_100TH_MM ))); |