From 3c99f8500f657ed84b316390d5175a6f5e56bc69 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Sun, 4 Oct 2015 15:05:38 +0200 Subject: convert Link<> to typed Change-Id: Iec15042138e0715459b2c9e872a7464d75a6b1eb Reviewed-on: https://gerrit.libreoffice.org/19305 Reviewed-by: Noel Grandin Tested-by: Noel Grandin --- .../RandomNumberGeneratorDialog.cxx | 5 +- sc/source/ui/condformat/colorformat.cxx | 10 ++- sc/source/ui/condformat/condformatdlg.cxx | 20 +++--- sc/source/ui/condformat/condformatdlgentry.cxx | 73 +++++++++------------- sc/source/ui/dbgui/PivotLayoutDialog.cxx | 7 ++- sc/source/ui/dbgui/consdlg.cxx | 13 ++-- sc/source/ui/dbgui/dapidata.cxx | 3 +- sc/source/ui/dbgui/filtdlg.cxx | 42 ++++++------- sc/source/ui/dbgui/foptmgr.cxx | 6 +- sc/source/ui/dbgui/pfiltdlg.cxx | 15 +++-- sc/source/ui/dbgui/pvfundlg.cxx | 16 +++-- sc/source/ui/dbgui/scuiasciiopt.cxx | 18 +++--- sc/source/ui/dbgui/sfiltdlg.cxx | 6 +- sc/source/ui/dbgui/tpsort.cxx | 21 +++---- sc/source/ui/dbgui/tpsubt.cxx | 13 ++-- sc/source/ui/dbgui/validate.cxx | 15 ++--- sc/source/ui/formdlg/dwfunctr.cxx | 19 +++--- sc/source/ui/inc/PivotLayoutDialog.hxx | 3 +- sc/source/ui/inc/RandomNumberGeneratorDialog.hxx | 2 +- sc/source/ui/inc/areasdlg.hxx | 6 +- sc/source/ui/inc/colorformat.hxx | 4 +- sc/source/ui/inc/condformatdlg.hxx | 6 +- sc/source/ui/inc/condformatdlgentry.hxx | 16 ++--- sc/source/ui/inc/consdlg.hxx | 2 +- sc/source/ui/inc/crnrdlg.hxx | 2 +- sc/source/ui/inc/dapidata.hxx | 2 +- sc/source/ui/inc/dwfunctr.hxx | 2 +- sc/source/ui/inc/filtdlg.hxx | 4 +- sc/source/ui/inc/foptmgr.hxx | 2 +- sc/source/ui/inc/funcpage.hxx | 4 +- sc/source/ui/inc/instbdlg.hxx | 2 +- sc/source/ui/inc/linkarea.hxx | 2 +- sc/source/ui/inc/mvtabdlg.hxx | 2 +- sc/source/ui/inc/namedlg.hxx | 2 +- sc/source/ui/inc/optsolver.hxx | 2 +- sc/source/ui/inc/pfiltdlg.hxx | 2 +- sc/source/ui/inc/pvfundlg.hxx | 4 +- sc/source/ui/inc/scuiasciiopt.hxx | 4 +- sc/source/ui/inc/scuiautofmt.hxx | 2 +- sc/source/ui/inc/scuitphfedit.hxx | 2 +- sc/source/ui/inc/solveroptions.hxx | 2 +- sc/source/ui/inc/tpsort.hxx | 6 +- sc/source/ui/inc/tpsubt.hxx | 3 +- sc/source/ui/inc/tptable.hxx | 2 +- sc/source/ui/inc/tpusrlst.hxx | 2 +- sc/source/ui/inc/tpview.hxx | 6 +- sc/source/ui/inc/validate.hxx | 7 +-- sc/source/ui/miscdlgs/crnrdlg.cxx | 10 ++- sc/source/ui/miscdlgs/instbdlg.cxx | 3 +- sc/source/ui/miscdlgs/linkarea.cxx | 3 +- sc/source/ui/miscdlgs/mvtabdlg.cxx | 8 +-- sc/source/ui/miscdlgs/optsolver.cxx | 3 +- sc/source/ui/miscdlgs/scuiautofmt.cxx | 12 ++-- sc/source/ui/miscdlgs/solveroptions.cxx | 3 +- sc/source/ui/namedlg/namedlg.cxx | 3 +- sc/source/ui/optdlg/calcoptionsdlg.cxx | 11 ++-- sc/source/ui/optdlg/calcoptionsdlg.hxx | 4 +- sc/source/ui/optdlg/tpusrlst.cxx | 18 +++--- sc/source/ui/optdlg/tpview.cxx | 21 +++---- sc/source/ui/pagedlg/areasdlg.cxx | 7 +-- sc/source/ui/pagedlg/scuitphfedit.cxx | 5 +- sc/source/ui/pagedlg/tptable.cxx | 9 +-- sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx | 10 ++- sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx | 2 +- 64 files changed, 238 insertions(+), 303 deletions(-) (limited to 'sc') diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx index fe2fbc0fcb91..72afc4fea95f 100644 --- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx @@ -129,7 +129,7 @@ void ScRandomNumberGeneratorDialog::Init() mpEnableSeed->SetToggleHdl( LINK( this, ScRandomNumberGeneratorDialog, CheckChanged )); mpEnableRounding->SetToggleHdl( LINK( this, ScRandomNumberGeneratorDialog, CheckChanged )); - DistributionChanged(NULL); + DistributionChanged(*mpDistributionCombo.get()); CheckChanged(*mpEnableSeed); } @@ -420,7 +420,7 @@ IMPL_LINK_NOARG_TYPED(ScRandomNumberGeneratorDialog, CheckChanged, CheckBox&, vo mpDecimalPlaces->Enable(mpEnableRounding->IsChecked()); } -IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged) +IMPL_LINK_NOARG_TYPED(ScRandomNumberGeneratorDialog, DistributionChanged, ListBox&, void) { sal_Int16 aSelectedIndex = mpDistributionCombo-> GetSelectEntryPos(); sal_Int64 aSelectedId = reinterpret_cast( mpDistributionCombo->GetEntryData(aSelectedIndex) ); @@ -514,7 +514,6 @@ IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, DistributionChanged) break; } } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx index e6a2cc7788d1..b3a2e2cc4e86 100644 --- a/sc/source/ui/condformat/colorformat.cxx +++ b/sc/source/ui/condformat/colorformat.cxx @@ -130,8 +130,8 @@ ScDataBarSettingsDlg::ScDataBarSettingsDlg(vcl::Window* pWindow, const ScDataBar mpLbAxisCol->SelectEntry(rData.maAxisColor); mpCbOnlyBar->Check(rData.mbOnlyBar); - TypeSelectHdl(NULL); - PosSelectHdl(NULL); + TypeSelectHdl(*mpLbTypeMin.get()); + PosSelectHdl(*mpLbTypeMin.get()); } ScDataBarSettingsDlg::~ScDataBarSettingsDlg() @@ -308,7 +308,7 @@ IMPL_LINK_NOARG_TYPED( ScDataBarSettingsDlg, OkBtnHdl, Button*, void ) } } -IMPL_LINK_NOARG( ScDataBarSettingsDlg, TypeSelectHdl ) +IMPL_LINK_NOARG_TYPED( ScDataBarSettingsDlg, TypeSelectHdl, ListBox&, void ) { sal_Int32 nSelectMin = mpLbTypeMin->GetSelectEntryPos(); if( nSelectMin <= COLORSCALE_MAX) @@ -339,10 +339,9 @@ IMPL_LINK_NOARG( ScDataBarSettingsDlg, TypeSelectHdl ) mpEdMax->SetText(OUString::number(0)); } } - return 0; } -IMPL_LINK_NOARG( ScDataBarSettingsDlg, PosSelectHdl ) +IMPL_LINK_NOARG_TYPED( ScDataBarSettingsDlg, PosSelectHdl, ListBox&, void ) { sal_Int32 axisPos = mpLbAxisPos->GetSelectEntryPos(); if(axisPos != 2 && axisPos != 1) // disable if axis vertical position is automatic @@ -360,7 +359,6 @@ IMPL_LINK_NOARG( ScDataBarSettingsDlg, PosSelectHdl ) mpLenMax->SetText(OUString::number(100)); } } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 27cc8d0a93b0..540bfdea18db 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -236,7 +236,7 @@ void ScCondFormatList::DoScroll(long nDelta) mpScrollBar->SetPosPixel(aNewPoint); } -IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox*, pBox) +IMPL_LINK_TYPED(ScCondFormatList, ColFormatTypeHdl, ListBox&, rBox, void) { EntryContainer::iterator itr = maEntries.begin(); for(; itr != maEntries.end(); ++itr) @@ -245,35 +245,35 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox*, pBox) break; } if(itr == maEntries.end()) - return 0; + return; - sal_Int32 nPos = pBox->GetSelectEntryPos(); + sal_Int32 nPos = rBox.GetSelectEntryPos(); switch(nPos) { case 0: if((*itr)->GetType() == condformat::entry::COLORSCALE2) - return 0; + return; itr->disposeAndClear(); *itr = VclPtr::Create( this, mpDoc, maPos ); break; case 1: if((*itr)->GetType() == condformat::entry::COLORSCALE3) - return 0; + return; itr->disposeAndClear(); *itr = VclPtr::Create( this, mpDoc, maPos ); break; case 2: if((*itr)->GetType() == condformat::entry::DATABAR) - return 0; + return; itr->disposeAndClear(); *itr = VclPtr::Create( this, mpDoc, maPos ); break; case 3: if((*itr)->GetType() == condformat::entry::ICONSET) - return 0; + return; itr->disposeAndClear(); *itr = VclPtr::Create( this, mpDoc, maPos ); @@ -284,17 +284,15 @@ IMPL_LINK(ScCondFormatList, ColFormatTypeHdl, ListBox*, pBox) mpDialogParent->InvalidateRefData(); (*itr)->SetActive(); RecalcAll(); - return 0; } -IMPL_LINK(ScCondFormatList, TypeListHdl, ListBox*, pBox) +IMPL_LINK_TYPED(ScCondFormatList, TypeListHdl, ListBox&, rBox, void) { //Resolves: fdo#79021 At this point we are still inside the ListBox Select. //If we call maEntries.replace here then the pBox will be deleted before it //has finished Select and will crash on accessing its deleted this. So Post //to do the real work after the Select has completed - Application::PostUserEvent(LINK(this, ScCondFormatList, AfterTypeListHdl), pBox, true); - return 0; + Application::PostUserEvent(LINK(this, ScCondFormatList, AfterTypeListHdl), &rBox, true); } IMPL_LINK_TYPED(ScCondFormatList, AfterTypeListHdl, void*, p, void) diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 46c764e5b209..db4639c0f363 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -209,7 +209,7 @@ ScConditionFrmtEntry::ScConditionFrmtEntry( vcl::Window* pParent, ScDocument* pD { OUString aStyleName = pFormatEntry->GetStyle(); maLbStyle->SelectEntry(aStyleName); - StyleSelectHdl(NULL); + StyleSelectHdl(*maLbStyle.get()); ScConditionMode eMode = pFormatEntry->GetOperation(); maLbCondType->SelectEntryPos(ConditionModeToEntryPos(eMode)); @@ -544,12 +544,11 @@ void StyleSelect( ListBox& rLbStyle, ScDocument* pDoc, SvxFontPrevWindow& rWdPre } -IMPL_LINK_NOARG(ScConditionFrmtEntry, StyleSelectHdl) +IMPL_LINK_NOARG_TYPED(ScConditionFrmtEntry, StyleSelectHdl, ListBox&, void) { mbIsInStyleCreate = true; StyleSelect( *maLbStyle.get(), mpDoc, *maWdPreview.get() ); mbIsInStyleCreate = false; - return 0; } // formula @@ -576,7 +575,7 @@ ScFormulaFrmtEntry::ScFormulaFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, maLbStyle->SelectEntryPos(1); } - StyleSelectHdl(NULL); + StyleSelectHdl(*maLbStyle.get()); } ScFormulaFrmtEntry::~ScFormulaFrmtEntry() @@ -601,11 +600,9 @@ void ScFormulaFrmtEntry::Init(ScCondFormatDlg* pDialogParent) maLbStyle->SetSelectHdl( LINK( this, ScFormulaFrmtEntry, StyleSelectHdl ) ); } -IMPL_LINK_NOARG(ScFormulaFrmtEntry, StyleSelectHdl) +IMPL_LINK_NOARG_TYPED(ScFormulaFrmtEntry, StyleSelectHdl, ListBox&, void) { StyleSelect( *maLbStyle.get(), mpDoc, *maWdPreview.get() ); - - return 0; } ScFormatEntry* ScFormulaFrmtEntry::createFormulaEntry() const @@ -770,8 +767,8 @@ ScColorScale2FrmtEntry::ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument maLbColorFormat->SetSelectHdl( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) ); - EntryTypeHdl(maLbEntryTypeMin.get()); - EntryTypeHdl(maLbEntryTypeMax.get()); + EntryTypeHdl(*maLbEntryTypeMin.get()); + EntryTypeHdl(*maLbEntryTypeMax.get()); } ScColorScale2FrmtEntry::~ScColorScale2FrmtEntry() @@ -879,19 +876,19 @@ void ScColorScale2FrmtEntry::SetInactive() Deselect(); } -IMPL_LINK( ScColorScale2FrmtEntry, EntryTypeHdl, ListBox*, pBox ) +IMPL_LINK_TYPED( ScColorScale2FrmtEntry, EntryTypeHdl, ListBox&, rBox, void ) { Edit* pEd = NULL; - if (pBox == maLbEntryTypeMin.get()) + if (&rBox == maLbEntryTypeMin.get()) pEd = maEdMin; - else if (pBox == maLbEntryTypeMax.get()) + else if (&rBox == maLbEntryTypeMax.get()) pEd = maEdMax.get(); if (!pEd) - return 0; + return; bool bEnableEdit = true; - sal_Int32 nPos = pBox->GetSelectEntryPos(); + sal_Int32 nPos = rBox.GetSelectEntryPos(); if(nPos < 2) { bEnableEdit = false; @@ -901,8 +898,6 @@ IMPL_LINK( ScColorScale2FrmtEntry, EntryTypeHdl, ListBox*, pBox ) pEd->Enable(); else pEd->Disable(); - - return 0; } ScColorScale3FrmtEntry::ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat ): @@ -947,9 +942,9 @@ ScColorScale3FrmtEntry::ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument FreeResource(); maLbColorFormat->SetSelectHdl( LINK( pParent, ScCondFormatList, ColFormatTypeHdl ) ); - EntryTypeHdl(maLbEntryTypeMin.get()); - EntryTypeHdl(maLbEntryTypeMiddle.get()); - EntryTypeHdl(maLbEntryTypeMax.get()); + EntryTypeHdl(*maLbEntryTypeMin.get()); + EntryTypeHdl(*maLbEntryTypeMiddle.get()); + EntryTypeHdl(*maLbEntryTypeMax.get()); } ScColorScale3FrmtEntry::~ScColorScale3FrmtEntry() @@ -1073,21 +1068,21 @@ void ScColorScale3FrmtEntry::SetInactive() Deselect(); } -IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox*, pBox ) +IMPL_LINK_TYPED( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox&, rBox, void ) { Edit* pEd = NULL; - if(pBox == maLbEntryTypeMin.get()) + if(&rBox == maLbEntryTypeMin.get()) pEd = maEdMin.get(); - else if(pBox == maLbEntryTypeMiddle.get()) + else if(&rBox == maLbEntryTypeMiddle.get()) pEd = maEdMiddle.get(); - else if(pBox == maLbEntryTypeMax.get()) + else if(&rBox == maLbEntryTypeMax.get()) pEd = maEdMax.get(); if (!pEd) - return 0; + return; bool bEnableEdit = true; - sal_Int32 nPos = pBox->GetSelectEntryPos(); + sal_Int32 nPos = rBox.GetSelectEntryPos(); if(nPos < 2) { bEnableEdit = false; @@ -1097,11 +1092,9 @@ IMPL_LINK( ScColorScale3FrmtEntry, EntryTypeHdl, ListBox*, pBox ) pEd->Enable(); else pEd->Disable(); - - return 0; } -IMPL_LINK_NOARG( ScConditionFrmtEntry, ConditionTypeSelectHdl ) +IMPL_LINK_NOARG_TYPED( ScConditionFrmtEntry, ConditionTypeSelectHdl, ListBox&, void ) { sal_Int32 nSelectPos = maLbCondType->GetSelectEntryPos(); ScConditionMode eMode = EntryPosToConditionMode(nSelectPos); @@ -1123,8 +1116,6 @@ IMPL_LINK_NOARG( ScConditionFrmtEntry, ConditionTypeSelectHdl ) maFtVal->Show(); break; } - - return 0; } //databar @@ -1175,13 +1166,13 @@ ScDataBarFrmtEntry::ScDataBarFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, mpDataBarData.reset(new ScDataBarFormatData(*pFormat->GetDataBarData())); SetDataBarEntryTypes(*mpDataBarData->mpLowerLimit, *maLbDataBarMinType.get(), *maEdDataBarMin.get(), pDoc); SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, *maLbDataBarMaxType.get(), *maEdDataBarMax.get(), pDoc); - DataBarTypeSelectHdl(NULL); + DataBarTypeSelectHdl(*maLbDataBarMinType.get()); } else { maLbDataBarMinType->SelectEntryPos(0); maLbDataBarMaxType->SelectEntryPos(0); - DataBarTypeSelectHdl(NULL); + DataBarTypeSelectHdl(*maLbDataBarMinType.get()); } Init(); @@ -1269,7 +1260,7 @@ void ScDataBarFrmtEntry::SetInactive() Deselect(); } -IMPL_LINK_NOARG( ScDataBarFrmtEntry, DataBarTypeSelectHdl ) +IMPL_LINK_NOARG_TYPED( ScDataBarFrmtEntry, DataBarTypeSelectHdl, ListBox&, void ) { sal_Int32 nSelectPos = maLbDataBarMinType->GetSelectEntryPos(); if(nSelectPos <= COLORSCALE_MAX) @@ -1282,8 +1273,6 @@ IMPL_LINK_NOARG( ScDataBarFrmtEntry, DataBarTypeSelectHdl ) maEdDataBarMax->Disable(); else maEdDataBarMax->Enable(); - - return 0; } IMPL_LINK_NOARG_TYPED( ScDataBarFrmtEntry, OptionBtnHdl, Button*, void ) @@ -1296,7 +1285,7 @@ IMPL_LINK_NOARG_TYPED( ScDataBarFrmtEntry, OptionBtnHdl, Button*, void ) mpDataBarData.reset(pDlg->GetData()); SetDataBarEntryTypes(*mpDataBarData->mpLowerLimit, *maLbDataBarMinType, *maEdDataBarMin.get(), mpDoc); SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, *maLbDataBarMaxType.get(), *maEdDataBarMax.get(), mpDoc); - DataBarTypeSelectHdl(NULL); + DataBarTypeSelectHdl(*maLbDataBarMinType.get()); } } @@ -1322,7 +1311,7 @@ ScDateFrmtEntry::ScDateFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const maLbStyle->SelectEntry(aStyleName); } - StyleSelectHdl(NULL); + StyleSelectHdl(*maLbStyle.get()); } ScDateFrmtEntry::~ScDateFrmtEntry() @@ -1397,13 +1386,11 @@ OUString ScDateFrmtEntry::GetExpressionString() return ScCondFormatHelper::GetExpression(DATE, 0); } -IMPL_LINK_NOARG( ScDateFrmtEntry, StyleSelectHdl ) +IMPL_LINK_NOARG_TYPED( ScDateFrmtEntry, StyleSelectHdl, ListBox&, void ) { mbIsInStyleCreate = true; StyleSelect( *maLbStyle.get(), mpDoc, *maWdPreview.get() ); mbIsInStyleCreate = false; - - return 0; } class ScIconSetFrmtDataEntry : public Control @@ -1548,7 +1535,7 @@ ScIconSetFrmtEntry::ScIconSetFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, maEntries[0]->SetFirstEntry(); } else - IconSetTypeHdl(NULL); + IconSetTypeHdl(*maLbIconSetType.get()); } ScIconSetFrmtEntry::~ScIconSetFrmtEntry() @@ -1575,7 +1562,7 @@ void ScIconSetFrmtEntry::Init() maLbIconSetType->SetSelectHdl( LINK( this, ScIconSetFrmtEntry, IconSetTypeHdl ) ); } -IMPL_LINK_NOARG( ScIconSetFrmtEntry, IconSetTypeHdl ) +IMPL_LINK_NOARG_TYPED( ScIconSetFrmtEntry, IconSetTypeHdl, ListBox&, void ) { ScIconSetMap* pMap = ScIconSetFormat::getIconSetMap(); @@ -1597,8 +1584,6 @@ IMPL_LINK_NOARG( ScIconSetFrmtEntry, IconSetTypeHdl ) maEntries[0]->SetFirstEntry(); SetHeight(); - - return 0; } OUString ScIconSetFrmtEntry::GetExpressionString() diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 87eb9c75ee6e..7ef844199185 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -124,7 +124,7 @@ ScPivotLayoutDialog::ScPivotLayoutDialog( mpSourceButton->SetLoseFocusHdl(aLink); mpSourceEdit->SetModifyHdl(LINK(this, ScPivotLayoutDialog, SourceEditModified)); - mpSourceListBox->SetSelectHdl(LINK(this, ScPivotLayoutDialog, SourceEditModified)); + mpSourceListBox->SetSelectHdl(LINK(this, ScPivotLayoutDialog, SourceListSelected)); // Destination UI aLink2 = LINK(this, ScPivotLayoutDialog, ToggleDestination); @@ -677,6 +677,11 @@ IMPL_LINK_NOARG_TYPED(ScPivotLayoutDialog, LoseFocusHandler, Control&, void) mbDialogLostFocus = !IsActive(); } +IMPL_LINK_NOARG_TYPED(ScPivotLayoutDialog, SourceListSelected, ListBox&, void) +{ + UpdateSourceRange(); +} + IMPL_LINK_NOARG(ScPivotLayoutDialog, SourceEditModified) { UpdateSourceRange(); diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index ab3772cd7ec3..16b2f0c52b06 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -483,19 +483,19 @@ IMPL_LINK_TYPED( ScConsolidateDlg, ClickHdl, Button*, pBtn, void ) } } -IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScConsolidateDlg, SelectHdl, ListBox&, rLb, void ) { - if ( pLb == pLbConsAreas ) + if ( &rLb == pLbConsAreas ) { if ( pLbConsAreas->GetSelectEntryCount() > 0 ) pBtnRemove->Enable(); else pBtnRemove->Disable(); } - else if ( (pLb == pLbDataArea) || (pLb == pLbDestArea) ) + else if ( (&rLb == pLbDataArea) || (&rLb == pLbDestArea) ) { - Edit* pEd = (pLb == pLbDataArea) ? pEdDataArea : pEdDestArea; - const sal_Int32 nSelPos = pLb->GetSelectEntryPos(); + Edit* pEd = (&rLb == pLbDataArea) ? pEdDataArea : pEdDestArea; + const sal_Int32 nSelPos = rLb.GetSelectEntryPos(); if ( pRangeUtil && (nSelPos > 0) @@ -506,7 +506,7 @@ IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox*, pLb ) { OUString aString( pAreaData[nSelPos-1].aStrArea ); - if ( pLb == pLbDestArea ) + if ( &rLb == pLbDestArea ) ScRangeUtil::CutPosString( aString, aString ); pEd->SetText( aString ); @@ -522,7 +522,6 @@ IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox*, pLb ) pBtnAdd->Enable(); } } - return 0; } IMPL_LINK( ScConsolidateDlg, ModifyHdl, formula::RefEdit*, pEd ) diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx index 93bcce13684c..60b4b5cdfb1c 100644 --- a/sc/source/ui/dbgui/dapidata.cxx +++ b/sc/source/ui/dbgui/dapidata.cxx @@ -114,10 +114,9 @@ void ScDataPilotDatabaseDlg::GetValues( ScImportSourceDesc& rDesc ) rDesc.bNative = ( nSelect == DP_TYPELIST_SQLNAT ); } -IMPL_LINK_NOARG(ScDataPilotDatabaseDlg, SelectHdl) +IMPL_LINK_NOARG_TYPED(ScDataPilotDatabaseDlg, SelectHdl, ListBox&, void) { FillObjects(); - return 0; } void ScDataPilotDatabaseDlg::FillObjects() diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 15cf1d13dc42..94b1148af7b7 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -764,14 +764,14 @@ IMPL_LINK_TYPED( ScFilterDlg, TimeOutHdl, Timer*, _pTimer, void ) pTimer->Start(); } -IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScFilterDlg, LbSelectHdl, ListBox&, rLb, void ) { /* * Handle enable/disable logic depending on which ListBox was selected */ sal_uInt16 nOffset = GetSliderPos(); - if ( pLb == pLbConnect1 ) + if ( &rLb == pLbConnect1 ) { pLbField1->Enable(); pLbCond1->Enable(); @@ -785,7 +785,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) maRefreshExceptQuery[nQE] = true; } - else if ( pLb == pLbConnect2 ) + else if ( &rLb == pLbConnect2 ) { pLbField2->Enable(); pLbCond2->Enable(); @@ -798,7 +798,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) maRefreshExceptQuery.resize(nQE + 1, false); maRefreshExceptQuery[nQE]=true; } - else if ( pLb == pLbConnect3 ) + else if ( &rLb == pLbConnect3 ) { pLbField3->Enable(); pLbCond3->Enable(); @@ -812,7 +812,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) maRefreshExceptQuery[nQE] = true; } - else if ( pLb == pLbConnect4 ) + else if ( &rLb == pLbConnect4 ) { pLbField4->Enable(); pLbCond4->Enable(); @@ -825,7 +825,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) maRefreshExceptQuery.resize(nQE + 1, false); maRefreshExceptQuery[nQE] = true; } - else if ( pLb == pLbField1 ) + else if ( &rLb == pLbField1 ) { if ( pLbField1->GetSelectEntryPos() == 0 ) { @@ -874,11 +874,11 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) pLbConnect2->Enable(); } theQueryData.GetEntry(nOffset).bDoQuery = true; - const sal_Int32 nField = pLb->GetSelectEntryPos(); + const sal_Int32 nField = rLb.GetSelectEntryPos(); theQueryData.GetEntry(nOffset).nField = theQueryData.nCol1 + static_cast(nField) - 1 ; } } - else if ( pLb == pLbField2 ) + else if ( &rLb == pLbField2 ) { if ( pLbField2->GetSelectEntryPos() == 0 ) { @@ -920,13 +920,13 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) { pLbConnect3->Enable(); } - const sal_Int32 nField = pLb->GetSelectEntryPos(); + const sal_Int32 nField = rLb.GetSelectEntryPos(); sal_uInt16 nQ=1+nOffset; theQueryData.GetEntry(nQ).bDoQuery = true; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast(nField) - 1 ; } } - else if ( pLb == pLbField3 ) + else if ( &rLb == pLbField3 ) { if ( pLbField3->GetSelectEntryPos() == 0 ) { @@ -961,14 +961,14 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) pLbConnect4->Enable(); } - const sal_Int32 nField = pLb->GetSelectEntryPos(); + const sal_Int32 nField = rLb.GetSelectEntryPos(); sal_uInt16 nQ=2+nOffset; theQueryData.GetEntry(nQ).bDoQuery = true; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast(nField) - 1 ; } } - else if ( pLb == pLbField4 ) + else if ( &rLb == pLbField4 ) { if ( pLbField4->GetSelectEntryPos() == 0 ) { @@ -988,34 +988,32 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) else { UpdateValueList( 4 ); - const sal_Int32 nField = pLb->GetSelectEntryPos(); + const sal_Int32 nField = rLb.GetSelectEntryPos(); sal_uInt16 nQ=3+nOffset; theQueryData.GetEntry(nQ).bDoQuery = true; theQueryData.GetEntry(nQ).nField = theQueryData.nCol1 + static_cast(nField) - 1 ; } } - else if ( pLb == pLbCond1) + else if ( &rLb == pLbCond1) { - theQueryData.GetEntry(nOffset).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); + theQueryData.GetEntry(nOffset).eOp=(ScQueryOp)rLb.GetSelectEntryPos(); } - else if ( pLb == pLbCond2) + else if ( &rLb == pLbCond2) { sal_uInt16 nQ=1+nOffset; - theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); + theQueryData.GetEntry(nQ).eOp=(ScQueryOp)rLb.GetSelectEntryPos(); } - else if ( pLb == pLbCond3) + else if ( &rLb == pLbCond3) { sal_uInt16 nQ=2+nOffset; - theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); + theQueryData.GetEntry(nQ).eOp=(ScQueryOp)rLb.GetSelectEntryPos(); } else { sal_uInt16 nQ=3+nOffset; - theQueryData.GetEntry(nQ).eOp=(ScQueryOp)pLb->GetSelectEntryPos(); + theQueryData.GetEntry(nQ).eOp=(ScQueryOp)rLb.GetSelectEntryPos(); } - - return 0; } IMPL_LINK_TYPED( ScFilterDlg, CheckBoxHdl, Button*, pBox, void ) diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index 29b6dc2c5e93..847b5b737b0f 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -209,9 +209,9 @@ bool ScFilterOptionsMgr::VerifyPosStr( const OUString& rPosStr ) const // Handler: -IMPL_LINK( ScFilterOptionsMgr, LbAreaSelHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScFilterOptionsMgr, LbAreaSelHdl, ListBox&, rLb, void ) { - if ( pLb == pLbCopyArea ) + if ( &rLb == pLbCopyArea ) { OUString aString; const sal_Int32 nSelPos = pLbCopyArea->GetSelectEntryPos(); @@ -221,8 +221,6 @@ IMPL_LINK( ScFilterOptionsMgr, LbAreaSelHdl, ListBox*, pLb ) pEdCopyArea->SetText( aString ); } - - return 0; } IMPL_LINK( ScFilterOptionsMgr, EdAreaModifyHdl, Edit*, pEd ) diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index 078fbfc01d5b..1b3a155a0752 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -429,13 +429,14 @@ const ScQueryItem& ScPivotFilterDlg::GetOutputItem() // Handler: -IMPL_LINK( ScPivotFilterDlg, LbSelectHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScPivotFilterDlg, LbSelectHdl, ListBox&, rLb, void ) { /* * Handling the enable/disable logic based on which ListBox was touched: */ - if (pLb == m_pLbConnect1) + + if (&rLb == m_pLbConnect1) { if ( !m_pLbField2->IsEnabled() ) { @@ -444,7 +445,7 @@ IMPL_LINK( ScPivotFilterDlg, LbSelectHdl, ListBox*, pLb ) m_pEdVal2->Enable(); } } - else if (pLb == m_pLbConnect2) + else if (&rLb == m_pLbConnect2) { if ( !m_pLbField3->IsEnabled() ) { @@ -453,7 +454,7 @@ IMPL_LINK( ScPivotFilterDlg, LbSelectHdl, ListBox*, pLb ) m_pEdVal3->Enable(); } } - else if (pLb == m_pLbField1) + else if (&rLb == m_pLbField1) { if ( m_pLbField1->GetSelectEntryPos() == 0 ) { @@ -485,7 +486,7 @@ IMPL_LINK( ScPivotFilterDlg, LbSelectHdl, ListBox*, pLb ) } } } - else if (pLb == m_pLbField2) + else if (&rLb == m_pLbField2) { if ( m_pLbField2->GetSelectEntryPos() == 0 ) { @@ -509,14 +510,12 @@ IMPL_LINK( ScPivotFilterDlg, LbSelectHdl, ListBox*, pLb ) } } } - else if (pLb == m_pLbField3) + else if (&rLb == m_pLbField3) { ( m_pLbField3->GetSelectEntryPos() == 0 ) ? ClearValueList( 3 ) : UpdateValueList( 3 ); } - - return 0; } IMPL_LINK_TYPED( ScPivotFilterDlg, CheckBoxHdl, Button*, pBox, void ) diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index e54cc5ce619b..e1c7fe32e192 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -294,13 +294,13 @@ void ScDPFunctionDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncDa // select field reference type mxLbTypeWrp->SetControlValue( rFuncData.maFieldRef.ReferenceType ); - SelectHdl( mpLbType ); // enables base field/item list boxes + SelectHdl( *mpLbType.get() ); // enables base field/item list boxes // select base field mpLbBaseField->SelectEntry(aSelectedEntry); if( mpLbBaseField->GetSelectEntryPos() >= mpLbBaseField->GetEntryCount() ) mpLbBaseField->SelectEntryPos( 0 ); - SelectHdl( mpLbBaseField ); // fills base item list, selects base item + SelectHdl( *mpLbBaseField.get() ); // fills base item list, selects base item // select base item switch( rFuncData.maFieldRef.ReferenceItemType ) @@ -361,9 +361,9 @@ sal_Int32 ScDPFunctionDlg::FindBaseItemPos( const OUString& rEntry, sal_Int32 nS return bFound ? nPos : LISTBOX_ENTRY_NOTFOUND; } -IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox*, pLBox ) +IMPL_LINK_TYPED( ScDPFunctionDlg, SelectHdl, ListBox&, rLBox, void ) { - if( pLBox == mpLbType ) + if( &rLBox == mpLbType ) { bool bEnableField, bEnableItem; switch( mxLbTypeWrp->GetControlValue() ) @@ -391,7 +391,7 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox*, pLBox ) mpFtBaseItem->Enable( bEnableItem ); mpLbBaseItem->Enable( bEnableItem ); } - else if( pLBox == mpLbBaseField ) + else if( &rLBox == mpLbBaseField ) { // keep "previous" and "next" entries while( mpLbBaseItem->GetEntryCount() > SC_BASEITEM_USER_POS ) @@ -416,7 +416,6 @@ IMPL_LINK( ScDPFunctionDlg, SelectHdl, ListBox*, pLBox ) sal_uInt16 nItemPos = (mpLbBaseItem->GetEntryCount() > SC_BASEITEM_USER_POS) ? SC_BASEITEM_USER_POS : SC_BASEITEM_PREV_POS; mpLbBaseItem->SelectEntryPos( nItemPos ); } - return 0; } IMPL_LINK_NOARG_TYPED(ScDPFunctionDlg, DblClickHdl, ListBox&, void) @@ -811,14 +810,13 @@ IMPL_LINK_TYPED( ScDPSubtotalOptDlg, CheckHdl, Button*, pCBox, void ) } } -IMPL_LINK( ScDPSubtotalOptDlg, SelectHdl, ListBox*, pLBox ) +IMPL_LINK_TYPED( ScDPSubtotalOptDlg, SelectHdl, ListBox&, rLBox, void ) { - if (pLBox == m_pLbHierarchy) + if (&rLBox == m_pLbHierarchy) { mrDPObj.GetMembers(maLabelData.mnCol, m_pLbHierarchy->GetSelectEntryPos(), maLabelData.maMembers); InitHideListBox(); } - return 0; } ScDPShowDetailDlg::ScDPShowDetailDlg( vcl::Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ) : diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 0dffe036b483..5fe87be77c87 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -705,10 +705,9 @@ IMPL_LINK( ScImportAsciiDlg, SeparatorHdl, Control*, pCtrl ) return 0; } -IMPL_LINK( ScImportAsciiDlg, CharSetHdl, SvxTextEncodingBox*, pCharSetBox ) +IMPL_LINK_TYPED( ScImportAsciiDlg, CharSetHdl, ListBox&, rListBox, void ) { - OSL_ENSURE( pCharSetBox, "ScImportAsciiDlg::CharSetHdl - missing sender" ); - + SvxTextEncodingBox* pCharSetBox = static_cast(&rListBox); if( (pCharSetBox == pLbCharSet) && (pCharSetBox->GetSelectEntryCount() == 1) ) { SetPointer( Pointer( PointerStyle::Wait ) ); @@ -721,7 +720,6 @@ IMPL_LINK( ScImportAsciiDlg, CharSetHdl, SvxTextEncodingBox*, pCharSetBox ) mpTableBox->Execute( CSVCMD_NEWCELLTEXTS ); SetPointer( Pointer( PointerStyle::Arrow ) ); } - return 0; } IMPL_LINK( ScImportAsciiDlg, FirstRowHdl, NumericField*, pNumField ) @@ -731,12 +729,10 @@ IMPL_LINK( ScImportAsciiDlg, FirstRowHdl, NumericField*, pNumField ) return 0; } -IMPL_LINK( ScImportAsciiDlg, LbColTypeHdl, ListBox*, pListBox ) +IMPL_LINK_TYPED( ScImportAsciiDlg, LbColTypeHdl, ListBox&, rListBox, void ) { - OSL_ENSURE( pListBox, "ScImportAsciiDlg::LbColTypeHdl - missing sender" ); - if( pListBox == pLbType ) - mpTableBox->Execute( CSVCMD_SETCOLUMNTYPE, pListBox->GetSelectEntryPos() ); - return 0; + if( &rListBox == pLbType ) + mpTableBox->Execute( CSVCMD_SETCOLUMNTYPE, rListBox.GetSelectEntryPos() ); } IMPL_LINK_NOARG_TYPED(ScImportAsciiDlg, UpdateTextHdl, ScCsvTableBox&, void) @@ -774,8 +770,8 @@ IMPL_LINK_TYPED( ScImportAsciiDlg, ColTypeHdl, ScCsvTableBox&, rTableBox, void ) pFtType->Enable( bEnable ); pLbType->Enable( bEnable ); - Link<> aSelHdl = pLbType->GetSelectHdl(); - pLbType->SetSelectHdl( Link<>() ); + Link aSelHdl = pLbType->GetSelectHdl(); + pLbType->SetSelectHdl( Link() ); if( bEmpty ) pLbType->SetNoSelection(); else if( bEnable ) diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 92753b06d6dd..f4f972d83bb2 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -425,9 +425,9 @@ IMPL_LINK_TYPED( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle, void ) pIdle->Start(); } -IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox&, rLb, void ) { - if ( pLb == pLbFilterArea ) + if ( &rLb == pLbFilterArea ) { OUString aString; const sal_Int32 nSelPos = pLbFilterArea->GetSelectEntryPos(); @@ -437,8 +437,6 @@ IMPL_LINK( ScSpecialFilterDlg, FilterAreaSelHdl, ListBox*, pLb ) pEdFilterArea->SetText( aString ); } - - return 0; } IMPL_LINK( ScSpecialFilterDlg, FilterAreaModHdl, formula::RefEdit*, pEd ) diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index b5ef0b344c33..c81e7ad19d6e 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -442,23 +442,23 @@ void ScTabPageSortFields::SetLastSortKey( sal_uInt16 nItem ) // Handler: -IMPL_LINK( ScTabPageSortFields, SelectHdl, ListBox *, pLb ) +IMPL_LINK_TYPED( ScTabPageSortFields, SelectHdl, ListBox&, rLb, void ) { - OUString aSelEntry = pLb->GetSelectEntry(); + OUString aSelEntry = rLb.GetSelectEntry(); ScSortKeyItems::iterator pIter; // If last listbox is enabled add one item - if ( maSortKeyItems.back().m_pLbSort == pLb ) + if ( maSortKeyItems.back().m_pLbSort == &rLb ) if ( aSelEntry != aStrUndefined ) { SetLastSortKey( nSortKeyCount ); - return 0; + return; } // Find selected listbox for ( pIter = maSortKeyItems.begin(); pIter != maSortKeyItems.end(); ++pIter ) { - if ( pIter->m_pLbSort == pLb ) break; + if ( pIter->m_pLbSort == &rLb ) break; } // If not selecting the last Listbox, modify the succeeding ones @@ -481,7 +481,6 @@ IMPL_LINK( ScTabPageSortFields, SelectHdl, ListBox *, pLb ) pIter->EnableField(); } } - return 0; } // Sort option Tab Page: @@ -678,7 +677,7 @@ void ScTabPageSortOptions::Reset( const SfxItemSet* /* rArgSet */ ) if ( eLang == LANGUAGE_DONTKNOW ) eLang = LANGUAGE_SYSTEM; m_pLbLanguage->SelectLanguage( eLang ); - FillAlgorHdl(m_pLbLanguage); // get algorithms, select default + FillAlgorHdl(*m_pLbLanguage.get()); // get algorithms, select default if ( !aSortData.aCollatorAlgorithm.isEmpty() ) m_pLbAlgorithm->SelectEntry( pColRes->GetTranslation( aSortData.aCollatorAlgorithm ) ); @@ -876,9 +875,9 @@ IMPL_LINK_TYPED( ScTabPageSortOptions, EnableHdl, Button*, pButton, void ) } } -IMPL_LINK( ScTabPageSortOptions, SelOutPosHdl, ListBox *, pLb ) +IMPL_LINK_TYPED( ScTabPageSortOptions, SelOutPosHdl, ListBox&, rLb, void ) { - if (pLb == m_pLbOutPos) + if (&rLb == m_pLbOutPos) { OUString aString; const sal_Int32 nSelPos = m_pLbOutPos->GetSelectEntryPos(); @@ -888,7 +887,6 @@ IMPL_LINK( ScTabPageSortOptions, SelOutPosHdl, ListBox *, pLb ) m_pEdOutPos->SetText( aString ); } - return 0; } IMPL_LINK_TYPED( ScTabPageSortOptions, SortDirHdl, Button *, pBtn, void ) @@ -930,7 +928,7 @@ void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd ) } } -IMPL_LINK_NOARG(ScTabPageSortOptions, FillAlgorHdl) +IMPL_LINK_NOARG_TYPED(ScTabPageSortOptions, FillAlgorHdl, ListBox&, void) { m_pLbAlgorithm->SetUpdateMode( false ); m_pLbAlgorithm->Clear(); @@ -963,7 +961,6 @@ IMPL_LINK_NOARG(ScTabPageSortOptions, FillAlgorHdl) } m_pLbAlgorithm->SetUpdateMode( true ); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index 04c1de102261..ab1bf01394b5 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -100,10 +100,10 @@ void ScTpSubTotalGroup::Init() OSL_ENSURE( pViewData && pDoc, "ViewData or Document not found :-(" ); - mpLbGroup->SetSelectHdl ( LINK( this, ScTpSubTotalGroup, SelectHdl ) ); + mpLbGroup->SetSelectHdl ( LINK( this, ScTpSubTotalGroup, SelectListBoxHdl ) ); mpLbColumns->SetSelectHdl ( LINK( this, ScTpSubTotalGroup, SelectTreeListBoxHdl ) ); mpLbColumns->SetCheckButtonHdl( LINK( this, ScTpSubTotalGroup, CheckHdl ) ); - mpLbFunctions->SetSelectHdl ( LINK( this, ScTpSubTotalGroup, SelectHdl ) ); + mpLbFunctions->SetSelectHdl ( LINK( this, ScTpSubTotalGroup, SelectListBoxHdl ) ); nFieldArr[0] = 0; FillListBoxes(); @@ -346,7 +346,11 @@ IMPL_LINK_TYPED( ScTpSubTotalGroup, SelectTreeListBoxHdl, SvTreeListBox*, pLb, v { SelectHdl(pLb); } -IMPL_LINK( ScTpSubTotalGroup, SelectHdl, void *, pLb ) +IMPL_LINK_TYPED( ScTpSubTotalGroup, SelectListBoxHdl, ListBox&, rLb, void ) +{ + SelectHdl(&rLb); +} +void ScTpSubTotalGroup::SelectHdl(void *pLb) { if ( (mpLbColumns->GetEntryCount() > 0) && (mpLbColumns->GetSelectionCount() > 0) ) @@ -357,7 +361,7 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, void *, pLb ) OSL_ENSURE( pFunction, "EntryData not found!" ); if ( !pFunction ) - return 0; + return; if ( pLb == mpLbColumns ) { @@ -369,7 +373,6 @@ IMPL_LINK( ScTpSubTotalGroup, SelectHdl, void *, pLb ) mpLbColumns->CheckEntryPos( nColumn ); } } - return 0; } IMPL_LINK_TYPED( ScTpSubTotalGroup, CheckHdl, SvTreeListBox*, pLb, void ) diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index ae2628455887..6b0b56abf78c 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -401,7 +401,7 @@ void ScTPValidationValue::Init() m_pLbAllow->SelectEntryPos( SC_VALIDDLG_ALLOW_ANY ); m_pLbValue->SelectEntryPos( SC_VALIDDLG_DATA_EQUAL ); - SelectHdl( NULL ); + SelectHdl( *m_pLbAllow.get() ); CheckHdl( NULL ); } @@ -449,7 +449,7 @@ void ScTPValidationValue::Reset( const SfxItemSet* rArgSet ) aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue(); SetSecondFormula( aFmlaStr ); - SelectHdl( NULL ); + SelectHdl( *m_pLbAllow.get() ); CheckHdl( NULL ); } @@ -598,7 +598,7 @@ IMPL_LINK_TYPED( ScTPValidationValue, KillFocusHdl, Control&, rControl, void ) } } -IMPL_LINK_NOARG(ScTPValidationValue, SelectHdl) +IMPL_LINK_NOARG_TYPED(ScTPValidationValue, SelectHdl, ListBox&, void) { const sal_Int32 nLbPos = m_pLbAllow->GetSelectEntryPos(); bool bEnable = (nLbPos != SC_VALIDDLG_ALLOW_ANY); @@ -657,7 +657,6 @@ IMPL_LINK_NOARG(ScTPValidationValue, SelectHdl) m_pEdMax->Show( bShowMax ); m_pFtHint->Show( bRange ); m_pBtnRef->Show( bRange ); // cell range picker - return 0; } IMPL_LINK_NOARG_TYPED(ScTPValidationValue, CheckHdl, Button*, void) @@ -779,7 +778,7 @@ void ScTPValidationError::Init() m_pLbAction->SelectEntryPos( 0 ); m_pTsbShow->EnableTriState( false ); - SelectActionHdl( NULL ); + SelectActionHdl( *m_pLbAction.get() ); } VclPtr ScTPValidationError::Create( vcl::Window* pParent, @@ -812,7 +811,7 @@ void ScTPValidationError::Reset( const SfxItemSet* rArgSet ) else m_pEdError->SetText( EMPTY_OUSTRING ); - SelectActionHdl( NULL ); + SelectActionHdl( *m_pLbAction.get() ); } bool ScTPValidationError::FillItemSet( SfxItemSet* rArgSet ) @@ -825,7 +824,7 @@ bool ScTPValidationError::FillItemSet( SfxItemSet* rArgSet ) return true; } -IMPL_LINK_NOARG(ScTPValidationError, SelectActionHdl) +IMPL_LINK_NOARG_TYPED(ScTPValidationError, SelectActionHdl, ListBox&, void) { ScValidErrorStyle eStyle = (ScValidErrorStyle) m_pLbAction->GetSelectEntryPos(); bool bMacro = ( eStyle == SC_VALERR_MACRO ); @@ -833,8 +832,6 @@ IMPL_LINK_NOARG(ScTPValidationError, SelectActionHdl) m_pBtnSearch->Enable( bMacro ); m_pFtError->Enable( !bMacro ); m_pEdError->Enable( !bMacro ); - - return 0L; } IMPL_LINK_NOARG_TYPED(ScTPValidationError, ClickSearchHdl, Button*, void) diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 9ea7238a0864..1dba9a5976c9 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -124,7 +124,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, aFiFuncDesc->SetFont(aFont); aFiFuncDesc->SetBackground( GetBackground() ); //! never transparent? - Link<> aLink=LINK( this, ScFunctionDockWin, SelHdl); + Link aLink=LINK( this, ScFunctionDockWin, SelHdl); aCatBox->SetSelectHdl(aLink); aFuncList->SetSelectHdl(aLink); aDDFuncList->SetSelectHdl(aLink); @@ -148,7 +148,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, Range aYRange(3*aTxtSize.Height()+aFuncList->GetPosPixel().Y(), GetOutputSizePixel().Height()-2*aTxtSize.Height()); aPrivatSplit->SetYRange(aYRange); - SelHdl(aCatBox.get()); + SelHdl(*aCatBox.get()); bInit = true; } @@ -276,7 +276,7 @@ void ScFunctionDockWin::SetSize() aFuncList->Disable(); aFuncList->Hide(); pAllFuncList=aDDFuncList.get(); - SelHdl(aCatBox.get()); + SelHdl(*aCatBox.get()); aDDFuncList->SelectEntryPos(nSelEntry); } break; @@ -294,7 +294,7 @@ void ScFunctionDockWin::SetSize() aFuncList->Enable(); aFuncList->Show(); pAllFuncList=aFuncList.get(); - SelHdl(aCatBox.get()); + SelHdl(*aCatBox.get()); aFuncList->SelectEntryPos(nSelEntry); } break; @@ -922,21 +922,18 @@ void ScFunctionDockWin::DoEnter() #* #************************************************************************/ -IMPL_LINK( ScFunctionDockWin, SelHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScFunctionDockWin, SelHdl, ListBox&, rLb, void ) { - if ( pLb == aCatBox.get() ) + if ( &rLb == aCatBox.get() ) { UpdateFunctionList(); SetDescription(); } - if ( pLb == aFuncList.get() || pLb == aDDFuncList.get() ) + if ( &rLb == aFuncList.get() || &rLb == aDDFuncList.get() ) { SetDescription(); } - - //SetSize(); - return 0; } /************************************************************************* @@ -1053,7 +1050,7 @@ void ScFunctionDockWin::Initialize(SfxChildWinInfo *pInfo) aStr = aStr.copy( n1+1 ); sal_Int32 nSelPos = aStr.toInt32(); aCatBox->SelectEntryPos(nSelPos); - SelHdl(aCatBox.get()); + SelHdl(*aCatBox.get()); // if the window has already been shown (from SfxDockingWindow::Initialize if docked), // set the splitter position now, otherwise it is set in StateChanged with type INITSHOW diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx index e8aeaecb95d0..689cbd87dd8d 100644 --- a/sc/source/ui/inc/PivotLayoutDialog.hxx +++ b/sc/source/ui/inc/PivotLayoutDialog.hxx @@ -94,7 +94,8 @@ private: DECL_LINK_TYPED(LoseFocusHandler, Control&, void); DECL_LINK_TYPED(ToggleSource, RadioButton&, void); DECL_LINK_TYPED(ToggleDestination, RadioButton&, void); - DECL_LINK(SourceEditModified, void*); + DECL_LINK_TYPED(SourceListSelected, ListBox&, void); + DECL_LINK(SourceEditModified, void*); void ToggleSource(); void ToggleDestination(); virtual bool Close() SAL_OVERRIDE; diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx index b9d7934bd4f5..c8bbbbc5ab92 100644 --- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx +++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx @@ -79,7 +79,7 @@ private: DECL_LINK( InputRangeModified, void* ); DECL_LINK( Parameter1ValueModified, void* ); DECL_LINK( Parameter2ValueModified, void* ); - DECL_LINK( DistributionChanged, void* ); + DECL_LINK_TYPED( DistributionChanged, ListBox&, void ); DECL_LINK_TYPED( CheckChanged, CheckBox&, void ); }; diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx index 7b93cc8f46a8..a66efcf57c39 100644 --- a/sc/source/ui/inc/areasdlg.hxx +++ b/sc/source/ui/inc/areasdlg.hxx @@ -73,9 +73,9 @@ private: bool Impl_GetItem( Edit* pEd, SfxStringItem& rItem ); // Handler: - DECL_LINK( Impl_SelectHdl, ListBox* ); - DECL_LINK( Impl_ModifyHdl, formula::RefEdit* ); - DECL_LINK_TYPED( Impl_BtnHdl, Button*, void ); + DECL_LINK_TYPED( Impl_SelectHdl, ListBox&, void ); + DECL_LINK( Impl_ModifyHdl, formula::RefEdit* ); + DECL_LINK_TYPED( Impl_BtnHdl, Button*, void ); DECL_LINK_TYPED( Impl_GetFocusHdl, Control&, void ); }; diff --git a/sc/source/ui/inc/colorformat.hxx b/sc/source/ui/inc/colorformat.hxx index ed694ad38cd8..bac09680793e 100644 --- a/sc/source/ui/inc/colorformat.hxx +++ b/sc/source/ui/inc/colorformat.hxx @@ -50,8 +50,8 @@ private: ScAddress maPos; DECL_LINK_TYPED(OkBtnHdl, Button*, void); - DECL_LINK(TypeSelectHdl, void*); - DECL_LINK(PosSelectHdl, void*); + DECL_LINK_TYPED(TypeSelectHdl, ListBox&, void); + DECL_LINK_TYPED(PosSelectHdl, ListBox&, void); void Init(); diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index bac7c365f590..affbeff01f61 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -91,9 +91,9 @@ public: DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void ); DECL_LINK( EntrySelectHdl, ScCondFrmtEntry* ); - DECL_LINK( TypeListHdl, ListBox*); - DECL_LINK_TYPED( AfterTypeListHdl, void*, void); - DECL_LINK( ColFormatTypeHdl, ListBox*); + DECL_LINK_TYPED( TypeListHdl, ListBox&, void ); + DECL_LINK_TYPED( AfterTypeListHdl, void*, void ); + DECL_LINK_TYPED( ColFormatTypeHdl, ListBox&, void ); }; class ScCondFormatDlg : public ScAnyRefDlg diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx index 3fd588dee14f..8eebe484cf07 100644 --- a/sc/source/ui/inc/condformatdlgentry.hxx +++ b/sc/source/ui/inc/condformatdlgentry.hxx @@ -100,8 +100,8 @@ class ScConditionFrmtEntry : public ScCondFrmtEntry, public SfxListener virtual OUString GetExpressionString() SAL_OVERRIDE; void Init(ScCondFormatDlg* pDialogParent); - DECL_LINK( StyleSelectHdl, void* ); - DECL_LINK( ConditionTypeSelectHdl, void* ); + DECL_LINK_TYPED( StyleSelectHdl, ListBox&, void ); + DECL_LINK_TYPED( ConditionTypeSelectHdl, ListBox&, void ); DECL_LINK( OnEdChanged, Edit* ); // Searches the lookup table for the entry position, given condition mode @@ -142,7 +142,7 @@ class ScFormulaFrmtEntry : public ScCondFrmtEntry virtual OUString GetExpressionString() SAL_OVERRIDE; void Init(ScCondFormatDlg* pDialogParent); - DECL_LINK( StyleSelectHdl, void* ); + DECL_LINK_TYPED( StyleSelectHdl, ListBox&, void ); public: ScFormulaFrmtEntry( vcl::Window* pParent, ScDocument* PDoc, ScCondFormatDlg* pDialogParent, const ScAddress& rPos, const ScCondFormatEntry* pFormatEntry = NULL ); @@ -176,7 +176,7 @@ class ScColorScale2FrmtEntry : public ScCondFrmtEntry virtual OUString GetExpressionString() SAL_OVERRIDE; void Init(); - DECL_LINK( EntryTypeHdl, ListBox* ); + DECL_LINK_TYPED( EntryTypeHdl, ListBox&, void ); public: ScColorScale2FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat = NULL ); virtual ~ScColorScale2FrmtEntry(); @@ -211,7 +211,7 @@ class ScColorScale3FrmtEntry : public ScCondFrmtEntry virtual OUString GetExpressionString() SAL_OVERRIDE; void Init(); - DECL_LINK( EntryTypeHdl, ListBox* ); + DECL_LINK_TYPED( EntryTypeHdl, ListBox&, void ); public: ScColorScale3FrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScColorScaleFormat* pFormat = NULL ); virtual ~ScColorScale3FrmtEntry(); @@ -243,7 +243,7 @@ class ScDataBarFrmtEntry : public ScCondFrmtEntry void Init(); DECL_LINK_TYPED( OptionBtnHdl, Button*, void ); - DECL_LINK( DataBarTypeSelectHdl, void* ); + DECL_LINK_TYPED( DataBarTypeSelectHdl, ListBox&, void ); public: ScDataBarFrmtEntry( vcl::Window* pParemt, ScDocument* pDoc, const ScAddress& rPos, const ScDataBarFormat* pFormat = NULL ); virtual ~ScDataBarFrmtEntry(); @@ -274,7 +274,7 @@ protected: private: void Init(); - DECL_LINK( StyleSelectHdl, void* ); + DECL_LINK_TYPED( StyleSelectHdl, ListBox&, void ); VclPtr maLbDateEntry; VclPtr maFtStyle; @@ -299,7 +299,7 @@ class ScIconSetFrmtEntry : public ScCondFrmtEntry void Init(); - DECL_LINK( IconSetTypeHdl, void* ); + DECL_LINK_TYPED( IconSetTypeHdl, ListBox&, void ); public: ScIconSetFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScAddress& rPos, const ScIconSetFormat* pFormat = NULL ); diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx index e875010bfda9..07ea7c215ff3 100644 --- a/sc/source/ui/inc/consdlg.hxx +++ b/sc/source/ui/inc/consdlg.hxx @@ -95,7 +95,7 @@ private: DECL_LINK_TYPED( ClickHdl, Button*, void ); DECL_LINK_TYPED( GetFocusHdl, Control&, void ); DECL_LINK( ModifyHdl, formula::RefEdit* ); - DECL_LINK( SelectHdl, ListBox* ); + DECL_LINK_TYPED( SelectHdl, ListBox&, void ); static ScSubTotalFunc LbPosToFunc( sal_Int32 nPos ); static sal_Int32 FuncToLbPos( ScSubTotalFunc eFunc ); diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx index 8e84a04daaea..8eaeb59e8957 100644 --- a/sc/source/ui/inc/crnrdlg.hxx +++ b/sc/source/ui/inc/crnrdlg.hxx @@ -81,7 +81,7 @@ private: DECL_LINK_TYPED( OkBtnHdl, Button*, void ); DECL_LINK_TYPED( AddBtnHdl, Button*, void ); DECL_LINK_TYPED( RemoveBtnHdl, Button*, void ); - DECL_LINK( Range1SelectHdl, void * ); + DECL_LINK_TYPED( Range1SelectHdl, ListBox&, void ); DECL_LINK( Range1DataModifyHdl, void * ); DECL_LINK_TYPED( ColClickHdl, Button*, void ); DECL_LINK_TYPED( RowClickHdl, Button*, void ); diff --git a/sc/source/ui/inc/dapidata.hxx b/sc/source/ui/inc/dapidata.hxx index 02c76e0dc8ae..3ddb187edcbb 100644 --- a/sc/source/ui/inc/dapidata.hxx +++ b/sc/source/ui/inc/dapidata.hxx @@ -36,7 +36,7 @@ private: void FillObjects(); - DECL_LINK( SelectHdl, void* ); + DECL_LINK_TYPED( SelectHdl, ListBox&, void ); public: ScDataPilotDatabaseDlg(vcl::Window* pParent); diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx index 3749cb4bf05c..988e8aea7e82 100644 --- a/sc/source/ui/inc/dwfunctr.hxx +++ b/sc/source/ui/inc/dwfunctr.hxx @@ -83,7 +83,7 @@ private: DECL_LINK_TYPED( SetSelectionHdl, ListBox&, void ); DECL_LINK_TYPED( SetSelectionClickHdl, Button*, void ); - DECL_LINK( SelHdl, ListBox* ); + DECL_LINK_TYPED( SelHdl, ListBox&, void ); DECL_LINK_TYPED( SetSplitHdl, ScPrivatSplit&, void ); DECL_LINK_TYPED( TimerHdl, Idle*, void ); diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index 59bf701f9ea2..a7c22e073e09 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -145,7 +145,7 @@ private: ScQueryItem* GetOutputItem (); // Handler: - DECL_LINK( LbSelectHdl, ListBox* ); + DECL_LINK_TYPED( LbSelectHdl, ListBox&, void ); DECL_LINK( ValModifyHdl, ComboBox* ); DECL_LINK_TYPED( CheckBoxHdl, Button*, void ); DECL_LINK_TYPED( EndDlgHdl, Button*, void ); @@ -213,7 +213,7 @@ private: const ScRange& rSource ); // Handler - DECL_LINK( FilterAreaSelHdl, ListBox* ); + DECL_LINK_TYPED( FilterAreaSelHdl, ListBox&, void ); DECL_LINK( FilterAreaModHdl, formula::RefEdit* ); DECL_LINK_TYPED( EndDlgHdl, Button*, void ); diff --git a/sc/source/ui/inc/foptmgr.hxx b/sc/source/ui/inc/foptmgr.hxx index e5626ba48435..4016a5b3df4a 100644 --- a/sc/source/ui/inc/foptmgr.hxx +++ b/sc/source/ui/inc/foptmgr.hxx @@ -78,7 +78,7 @@ private: // Handler: DECL_LINK( EdAreaModifyHdl, Edit* ); - DECL_LINK( LbAreaSelHdl, ListBox* ); + DECL_LINK_TYPED( LbAreaSelHdl, ListBox&, void ); DECL_LINK_TYPED( BtnCopyResultHdl, CheckBox&, void ); }; diff --git a/sc/source/ui/inc/funcpage.hxx b/sc/source/ui/inc/funcpage.hxx index fcf2638e295c..942ee3045f80 100644 --- a/sc/source/ui/inc/funcpage.hxx +++ b/sc/source/ui/inc/funcpage.hxx @@ -61,8 +61,8 @@ private: const ScFuncDesc* aLRUList[LRU_MAX]; - DECL_LINK( SelHdl, ListBox* ); - DECL_LINK( DblClkHdl, ListBox* ); + DECL_LINK_TYPED( SelHdl, ListBox&, void ); + DECL_LINK_TYPED( DblClkHdl, ListBox&, void ); protected: diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx index 647512aa07d7..13ad0f9ca4ac 100644 --- a/sc/source/ui/inc/instbdlg.hxx +++ b/sc/source/ui/inc/instbdlg.hxx @@ -93,7 +93,7 @@ private: DECL_LINK_TYPED(BrowseHdl_Impl, Button*, void); DECL_LINK_TYPED(ChoiceHdl_Impl, Button*, void); - DECL_LINK(SelectHdl_Impl, void *); + DECL_LINK_TYPED(SelectHdl_Impl, ListBox&, void); DECL_LINK(CountHdl_Impl, void *); DECL_LINK_TYPED(DoEnterHdl, Button*, void); DECL_LINK_TYPED(BrowseTimeoutHdl, Timer *, void); diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx index 610ea8c3d8d7..8204e7980795 100644 --- a/sc/source/ui/inc/linkarea.hxx +++ b/sc/source/ui/inc/linkarea.hxx @@ -52,7 +52,7 @@ private: DECL_LINK(FileHdl, void *); DECL_LINK_TYPED(BrowseHdl, Button*, void); - DECL_LINK(RangeHdl, void *); + DECL_LINK_TYPED(RangeHdl, ListBox&, void); DECL_LINK_TYPED(ReloadHdl, Button*, void); DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper*, void ); diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx index a758072bb435..99cd8fe51481 100644 --- a/sc/source/ui/inc/mvtabdlg.hxx +++ b/sc/source/ui/inc/mvtabdlg.hxx @@ -76,7 +76,7 @@ private: void Init (); void InitDocListBox (); DECL_LINK_TYPED( OkHdl, Button*, void ); - DECL_LINK( SelHdl, ListBox * ); + DECL_LINK_TYPED( SelHdl, ListBox&, void ); DECL_LINK_TYPED( CheckBtnHdl, RadioButton&, void ); DECL_LINK( CheckNameHdl, Edit * ); }; diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx index 332a0d7b0b0d..09526bde2b04 100644 --- a/sc/source/ui/inc/namedlg.hxx +++ b/sc/source/ui/inc/namedlg.hxx @@ -108,7 +108,7 @@ private: DECL_LINK_TYPED( EdModifyCheckBoxHdl, CheckBox&, void ); DECL_LINK_TYPED( AssignGetFocusHdl, Control&, void ); DECL_LINK_TYPED( SelectionChangedHdl_Impl, SvTreeListBox*, void ); - DECL_LINK( ScopeChangedHdl, void* ); + DECL_LINK_TYPED( ScopeChangedHdl, ListBox&, void ); protected: virtual void RefInputDone( bool bForced = false ) SAL_OVERRIDE; diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index 6bdb0dd1b64d..47594807be3f 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -198,7 +198,7 @@ private: DECL_LINK_TYPED( CursorDownHdl, ScCursorRefEdit&, void ); DECL_LINK( CondModifyHdl, void* ); DECL_LINK( TargetModifyHdl, void* ); - DECL_LINK( SelectHdl, void* ); + DECL_LINK_TYPED( SelectHdl, ListBox&, void ); }; class ScSolverProgressDialog : public ModelessDialog diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx index 07480b3d3187..2e74c0a8e809 100644 --- a/sc/source/ui/inc/pfiltdlg.hxx +++ b/sc/source/ui/inc/pfiltdlg.hxx @@ -90,7 +90,7 @@ private: sal_uInt16 GetFieldSelPos ( SCCOL nField ); // Handler: - DECL_LINK( LbSelectHdl, ListBox* ); + DECL_LINK_TYPED( LbSelectHdl, ListBox&, void ); DECL_LINK( ValModifyHdl, ComboBox* ); DECL_LINK_TYPED( CheckBoxHdl, Button*, void ); }; diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index ce2b8b6cbe68..c26316bd12d4 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -74,7 +74,7 @@ private: /** Searches for a listbox entry, starts search at specified position. */ sal_Int32 FindBaseItemPos( const OUString& rEntry, sal_Int32 nStartPos ) const; - DECL_LINK( SelectHdl, ListBox* ); + DECL_LINK_TYPED( SelectHdl, ListBox&, void ); DECL_LINK_TYPED( DblClickHdl, ListBox&, void ); private: @@ -153,7 +153,7 @@ private: DECL_LINK_TYPED( RadioClickHdl, Button*, void ); DECL_LINK_TYPED( CheckHdl, Button*, void ); - DECL_LINK( SelectHdl, ListBox* ); + DECL_LINK_TYPED( SelectHdl, ListBox&, void ); private: VclPtr m_pLbSortBy; diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx index e43a1fb7f1b7..097416347eba 100644 --- a/sc/source/ui/inc/scuiasciiopt.hxx +++ b/sc/source/ui/inc/scuiasciiopt.hxx @@ -100,12 +100,12 @@ private: void UpdateVertical(); inline bool Seek( sal_uLong nPos ); // synced to and from mnStreamPos - DECL_LINK( CharSetHdl, SvxTextEncodingBox* ); + DECL_LINK_TYPED( CharSetHdl, ListBox&, void ); DECL_LINK( FirstRowHdl, NumericField* ); DECL_LINK_TYPED( RbSepFixHdl, Button*, void ); DECL_LINK( SeparatorHdl, Control* ); DECL_LINK_TYPED( SeparatorClickHdl, Button*, void ); - DECL_LINK( LbColTypeHdl, ListBox* ); + DECL_LINK_TYPED( LbColTypeHdl, ListBox&, void ); DECL_LINK_TYPED( UpdateTextHdl, ScCsvTableBox&, void ); DECL_LINK_TYPED( ColTypeHdl, ScCsvTableBox&, void ); }; diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx index 8ff70de3eec3..d599d4b1c5bf 100644 --- a/sc/source/ui/inc/scuiautofmt.hxx +++ b/sc/source/ui/inc/scuiautofmt.hxx @@ -65,7 +65,7 @@ private: DECL_LINK_TYPED( CheckHdl, Button*, void ); DECL_LINK_TYPED( AddHdl, Button*, void ); DECL_LINK_TYPED( RemoveHdl, Button*, void ); - DECL_LINK( SelFmtHdl, void * ); + DECL_LINK_TYPED( SelFmtHdl, ListBox&, void ); DECL_LINK_TYPED( CloseHdl, Button *, void ); DECL_LINK_TYPED( DblClkHdl, ListBox&, void ); DECL_LINK_TYPED( RenameHdl, Button*, void ); diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx index 4e9e06b71c62..44b583b123f1 100644 --- a/sc/source/ui/inc/scuitphfedit.hxx +++ b/sc/source/ui/inc/scuitphfedit.hxx @@ -97,7 +97,7 @@ private: bool IsPageEntry(EditEngine*pEngine, EditTextObject* pTextObj); static bool IsDateEntry(EditTextObject* pTextObj); static bool IsExtFileNameEntry(EditTextObject* pTextObj); - DECL_LINK( ListHdl_Impl, ListBox* ); + DECL_LINK_TYPED( ListHdl_Impl, ListBox&, void); DECL_LINK_TYPED( ClickHdl, Button*, void ); DECL_STATIC_LINK_TYPED( ScHFEditPage, MenuHdl, ScExtIButton&, void ); }; diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx index c2bcbb4c6b7b..6d0efd43dfc4 100644 --- a/sc/source/ui/inc/solveroptions.hxx +++ b/sc/source/ui/inc/solveroptions.hxx @@ -45,7 +45,7 @@ class ScSolverOptionsDialog : public ModalDialog OUString maEngine; com::sun::star::uno::Sequence maProperties; - DECL_LINK( EngineSelectHdl, void* ); + DECL_LINK_TYPED( EngineSelectHdl, ListBox&, void ); DECL_LINK_TYPED( SettingsSelHdl, SvTreeListBox*, void ); DECL_LINK_TYPED( SettingsDoubleClickHdl, SvTreeListBox*, bool ); DECL_LINK_TYPED( ButtonHdl, Button*, void ); diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx index d642b2bea328..8ce953db4c86 100644 --- a/sc/source/ui/inc/tpsort.hxx +++ b/sc/source/ui/inc/tpsort.hxx @@ -94,7 +94,7 @@ private: void SetLastSortKey( sal_uInt16 nItem ); // Handler ------------------------ - DECL_LINK( SelectHdl, ListBox * ); + DECL_LINK_TYPED( SelectHdl, ListBox&, void ); }; // Sort Options @@ -165,10 +165,10 @@ private: // Handler ------------------------ DECL_LINK_TYPED( EnableHdl, Button*, void ); - DECL_LINK( SelOutPosHdl, ListBox * ); + DECL_LINK_TYPED( SelOutPosHdl, ListBox&, void ); void EdOutPosModHdl ( Edit* pEd ); DECL_LINK_TYPED( SortDirHdl, Button *, void ); - DECL_LINK( FillAlgorHdl, void * ); + DECL_LINK_TYPED( FillAlgorHdl, ListBox&, void ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_TPSORT_HXX diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx index 627f176dca5a..d6fdccc35e48 100644 --- a/sc/source/ui/inc/tpsubt.hxx +++ b/sc/source/ui/inc/tpsubt.hxx @@ -70,9 +70,10 @@ private: sal_uInt16 GetFieldSelPos ( SCCOL nField ); // Handler ------------------------ - DECL_LINK( SelectHdl, void* ); + DECL_LINK_TYPED( SelectListBoxHdl, ListBox&, void ); DECL_LINK_TYPED( SelectTreeListBoxHdl, SvTreeListBox*, void ); DECL_LINK_TYPED( CheckHdl, SvTreeListBox*, void ); + void SelectHdl(void *); }; class ScTpSubTotalGroup1 : public ScTpSubTotalGroup diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx index a7babb368e2a..f46c6fc2c109 100644 --- a/sc/source/ui/inc/tptable.hxx +++ b/sc/source/ui/inc/tptable.hxx @@ -75,7 +75,7 @@ private: // Handler: DECL_LINK_TYPED(PageDirHdl, Button*, void); DECL_LINK_TYPED( PageNoHdl, Button*, void ); - DECL_LINK(ScaleHdl, void *); + DECL_LINK_TYPED(ScaleHdl, ListBox&, void); }; #endif // INCLUDED_SC_SOURCE_UI_INC_TPTABLE_HXX diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx index 8195c7d45c23..70c5e769169a 100644 --- a/sc/source/ui/inc/tpusrlst.hxx +++ b/sc/source/ui/inc/tpusrlst.hxx @@ -95,7 +95,7 @@ private: const ScRefAddress& rEndPos ); // Handler: - DECL_LINK( LbSelectHdl, ListBox* ); + DECL_LINK_TYPED( LbSelectHdl, ListBox&, void ); DECL_LINK_TYPED( BtnClickHdl, Button*, void ); DECL_LINK( EdEntriesModHdl, VclMultiLineEdit* ); }; diff --git a/sc/source/ui/inc/tpview.hxx b/sc/source/ui/inc/tpview.hxx index 96d1e1b7acbe..288fda0b2428 100644 --- a/sc/source/ui/inc/tpview.hxx +++ b/sc/source/ui/inc/tpview.hxx @@ -61,8 +61,8 @@ class ScTpContentOptions : public SfxTabPage ScViewOptions* pLocalOptions; void InitGridOpt(); - DECL_LINK( GridHdl, ListBox* ); - DECL_LINK( SelLbObjHdl, ListBox* ); + DECL_LINK_TYPED( GridHdl, ListBox&, void ); + DECL_LINK_TYPED( SelLbObjHdl, ListBox&, void ); DECL_LINK_TYPED( CBHdl, Button*, void ); ScTpContentOptions( vcl::Window* pParent, @@ -106,7 +106,7 @@ class ScTpLayoutOptions : public SfxTabPage SvxStringArray aUnitArr; - DECL_LINK(MetricHdl, void *); + DECL_LINK_TYPED(MetricHdl, ListBox&, void ); DECL_LINK_TYPED( AlignHdl, Button*, void ); ScDocument *pDoc; diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx index 9251a899771f..c86719d80985 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -100,7 +100,7 @@ private: void SetFirstFormula( const OUString& rFmlaStr ); void SetSecondFormula( const OUString& rFmlaStr ); - DECL_LINK(SelectHdl, void *); + DECL_LINK_TYPED(SelectHdl, ListBox&, void); DECL_LINK_TYPED(CheckHdl, Button*, void); VclPtr m_pLbAllow; @@ -272,9 +272,6 @@ private: void Init(); - // Handler ------------------------ - // DECL_LINK( SelectHdl, ListBox * ); - public: ScTPValidationHelp( vcl::Window* pParent, const SfxItemSet& rArgSet ); virtual ~ScTPValidationHelp(); @@ -298,7 +295,7 @@ private: void Init(); // Handler ------------------------ - DECL_LINK(SelectActionHdl, void *); + DECL_LINK_TYPED(SelectActionHdl, ListBox&, void); DECL_LINK_TYPED(ClickSearchHdl, Button*, void); public: diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index 5cd874c5e8f1..169e4bf05acf 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -153,7 +153,7 @@ void ScColRowNameRangesDlg::Init() pEdAssign->GrabFocus(); pRbAssign->Enable(); - Range1SelectHdl( 0 ); + Range1SelectHdl( *pLbRange.get() ); } // set data range of a labeled range to default values and set the @@ -563,7 +563,7 @@ IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, AddBtnHdl, Button*, void) pEdAssign2->SetText( EMPTY_OUSTRING ); theCurArea = ScRange(); theCurData = theCurArea; - Range1SelectHdl( 0 ); + Range1SelectHdl( *pLbRange.get() ); } else { @@ -631,13 +631,13 @@ IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, RemoveBtnHdl, Button*, void) pBtnColHead->Check(); pBtnRowHead->Check( false ); pEdAssign2->SetText( EMPTY_OUSTRING ); - Range1SelectHdl( 0 ); + Range1SelectHdl( *pLbRange.get() ); } } } // handler called when a row in the listbox is selected, updates form input fields -IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1SelectHdl) +IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, Range1SelectHdl, ListBox&, void) { sal_Int32 nSelectPos = pLbRange->GetSelectEntryPos(); const sal_Int32 nCnt = pLbRange->GetEntryCount(); @@ -702,8 +702,6 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1SelectHdl) pEdAssign->Enable(); pRbAssign->Enable(); - - return 0; } // handler called when the label range has changed diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index 8cef9ad6f2d6..683ccd3d9dbb 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -286,10 +286,9 @@ IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, BrowseHdl_Impl, Button*, void) pDocInserter->StartExecuteModal( LINK( this, ScInsertTableDlg, DialogClosedHdl ) ); } -IMPL_LINK_NOARG(ScInsertTableDlg, SelectHdl_Impl) +IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, SelectHdl_Impl, ListBox&, void) { DoEnable_Impl(); - return 0; } void ScInsertTableDlg::DoEnable_Impl() diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index d5f5b01fee4d..b7eae20364d3 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -197,10 +197,9 @@ void ScLinkedAreaDlg::InitFromOldLink( const OUString& rFile, const OUString& rF UpdateEnable(); } -IMPL_LINK_NOARG(ScLinkedAreaDlg, RangeHdl) +IMPL_LINK_NOARG_TYPED(ScLinkedAreaDlg, RangeHdl, ListBox&, void) { UpdateEnable(); - return 0; } IMPL_LINK_NOARG_TYPED(ScLinkedAreaDlg, ReloadHdl, Button*, void) diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index e1f9226ae5d9..cc7f92ebe6f5 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -211,7 +211,7 @@ void ScMoveTableDlg::Init() pEdTabName->Enable(false); pFtWarn->Hide(); InitDocListBox(); - SelHdl( pLbDoc ); + SelHdl( *pLbDoc.get() ); } void ScMoveTableDlg::InitDocListBox() @@ -294,9 +294,9 @@ IMPL_LINK_NOARG_TYPED(ScMoveTableDlg, OkHdl, Button*, void) EndDialog( RET_OK ); } -IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb ) +IMPL_LINK_TYPED( ScMoveTableDlg, SelHdl, ListBox&, rLb, void ) { - if ( pLb == pLbDoc ) + if ( &rLb == pLbDoc ) { ScDocument* pDoc = GetSelectedDoc(); OUString aName; @@ -317,8 +317,6 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb ) pLbTable->SelectEntryPos( 0 ); ResetRenameInput(); } - - return 0; } IMPL_LINK( ScMoveTableDlg, CheckNameHdl, Edit *, pEdt ) diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 35286f880f73..77fb82af60cc 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -716,12 +716,11 @@ IMPL_LINK_NOARG(ScOptSolverDlg, CondModifyHdl) return 0; } -IMPL_LINK_NOARG(ScOptSolverDlg, SelectHdl) +IMPL_LINK_NOARG_TYPED(ScOptSolverDlg, SelectHdl, ListBox&, void) { // select handler for operator list boxes, just to enable/disable "delete" buttons ReadConditions(); EnableButtons(); - return 0; } IMPL_LINK_NOARG_TYPED(ScOptSolverDlg, ScrollHdl, ScrollBar*, void) diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index 73ea8a542b18..e8190e49cc17 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -251,7 +251,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, AddHdl, Button*, void) bCoreDataChanged = true; } - SelFmtHdl( 0 ); + SelFmtHdl( *m_pLbFormat.get() ); bOk = true; } else @@ -305,11 +305,11 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RemoveHdl, Button*, void) pFormat->erase(it); nIndex--; - SelFmtHdl( 0 ); + SelFmtHdl( *m_pLbFormat.get() ); } } - SelFmtHdl( 0 ); + SelFmtHdl( *m_pLbFormat.get() ); } IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RenameHdl, Button*, void) @@ -374,7 +374,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RenameHdl, Button*, void) bCoreDataChanged = true; } - SelFmtHdl( 0 ); + SelFmtHdl( *m_pLbFormat.get() ); bOk = true; bFmtRenamed = true; } @@ -393,7 +393,7 @@ IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RenameHdl, Button*, void) } } -IMPL_LINK_NOARG(ScAutoFormatDlg, SelFmtHdl) +IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, SelFmtHdl, ListBox&, void) { nIndex = m_pLbFormat->GetSelectEntryPos(); UpdateChecks(); @@ -411,8 +411,6 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, SelFmtHdl) ScAutoFormatData* p = pFormat->findByIndex(nIndex); m_pWndPreview->NotifyChange(p); - - return 0; } OUString ScAutoFormatDlg::GetCurrFormatName() diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index e01a7a9fef0c..fb58e94c290d 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -361,7 +361,7 @@ IMPL_LINK_NOARG_TYPED(ScSolverOptionsDialog, SettingsDoubleClickHdl, SvTreeListB return false; } -IMPL_LINK_NOARG(ScSolverOptionsDialog, EngineSelectHdl) +IMPL_LINK_NOARG_TYPED(ScSolverOptionsDialog, EngineSelectHdl, ListBox&, void) { const sal_Int32 nSelectPos = m_pLbEngine->GetSelectEntryPos(); if ( nSelectPos < maImplNames.getLength() ) @@ -374,7 +374,6 @@ IMPL_LINK_NOARG(ScSolverOptionsDialog, EngineSelectHdl) FillListBox(); // using maProperties } } - return 0; } IMPL_LINK_NOARG_TYPED(ScSolverOptionsDialog, SettingsSelHdl, SvTreeListBox*, void) diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index be5178409d9f..7e5fdd9c044b 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -524,10 +524,9 @@ IMPL_LINK_NOARG_TYPED(ScNameDlg, SelectionChangedHdl_Impl, SvTreeListBox*, void) SelectionChanged(); } -IMPL_LINK_NOARG(ScNameDlg, ScopeChangedHdl) +IMPL_LINK_NOARG_TYPED(ScNameDlg, ScopeChangedHdl, ListBox&, void) { ScopeChanged(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 72b962ec569d..bef3220fc23b 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -222,18 +222,15 @@ IMPL_LINK_TYPED(ScCalcOptionsDialog, AsZeroModifiedHdl, Button*, pCheckBox, void maConfig.mbEmptyStringAsZero = mbSelectedEmptyStringAsZero = static_cast(pCheckBox)->IsChecked(); } -IMPL_LINK(ScCalcOptionsDialog, ConversionModifiedHdl, ListBox*, pConv ) +IMPL_LINK_TYPED(ScCalcOptionsDialog, ConversionModifiedHdl, ListBox&, rConv, void ) { - - maConfig.meStringConversion = (ScCalcConfig::StringConversion)pConv->GetSelectEntryPos(); + maConfig.meStringConversion = (ScCalcConfig::StringConversion)rConv.GetSelectEntryPos(); CoupleEmptyAsZeroToStringConversion(); - return 0; } -IMPL_LINK(ScCalcOptionsDialog, SyntaxModifiedHdl, ListBox*, pSyntax) +IMPL_LINK_TYPED(ScCalcOptionsDialog, SyntaxModifiedHdl, ListBox&, rSyntax, void) { - maConfig.SetStringRefSyntax(toAddressConvention(pSyntax->GetSelectEntryPos())); - return 0; + maConfig.SetStringRefSyntax(toAddressConvention(rSyntax.GetSelectEntryPos())); } IMPL_LINK_TYPED(ScCalcOptionsDialog, CBUseOpenCLHdl, Button*, pCheckBox, void) diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx index f7a2040d6657..7f9923bda8f3 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.hxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx @@ -43,8 +43,8 @@ public: DECL_LINK( EditModifiedHdl, Edit * ); DECL_STATIC_LINK_TYPED( ScCalcOptionsDialog, TestClickHdl, Button*, void ); DECL_LINK_TYPED( AsZeroModifiedHdl, Button*, void); - DECL_LINK( ConversionModifiedHdl, ListBox*); - DECL_LINK( SyntaxModifiedHdl, ListBox*); + DECL_LINK_TYPED( ConversionModifiedHdl, ListBox&, void); + DECL_LINK_TYPED( SyntaxModifiedHdl, ListBox&, void); DECL_LINK_TYPED( CBUseOpenCLHdl, Button*, void); DECL_LINK( SpinOpenCLMinSizeHdl, NumericField*); diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index 2c96167fb022..864b871db90b 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -457,9 +457,9 @@ void ScTpUserLists::RemoveList( size_t nList ) // Handler: -IMPL_LINK( ScTpUserLists, LbSelectHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScTpUserLists, LbSelectHdl, ListBox&, rLb, void ) { - if ( pLb == mpLbLists ) + if ( &rLb == mpLbLists ) { sal_Int32 nSelPos = mpLbLists->GetSelectEntryPos(); if ( nSelPos != LISTBOX_ENTRY_NOTFOUND ) @@ -476,8 +476,6 @@ IMPL_LINK( ScTpUserLists, LbSelectHdl, ListBox*, pLb ) UpdateEntries( nSelPos ); } } - - return 0; } IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) @@ -515,7 +513,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) if ( mpLbLists->GetEntryCount() > 0 ) { mpLbLists->SelectEntryPos( nCancelPos ); - LbSelectHdl( mpLbLists ); + LbSelectHdl( *mpLbLists.get() ); mpFtLists->Enable(); mpLbLists->Enable(); } @@ -552,7 +550,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) AddNewList( theEntriesStr ); UpdateUserListBox(); mpLbLists->SelectEntryPos( mpLbLists->GetEntryCount()-1 ); - LbSelectHdl( mpLbLists ); + LbSelectHdl( *mpLbLists.get() ); mpFtLists->Enable(); mpLbLists->Enable(); } @@ -561,7 +559,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) if ( mpLbLists->GetEntryCount() > 0 ) { mpLbLists->SelectEntryPos( nCancelPos ); - LbSelectHdl( mpLbLists ); + LbSelectHdl( *mpLbLists.get() ); mpLbLists->Enable(); mpLbLists->Enable(); } @@ -589,7 +587,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) else { mpLbLists->SelectEntryPos( 0 ); - LbSelectHdl( mpLbLists ); + LbSelectHdl( *mpLbLists.get() ); } mpBtnNew->Show(); @@ -636,7 +634,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) ( nRemovePos >= mpLbLists->GetEntryCount() ) ? mpLbLists->GetEntryCount()-1 : nRemovePos ); - LbSelectHdl( mpLbLists ); + LbSelectHdl( *mpLbLists.get() ); } else { @@ -693,7 +691,7 @@ IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) CopyListFromArea( theStartPos, theEndPos ); UpdateUserListBox(); mpLbLists->SelectEntryPos( mpLbLists->GetEntryCount()-1 ); - LbSelectHdl( mpLbLists ); + LbSelectHdl( *mpLbLists.get() ); mpEdCopyFrom->SetText( theAreaStr ); mpEdCopyFrom->Disable(); mpBtnCopy->Disable(); diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index c2db50993c06..740702a5d2e2 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -69,7 +69,7 @@ ScTpContentOptions::ScTpContentOptions( vcl::Window* pParent, get(pOutlineCB,"outline"); SetExchangeSupport(); - Link<> aSelObjHdl(LINK( this, ScTpContentOptions, SelLbObjHdl ) ); + Link aSelObjHdl(LINK( this, ScTpContentOptions, SelLbObjHdl ) ); pObjGrfLB-> SetSelectHdl(aSelObjHdl); pDiagramLB-> SetSelectHdl(aSelObjHdl); pDrawLB-> SetSelectHdl(aSelObjHdl); @@ -244,20 +244,18 @@ SfxTabPage::sfxpg ScTpContentOptions::DeactivatePage( SfxItemSet* pSetP ) return SfxTabPage::LEAVE_PAGE; } -IMPL_LINK( ScTpContentOptions, SelLbObjHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScTpContentOptions, SelLbObjHdl, ListBox&, rLb, void ) { - const sal_Int32 nSelPos = pLb->GetSelectEntryPos(); + const sal_Int32 nSelPos = rLb.GetSelectEntryPos(); ScVObjMode eMode = ScVObjMode(nSelPos); ScVObjType eType = VOBJ_TYPE_OLE; - if ( pLb == pDiagramLB ) + if ( &rLb == pDiagramLB ) eType = VOBJ_TYPE_CHART; - else if ( pLb == pDrawLB ) + else if ( &rLb == pDrawLB ) eType = VOBJ_TYPE_DRAW; pLocalOptions->SetObjMode( eType, eMode ); - - return 0; } IMPL_LINK_TYPED( ScTpContentOptions, CBHdl, Button*, pBtn, void ) @@ -358,9 +356,9 @@ void ScTpContentOptions::InitGridOpt() pColorLB->SelectEntryPos( pColorLB->InsertEntry( aCol, aName ) ); } -IMPL_LINK( ScTpContentOptions, GridHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScTpContentOptions, GridHdl, ListBox&, rLb, void ) { - sal_Int32 nSelPos = pLb->GetSelectEntryPos(); + sal_Int32 nSelPos = rLb.GetSelectEntryPos(); bool bGrid = ( nSelPos <= 1 ); bool bGridOnTop = ( nSelPos == 1 ); @@ -368,7 +366,6 @@ IMPL_LINK( ScTpContentOptions, GridHdl, ListBox*, pLb ) pColorLB->Enable(bGrid); pLocalOptions->SetOption( VOPT_GRID, bGrid ); pLocalOptions->SetOption( VOPT_GRID_ONTOP, bGridOnTop ); - return 0; } ScTpLayoutOptions::ScTpLayoutOptions( vcl::Window* pParent, @@ -681,7 +678,7 @@ SfxTabPage::sfxpg ScTpLayoutOptions::DeactivatePage( SfxItemSet* pSetP ) return SfxTabPage::LEAVE_PAGE; } -IMPL_LINK_NOARG(ScTpLayoutOptions, MetricHdl) +IMPL_LINK_NOARG_TYPED(ScTpLayoutOptions, MetricHdl, ListBox&, void) { const sal_Int32 nMPos = m_pUnitLB->GetSelectEntryPos(); if(nMPos != LISTBOX_ENTRY_NOTFOUND) @@ -692,8 +689,6 @@ IMPL_LINK_NOARG(ScTpLayoutOptions, MetricHdl) ::SetFieldUnit( *m_pTabMF, eFieldUnit ); m_pTabMF->SetValue( m_pTabMF->Normalize( nVal ), FUNIT_TWIP ); } - - return 0; } IMPL_LINK_TYPED( ScTpLayoutOptions, AlignHdl, Button*, pBox, void ) diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 334a8d4b9882..5d9c573117f6 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -539,8 +539,9 @@ IMPL_LINK_TYPED( ScPrintAreasDlg, Impl_GetFocusHdl, Control&, rCtrl, void ) } } -IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, ListBox*, pLb ) +IMPL_LINK_TYPED( ScPrintAreasDlg, Impl_SelectHdl, ListBox&, rLb, void ) { + ListBox* pLb = &rLb; const sal_Int32 nSelPos = pLb->GetSelectEntryPos(); Edit* pEd = NULL; @@ -562,7 +563,7 @@ IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, ListBox*, pLb ) else if( pLb == pLbRepeatRow ) pEd = pEdRepeatRow; else - return 0; + return; // fill edit field according to list box selection if( (nSelPos == 0) || (nSelPos == nAllSheetPos) ) @@ -571,8 +572,6 @@ IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, ListBox*, pLb ) pLb->SelectEntryPos( 0 ); else if( nSelPos >= nFirstCustomPos ) pEd->SetText( *static_cast< OUString* >( pLb->GetEntryData( nSelPos ) ) ); - - return 0; } IMPL_LINK( ScPrintAreasDlg, Impl_ModifyHdl, formula::RefEdit*, pEd ) diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx index 2fb3a486d794..d33cea554748 100644 --- a/sc/source/ui/pagedlg/scuitphfedit.cxx +++ b/sc/source/ui/pagedlg/scuitphfedit.cxx @@ -771,9 +771,9 @@ void ScHFEditPage::ClearTextAreas() // Handler: -IMPL_LINK( ScHFEditPage, ListHdl_Impl, ListBox*, pList ) +IMPL_LINK_TYPED( ScHFEditPage, ListHdl_Impl, ListBox&, rList, void ) { - if ( pList && pList == m_pLbDefined ) + if ( &rList == m_pLbDefined ) { ScHFEntryId eSel = static_cast(m_pLbDefined->GetSelectEntryPos()); if(!m_pLbDefined->IsTravelSelect()) @@ -789,7 +789,6 @@ IMPL_LINK( ScHFEditPage, ListHdl_Impl, ListBox*, pList ) ProcessDefinedListSel(eSel, true); } } - return 0; } IMPL_LINK_TYPED( ScHFEditPage, ClickHdl, Button*, pBtn, void ) diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index f65472fd8405..d0776bdfd3ba 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -67,7 +67,6 @@ static bool lcl_PutBoolItem( sal_uInt16 nWhich, #define PAGENO_HDL LINK(this,ScTablePage,PageNoHdl) #define PAGEDIR_HDL LINK(this,ScTablePage,PageDirHdl) -#define SCALE_HDL LINK(this,ScTablePage,ScaleHdl) #define WAS_DEFAULT(w,s) (SfxItemState::DEFAULT==(s).GetItemState((w),true)) #define GET_BOOL(sid,set) static_cast((set).Get(GetWhich((sid)))).GetValue() @@ -112,7 +111,7 @@ ScTablePage::ScTablePage( vcl::Window* pParent, const SfxItemSet& rCoreAttrs ) : m_pBtnPageNo->SetClickHdl( PAGENO_HDL ); m_pBtnTopDown->SetClickHdl( PAGEDIR_HDL ); m_pBtnLeftRight->SetClickHdl( PAGEDIR_HDL ); - m_pLbScaleMode->SetSelectHdl( SCALE_HDL ); + m_pLbScaleMode->SetSelectHdl( LINK(this,ScTablePage,ScaleHdl) ); } @@ -228,7 +227,7 @@ void ScTablePage::Reset( const SfxItemSet* rCoreSet ) } PageDirHdl( NULL ); - ScaleHdl( NULL ); + ScaleHdl( *m_pLbScaleMode.get() ); // remember for FillItemSet m_pBtnFormulas->SaveValue(); @@ -376,7 +375,7 @@ IMPL_LINK_TYPED( ScTablePage, PageNoHdl, Button*, pBtn, void ) m_pEdPageNo->Disable(); } -IMPL_LINK_NOARG(ScTablePage, ScaleHdl) +IMPL_LINK_NOARG_TYPED(ScTablePage, ScaleHdl, ListBox&, void) { // controls for Box "Reduce/enlarge" m_pBxScaleAll->Show(m_pLbScaleMode->GetSelectEntryPos() == SC_TPTABLE_SCALE_PERCENT); @@ -386,8 +385,6 @@ IMPL_LINK_NOARG(ScTablePage, ScaleHdl) // controls for Box "Scale to pages" m_pBxScalePageNum->Show(m_pLbScaleMode->GetSelectEntryPos() == SC_TPTABLE_SCALE_TO_PAGES); - - return 0; } // Helper functions for FillItemSet: diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index 31a4a0671190..fa97da227d22 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -87,13 +87,12 @@ void NumberFormatPropertyPanel::dispose() void NumberFormatPropertyPanel::Initialize() { - Link<> aLink = LINK(this, NumberFormatPropertyPanel, NumFormatSelectHdl); - mpLbCategory->SetSelectHdl ( aLink ); + mpLbCategory->SetSelectHdl ( LINK(this, NumberFormatPropertyPanel, NumFormatSelectHdl) ); mpLbCategory->SelectEntryPos(0); mpLbCategory->SetAccessibleName(OUString( "Category")); mpLbCategory->SetDropDownLineCount(mpLbCategory->GetEntryCount()); - aLink = LINK(this, NumberFormatPropertyPanel, NumFormatValueHdl); + Link<> aLink = LINK(this, NumberFormatPropertyPanel, NumFormatValueHdl); mpEdDecimals->SetModifyHdl( aLink ); mpEdLeadZeroes->SetModifyHdl( aLink ); @@ -106,16 +105,15 @@ void NumberFormatPropertyPanel::Initialize() mpTBCategory->SetAccessibleRelationLabeledBy(mpTBCategory); } -IMPL_LINK( NumberFormatPropertyPanel, NumFormatSelectHdl, ListBox*, pBox ) +IMPL_LINK_TYPED( NumberFormatPropertyPanel, NumFormatSelectHdl, ListBox&, rBox, void ) { - const sal_Int32 nVal = pBox->GetSelectEntryPos(); + const sal_Int32 nVal = rBox.GetSelectEntryPos(); if( nVal != mnCategorySelected ) { SfxUInt16Item aItem( SID_NUMBER_TYPE_FORMAT, nVal ); GetBindings()->GetDispatcher()->Execute(SID_NUMBER_TYPE_FORMAT, SfxCallMode::RECORD, &aItem, 0L); mnCategorySelected = nVal; } - return 0L; } IMPL_LINK_NOARG_TYPED( NumberFormatPropertyPanel, NumFormatValueClickHdl, Button*, void ) diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx index efda9627f322..b03b6d0df97d 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx @@ -83,7 +83,7 @@ private: ::sfx2::sidebar::EnumContext maContext; SfxBindings* mpBindings; - DECL_LINK(NumFormatSelectHdl, ListBox*); + DECL_LINK_TYPED(NumFormatSelectHdl, ListBox&, void); DECL_LINK(NumFormatValueHdl, void*); DECL_LINK_TYPED(NumFormatValueClickHdl, Button*, void); -- cgit v1.2.3