diff options
author | Noel Grandin <noel@peralex.com> | 2015-08-19 09:11:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-08-26 11:15:35 +0200 |
commit | 167bc621ef825ed5b961502fe9324a675ee34e42 (patch) | |
tree | 523838d8adc14a62f846529ee6eab3343b2fe87b /sc/source/ui | |
parent | 46a27805fb707544a844a961a3743b8b992282f0 (diff) |
Convert vcl Button Link<> click handler to typed Link<Button*,void>
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
Diffstat (limited to 'sc/source/ui')
135 files changed, 346 insertions, 495 deletions
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx index c49944920c6d..ff9b751c9590 100644 --- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx @@ -326,23 +326,20 @@ void ScRandomNumberGeneratorDialog::GenerateNumbers(RNG& randomGenerator, const pDocShell->PostPaint( maInputRange, PAINT_GRID ); } -IMPL_LINK( ScRandomNumberGeneratorDialog, OkClicked, PushButton*, /*pButton*/ ) +IMPL_LINK_NOARG_TYPED( ScRandomNumberGeneratorDialog, OkClicked, Button*, void ) { ApplyClicked(NULL); CloseClicked(NULL); - return 0; } -IMPL_LINK( ScRandomNumberGeneratorDialog, ApplyClicked, PushButton*, /*pButton*/ ) +IMPL_LINK_NOARG_TYPED( ScRandomNumberGeneratorDialog, ApplyClicked, Button*, void ) { SelectGeneratorAndGenerateNumbers(); - return 0; } -IMPL_LINK( ScRandomNumberGeneratorDialog, CloseClicked, PushButton*, /*pButton*/ ) +IMPL_LINK_NOARG_TYPED( ScRandomNumberGeneratorDialog, CloseClicked, Button*, void ) { Close(); - return 0; } IMPL_LINK( ScRandomNumberGeneratorDialog, GetFocusHandler, Control*, pCtrl ) diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx index 529e9a91e65e..4afc721cd27d 100644 --- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx @@ -288,11 +288,10 @@ void ScSamplingDialog::PerformSampling() pDocShell->PostPaint(aModifiedRange, PAINT_GRID); } -IMPL_LINK( ScSamplingDialog, OkClicked, PushButton*, /*pButton*/ ) +IMPL_LINK_NOARG_TYPED( ScSamplingDialog, OkClicked, Button*, void ) { PerformSampling(); Close(); - return 0; } IMPL_LINK( ScSamplingDialog, GetFocusHandler, Control*, pCtrl ) diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx index 52241feded99..536bdc42a0f6 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx @@ -192,11 +192,10 @@ void ScStatisticsInputOutputDialog::SetReference( const ScRange& rReferenceRange mpButtonOk->Disable(); } -IMPL_LINK( ScStatisticsInputOutputDialog, OkClicked, PushButton*, /*pButton*/ ) +IMPL_LINK_NOARG_TYPED( ScStatisticsInputOutputDialog, OkClicked, Button*, void ) { CalculateInputAndWriteToOutput(); Close(); - return 0; } IMPL_LINK( ScStatisticsInputOutputDialog, GetFocusHandler, Control*, pCtrl ) diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx index 109fda90d6cc..9b629cfd6245 100644 --- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx @@ -205,11 +205,10 @@ void ScStatisticsTwoVariableDialog::SetReference( const ScRange& rReferenceRange mpButtonOk->Disable(); } -IMPL_LINK( ScStatisticsTwoVariableDialog, OkClicked, PushButton*, /*pButton*/ ) +IMPL_LINK_NOARG_TYPED( ScStatisticsTwoVariableDialog, OkClicked, Button*, void ) { CalculateInputAndWriteToOutput(); Close(); - return 0; } IMPL_LINK( ScStatisticsTwoVariableDialog, GetFocusHandler, Control*, pCtrl ) diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 2d50b0b901dc..9601a748b7b5 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1070,7 +1070,7 @@ void ScInputBarGroup::DecrementVerticalSize() } } -IMPL_LINK_NOARG(ScInputBarGroup, ClickHdl) +IMPL_LINK_NOARG_TYPED(ScInputBarGroup, ClickHdl, Button*, void) { vcl::Window* w = GetParent(); ScInputWindow* pParent; @@ -1079,7 +1079,7 @@ IMPL_LINK_NOARG(ScInputBarGroup, ClickHdl) if (pParent == NULL) { OSL_FAIL("The parent window pointer pParent is null"); - return 1; + return; } if (aMultiTextWnd->GetNumLines() > 1) { @@ -1094,7 +1094,6 @@ IMPL_LINK_NOARG(ScInputBarGroup, ClickHdl) // Restore focus to input line(s) if necessary if ( SC_MOD()->GetInputHdl()->IsTopMode() ) aMultiTextWnd->GrabFocus(); - return 0; } void ScInputBarGroup::TriggerToolboxLayout() diff --git a/sc/source/ui/attrdlg/tabpages.cxx b/sc/source/ui/attrdlg/tabpages.cxx index d75a976303a9..ba339e42ab85 100644 --- a/sc/source/ui/attrdlg/tabpages.cxx +++ b/sc/source/ui/attrdlg/tabpages.cxx @@ -159,9 +159,9 @@ SfxTabPage::sfxpg ScTabPageProtection::DeactivatePage( SfxItemSet* pSetP ) return LEAVE_PAGE; } -IMPL_LINK( ScTabPageProtection, ButtonClickHdl, TriStateBox*, pBox ) +IMPL_LINK_TYPED( ScTabPageProtection, ButtonClickHdl, Button*, pBox, void ) { - TriState eState = pBox->GetState(); + TriState eState = static_cast<TriStateBox*>(pBox)->GetState(); if ( eState == TRISTATE_INDET ) bDontCare = true; // everything combined at DontCare else @@ -184,8 +184,6 @@ IMPL_LINK( ScTabPageProtection, ButtonClickHdl, TriStateBox*, pBox ) } UpdateButtons(); // TriState and Logic-Enable - - return 0; } void ScTabPageProtection::UpdateButtons() diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx index a9fa128d92e5..ba1a7ad6c6a2 100644 --- a/sc/source/ui/cctrl/checklistmenu.cxx +++ b/sc/source/ui/cctrl/checklistmenu.cxx @@ -1177,7 +1177,7 @@ void ScCheckListMenuWindow::cycleFocus(bool bReverse) maTabStopCtrls[mnCurTabStop]->GrabFocus(); } -IMPL_LINK( ScCheckListMenuWindow, ButtonHdl, Button*, pBtn ) +IMPL_LINK_TYPED( ScCheckListMenuWindow, ButtonHdl, Button*, pBtn, void ) { if (pBtn == maBtnOk.get()) close(true); @@ -1191,10 +1191,9 @@ IMPL_LINK( ScCheckListMenuWindow, ButtonHdl, Button*, pBtn ) selectCurrentMemberOnly(false); CheckHdl(maChecks.get()); } - return 0; } -IMPL_LINK_NOARG(ScCheckListMenuWindow, TriStateHdl) +IMPL_LINK_NOARG_TYPED(ScCheckListMenuWindow, TriStateHdl, Button*, void) { switch (mePrevToggleAllState) { @@ -1214,7 +1213,6 @@ IMPL_LINK_NOARG(ScCheckListMenuWindow, TriStateHdl) } mePrevToggleAllState = maChkToggleAll->GetState(); - return 0; } IMPL_LINK_NOARG(ScCheckListMenuWindow, EdModifyHdl) diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx index cfae7b79c872..348ea068c4eb 100644 --- a/sc/source/ui/condformat/colorformat.cxx +++ b/sc/source/ui/condformat/colorformat.cxx @@ -244,7 +244,7 @@ ScDataBarFormatData* ScDataBarSettingsDlg::GetData() return pData; } -IMPL_LINK_NOARG( ScDataBarSettingsDlg, OkBtnHdl ) +IMPL_LINK_NOARG_TYPED( ScDataBarSettingsDlg, OkBtnHdl, Button*, void ) { //check that min < max bool bWarn = false; @@ -295,7 +295,6 @@ IMPL_LINK_NOARG( ScDataBarSettingsDlg, OkBtnHdl ) { EndDialog(RET_OK); } - return 0; } IMPL_LINK_NOARG( ScDataBarSettingsDlg, TypeSelectHdl ) diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 059aaf9df2b4..66b3bf589a8a 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -362,7 +362,7 @@ IMPL_LINK(ScCondFormatList, AfterTypeListHdl, ListBox*, pBox) return 0; } -IMPL_LINK_NOARG( ScCondFormatList, AddBtnHdl ) +IMPL_LINK_NOARG_TYPED( ScCondFormatList, AddBtnHdl, Button*, void ) { VclPtr<ScCondFrmtEntry> pNewEntry = VclPtr<ScConditionFrmtEntry>::Create(this, mpDoc, mpDialogParent, maPos); maEntries.push_back( pNewEntry ); @@ -373,10 +373,9 @@ IMPL_LINK_NOARG( ScCondFormatList, AddBtnHdl ) mpDialogParent->InvalidateRefData(); pNewEntry->SetActive(); RecalcAll(); - return 0; } -IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl ) +IMPL_LINK_NOARG_TYPED( ScCondFormatList, RemoveBtnHdl, Button*, void ) { for(EntryContainer::iterator itr = maEntries.begin(); itr != maEntries.end(); ++itr) { @@ -389,7 +388,6 @@ IMPL_LINK_NOARG( ScCondFormatList, RemoveBtnHdl ) } mpDialogParent->InvalidateRefData(); RecalcAll(); - return 0; } IMPL_LINK( ScCondFormatList, EntrySelectHdl, ScCondFrmtEntry*, pEntry ) @@ -798,13 +796,12 @@ IMPL_LINK( ScCondFormatDlg, RangeGetFocusHdl, formula::RefEdit*, pEdit ) // ------------------------------------------------------ // Conditional Format Dialog button click event handler. // -IMPL_LINK( ScCondFormatDlg, BtnPressedHdl, Button*, pBtn) +IMPL_LINK_TYPED( ScCondFormatDlg, BtnPressedHdl, Button*, pBtn, void) { if (pBtn == mpBtnOk) OkPressed(); else if (pBtn == mpBtnCancel) CancelPressed(); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 4365f946938e..7785c0dd81a0 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -1286,7 +1286,7 @@ IMPL_LINK_NOARG( ScDataBarFrmtEntry, DataBarTypeSelectHdl ) return 0; } -IMPL_LINK_NOARG( ScDataBarFrmtEntry, OptionBtnHdl ) +IMPL_LINK_NOARG_TYPED( ScDataBarFrmtEntry, OptionBtnHdl, Button*, void ) { SetColorScaleEntry(mpDataBarData->mpLowerLimit.get(), *maLbDataBarMinType.get(), *maEdDataBarMin.get(), mpDoc, maPos, true); SetColorScaleEntry(mpDataBarData->mpUpperLimit.get(), *maLbDataBarMaxType.get(), *maEdDataBarMax.get(), mpDoc, maPos, true); @@ -1298,7 +1298,6 @@ IMPL_LINK_NOARG( ScDataBarFrmtEntry, OptionBtnHdl ) SetDataBarEntryTypes(*mpDataBarData->mpUpperLimit, *maLbDataBarMaxType.get(), *maEdDataBarMax.get(), mpDoc); DataBarTypeSelectHdl(NULL); } - return 0; } ScDateFrmtEntry::ScDateFrmtEntry( vcl::Window* pParent, ScDocument* pDoc, const ScCondDateFormatEntry* pFormat ): diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx index 4b36a95378d1..0b0ab2ed1d80 100644 --- a/sc/source/ui/condformat/condformatmgr.cxx +++ b/sc/source/ui/condformat/condformatmgr.cxx @@ -119,7 +119,7 @@ ScCondFormatManagerDlg::ScCondFormatManagerDlg(vcl::Window* pParent, ScDocument* get(m_pBtnEdit, "edit"); m_pBtnRemove->SetClickHdl(LINK(this, ScCondFormatManagerDlg, RemoveBtnHdl)); - m_pBtnEdit->SetClickHdl(LINK(this, ScCondFormatManagerDlg, EditBtnHdl)); + m_pBtnEdit->SetClickHdl(LINK(this, ScCondFormatManagerDlg, EditBtnClickHdl)); m_pBtnAdd->SetClickHdl(LINK(this, ScCondFormatManagerDlg, AddBtnHdl)); m_pCtrlManager->SetDoubleClickHdl(LINK(this, ScCondFormatManagerDlg, EditBtnHdl)); } @@ -155,13 +155,16 @@ ScConditionalFormat* ScCondFormatManagerDlg::GetCondFormatSelected() return m_pCtrlManager->GetSelection(); } -IMPL_LINK_NOARG(ScCondFormatManagerDlg, RemoveBtnHdl) +IMPL_LINK_NOARG_TYPED(ScCondFormatManagerDlg, RemoveBtnHdl, Button*, void) { m_pCtrlManager->DeleteSelection(); mbModified = true; - return 0; } +IMPL_LINK_NOARG_TYPED(ScCondFormatManagerDlg, EditBtnClickHdl, Button*, void) +{ + EditBtnHdl(nullptr); +} IMPL_LINK_NOARG(ScCondFormatManagerDlg, EditBtnHdl) { ScConditionalFormat* pFormat = m_pCtrlManager->GetSelection(); @@ -174,11 +177,9 @@ IMPL_LINK_NOARG(ScCondFormatManagerDlg, EditBtnHdl) return 0; } -IMPL_LINK_NOARG(ScCondFormatManagerDlg, AddBtnHdl) +IMPL_LINK_NOARG_TYPED(ScCondFormatManagerDlg, AddBtnHdl, Button*, void) { EndDialog( DLG_RET_ADD ); - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx index 0512a142a3c5..72589c51c7b4 100644 --- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx +++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx @@ -644,17 +644,15 @@ bool ScPivotLayoutDialog::Close() return DoClose( ScPivotLayoutWrapper::GetChildWindowId() ); } -IMPL_LINK( ScPivotLayoutDialog, OKClicked, PushButton*, /*pButton*/ ) +IMPL_LINK_NOARG_TYPED( ScPivotLayoutDialog, OKClicked, Button*, void ) { ApplyChanges(); Close(); - return 0; } -IMPL_LINK( ScPivotLayoutDialog, CancelClicked, PushButton*, /*pButton*/ ) +IMPL_LINK_NOARG_TYPED( ScPivotLayoutDialog, CancelClicked, Button*, void ) { Close(); - return 0; } IMPL_LINK(ScPivotLayoutDialog, GetFocusHandler, Control*, pCtrl) diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 17092f568f88..c2cafd34d345 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -363,7 +363,7 @@ IMPL_LINK( ScConsolidateDlg, GetFocusHdl, Control*, pCtr ) return 0; } -IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl) +IMPL_LINK_NOARG_TYPED(ScConsolidateDlg, OkHdl, Button*, void) { sal_uInt16 nDataAreaCount = pLbConsAreas->GetEntryCount(); @@ -419,10 +419,9 @@ IMPL_LINK_NOARG(ScConsolidateDlg, OkHdl) } else Close(); // no area defined -> Cancel - return 0; } -IMPL_LINK( ScConsolidateDlg, ClickHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScConsolidateDlg, ClickHdl, Button*, pBtn, void ) { if ( pBtn == pBtnCancel ) Close(); @@ -484,7 +483,6 @@ IMPL_LINK( ScConsolidateDlg, ClickHdl, PushButton*, pBtn ) pLbConsAreas->RemoveEntry( pLbConsAreas->GetSelectEntryPos() ); pBtnRemove->Disable(); } - return 0; } IMPL_LINK( ScConsolidateDlg, SelectHdl, ListBox*, pLb ) diff --git a/sc/source/ui/dbgui/dapitype.cxx b/sc/source/ui/dbgui/dapitype.cxx index 35407ade36b8..b920e3a0a9a0 100644 --- a/sc/source/ui/dbgui/dapitype.cxx +++ b/sc/source/ui/dbgui/dapitype.cxx @@ -98,10 +98,9 @@ void ScDataPilotSourceTypeDlg::AppendNamedRange(const OUString& rName) } } -IMPL_LINK( ScDataPilotSourceTypeDlg, RadioClickHdl, RadioButton*, pBtn ) +IMPL_LINK_TYPED( ScDataPilotSourceTypeDlg, RadioClickHdl, Button*, pBtn, void ) { m_pLbNamedRange->Enable(pBtn == m_pBtnNamedRange); - return 0; } ScDataPilotServiceDlg::ScDataPilotServiceDlg( vcl::Window* pParent, diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 8854ecdd082c..4ebe1d0e89e7 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -394,7 +394,7 @@ bool ScDbNameDlg::IsRefInputMode() const // Handler: -IMPL_LINK_NOARG(ScDbNameDlg, OkBtnHdl) +IMPL_LINK_NOARG_TYPED(ScDbNameDlg, OkBtnHdl, Button*, void) { AddBtnHdl( 0 ); @@ -408,16 +408,14 @@ IMPL_LINK_NOARG(ScDbNameDlg, OkBtnHdl) } Close(); - return 0; } -IMPL_LINK_NOARG(ScDbNameDlg, CancelBtnHdl) +IMPL_LINK_NOARG_TYPED(ScDbNameDlg, CancelBtnHdl, Button*, void) { Close(); - return 0; } -IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl) +IMPL_LINK_NOARG_TYPED(ScDbNameDlg, AddBtnHdl, Button*, void) { OUString aNewName = comphelper::string::strip(m_pEdName->GetText(), ' '); OUString aNewArea = m_pEdAssign->GetText(); @@ -499,7 +497,6 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl) m_pEdName->GrabFocus(); } } - return 0; } namespace { @@ -517,7 +514,7 @@ public: } -IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl) +IMPL_LINK_NOARG_TYPED(ScDbNameDlg, RemoveBtnHdl, Button*, void) { OUString aStrEntry = m_pEdName->GetText(); ScDBCollection::NamedDBs& rDBs = aLocalDbCol.getNamedDBs(); @@ -566,7 +563,6 @@ IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl) NameModifyHdl( 0 ); } } - return 0; } IMPL_LINK_NOARG(ScDbNameDlg, NameModifyHdl) diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx index 7bbb0fd80985..0c1a9cefd906 100644 --- a/sc/source/ui/dbgui/dpgroupdlg.cxx +++ b/sc/source/ui/dbgui/dpgroupdlg.cxx @@ -92,7 +92,7 @@ void ScDPGroupEditHelper::SetValue( bool bAuto, double fValue ) ImplSetValue( fValue ); } -IMPL_LINK( ScDPGroupEditHelper, ClickHdl, RadioButton*, pButton ) +IMPL_LINK_TYPED( ScDPGroupEditHelper, ClickHdl, Button*, pButton, void ) { if( pButton == mpRbAuto ) { @@ -105,7 +105,6 @@ IMPL_LINK( ScDPGroupEditHelper, ClickHdl, RadioButton*, pButton ) mpEdValue->Enable(); mpEdValue->GrabFocus(); } - return 0; } ScDPNumGroupEditHelper::ScDPNumGroupEditHelper( @@ -332,7 +331,7 @@ sal_Int32 ScDPDateGroupDlg::GetDatePart() const return nDatePart; } -IMPL_LINK( ScDPDateGroupDlg, ClickHdl, RadioButton*, pButton ) +IMPL_LINK_TYPED( ScDPDateGroupDlg, ClickHdl, Button*, pButton, void ) { if( pButton == mpRbNumDays ) { @@ -351,7 +350,6 @@ IMPL_LINK( ScDPDateGroupDlg, ClickHdl, RadioButton*, pButton ) // disable OK button if no date part selected CheckHdl( mpLbUnits ); } - return 0; } IMPL_LINK( ScDPDateGroupDlg, CheckHdl, SvxCheckListBox*, pListBox ) diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index 3a3cf7a53e6a..23d2a08e6df9 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -707,7 +707,7 @@ bool ScFilterDlg::IsRefInputMode() const // Handler: -IMPL_LINK( ScFilterDlg, EndDlgHdl, Button*, pBtn ) +IMPL_LINK_TYPED( ScFilterDlg, EndDlgHdl, Button*, pBtn, void ) { if ( pBtn == pBtnOk ) { @@ -740,8 +740,6 @@ IMPL_LINK( ScFilterDlg, EndDlgHdl, Button*, pBtn ) { Close(); } - - return 0; } IMPL_LINK_NOARG(ScFilterDlg, MoreExpandedHdl) @@ -1023,7 +1021,7 @@ IMPL_LINK( ScFilterDlg, LbSelectHdl, ListBox*, pLb ) return 0; } -IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( ScFilterDlg, CheckBoxHdl, Button*, pBox, void ) { // Column headers: // Field list: Columnxx <-> column header string @@ -1057,8 +1055,6 @@ IMPL_LINK( ScFilterDlg, CheckBoxHdl, CheckBox*, pBox ) UpdateValueList( 3 ); UpdateValueList( 4 ); } - - return 0; } IMPL_LINK( ScFilterDlg, ValModifyHdl, ComboBox*, pEd ) diff --git a/sc/source/ui/dbgui/pfiltdlg.cxx b/sc/source/ui/dbgui/pfiltdlg.cxx index 18f2072731e2..42d25e6dc9ea 100644 --- a/sc/source/ui/dbgui/pfiltdlg.cxx +++ b/sc/source/ui/dbgui/pfiltdlg.cxx @@ -523,7 +523,7 @@ IMPL_LINK( ScPivotFilterDlg, LbSelectHdl, ListBox*, pLb ) return 0; } -IMPL_LINK( ScPivotFilterDlg, CheckBoxHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( ScPivotFilterDlg, CheckBoxHdl, Button*, pBox, void ) { // bei Gross-/Kleinschreibung die Werte-Listen aktualisieren @@ -542,8 +542,6 @@ IMPL_LINK( ScPivotFilterDlg, CheckBoxHdl, CheckBox*, pBox ) m_pEdVal2->SetText( aCurVal2 ); m_pEdVal3->SetText( aCurVal3 ); } - - return 0; } IMPL_LINK( ScPivotFilterDlg, ValModifyHdl, ComboBox*, pEd ) diff --git a/sc/source/ui/dbgui/pvfundlg.cxx b/sc/source/ui/dbgui/pvfundlg.cxx index d728f83b5d5b..3e9c012db054 100644 --- a/sc/source/ui/dbgui/pvfundlg.cxx +++ b/sc/source/ui/dbgui/pvfundlg.cxx @@ -523,10 +523,9 @@ void ScDPSubtotalDlg::Init( const ScDPLabelData& rLabelData, const ScPivotFuncDa mpBtnOptions->SetClickHdl( LINK( this, ScDPSubtotalDlg, ClickHdl ) ); } -IMPL_LINK( ScDPSubtotalDlg, RadioClickHdl, RadioButton*, pBtn ) +IMPL_LINK_TYPED( ScDPSubtotalDlg, RadioClickHdl, Button*, pBtn, void ) { mpLbFunc->Enable( pBtn == mpRbUser ); - return 0; } IMPL_LINK_NOARG(ScDPSubtotalDlg, DblClickHdl) @@ -535,7 +534,7 @@ IMPL_LINK_NOARG(ScDPSubtotalDlg, DblClickHdl) return 0; } -IMPL_LINK( ScDPSubtotalDlg, ClickHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScDPSubtotalDlg, ClickHdl, Button*, pBtn, void ) { if (pBtn == mpBtnOptions) { @@ -543,7 +542,6 @@ IMPL_LINK( ScDPSubtotalDlg, ClickHdl, PushButton*, pBtn ) if( pDlg->Execute() == RET_OK ) pDlg->FillLabelData( maLabelData ); } - return 0; } ScDPSubtotalOptDlg::ScDPSubtotalOptDlg( vcl::Window* pParent, ScDPObject& rDPObj, @@ -795,13 +793,12 @@ sal_Int32 ScDPSubtotalOptDlg::FindListBoxEntry( return bFound ? nPos : LISTBOX_ENTRY_NOTFOUND; } -IMPL_LINK( ScDPSubtotalOptDlg, RadioClickHdl, RadioButton*, pBtn ) +IMPL_LINK_TYPED( ScDPSubtotalOptDlg, RadioClickHdl, Button*, pBtn, void ) { m_pLbSortBy->Enable( pBtn != m_pRbSortMan ); - return 0; } -IMPL_LINK( ScDPSubtotalOptDlg, CheckHdl, CheckBox*, pCBox ) +IMPL_LINK_TYPED( ScDPSubtotalOptDlg, CheckHdl, Button*, pCBox, void ) { if (pCBox == m_pCbShow) { @@ -815,7 +812,6 @@ IMPL_LINK( ScDPSubtotalOptDlg, CheckHdl, CheckBox*, pCBox ) m_pFtShowUsing->Enable(bEnableUsing); m_pLbShowUsing->Enable(bEnableUsing); } - return 0; } IMPL_LINK( ScDPSubtotalOptDlg, SelectHdl, ListBox*, pLBox ) diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 6f1381c8ef18..fe3514d932bd 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -162,7 +162,7 @@ void ScNewScenarioDlg::SetScenarioData( const OUString& rName, const OUString& r m_pCbProtect->Check ( (nFlags & SC_SCENARIO_PROTECT) != 0 ); } -IMPL_LINK_NOARG(ScNewScenarioDlg, OkHdl) +IMPL_LINK_NOARG_TYPED(ScNewScenarioDlg, OkHdl, Button*, void) { OUString aName = comphelper::string::strip(m_pEdName->GetText(), ' '); ScDocument* pDoc = static_cast<ScTabViewShell*>(SfxViewShell::Current())->GetViewData().GetDocument(); @@ -181,16 +181,14 @@ IMPL_LINK_NOARG(ScNewScenarioDlg, OkHdl) } else EndDialog( RET_OK ); - return 0; //! beim Editieren testen, ob eine andere Tabelle den Namen hat! } -IMPL_LINK( ScNewScenarioDlg, EnableHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( ScNewScenarioDlg, EnableHdl, Button*, pBox, void ) { if (pBox == m_pCbShowFrame) m_pLbColor->Enable( m_pCbShowFrame->IsChecked() ); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 3f348769af9d..b45b5d467f6d 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -371,16 +371,17 @@ ScImportAsciiDlg::ScImportAsciiDlg( vcl::Window* pParent, const OUString& aDatNa pCbTextSep->SetText( sTextSeparators ); Link<> aSeparatorHdl =LINK( this, ScImportAsciiDlg, SeparatorHdl ); + Link<Button*,void> aSeparatorClickHdl =LINK( this, ScImportAsciiDlg, SeparatorClickHdl ); pCbTextSep->SetSelectHdl( aSeparatorHdl ); pCbTextSep->SetModifyHdl( aSeparatorHdl ); - pCkbTab->SetClickHdl( aSeparatorHdl ); - pCkbSemicolon->SetClickHdl( aSeparatorHdl ); - pCkbComma->SetClickHdl( aSeparatorHdl ); - pCkbAsOnce->SetClickHdl( aSeparatorHdl ); - pCkbQuotedAsText->SetClickHdl( aSeparatorHdl ); - pCkbDetectNumber->SetClickHdl( aSeparatorHdl ); - pCkbSpace->SetClickHdl( aSeparatorHdl ); - pCkbOther->SetClickHdl( aSeparatorHdl ); + pCkbTab->SetClickHdl( aSeparatorClickHdl ); + pCkbSemicolon->SetClickHdl( aSeparatorClickHdl ); + pCkbComma->SetClickHdl( aSeparatorClickHdl ); + pCkbAsOnce->SetClickHdl( aSeparatorClickHdl ); + pCkbQuotedAsText->SetClickHdl( aSeparatorClickHdl ); + pCkbDetectNumber->SetClickHdl( aSeparatorClickHdl ); + pCkbSpace->SetClickHdl( aSeparatorClickHdl ); + pCkbOther->SetClickHdl( aSeparatorClickHdl ); pEdOther->SetModifyHdl( aSeparatorHdl ); // *** text encoding ListBox *** @@ -658,7 +659,7 @@ void ScImportAsciiDlg::UpdateVertical() mpDatStream->SetStreamCharSet(meCharSet); } -IMPL_LINK( ScImportAsciiDlg, RbSepFixHdl, RadioButton*, pButton ) +IMPL_LINK_TYPED( ScImportAsciiDlg, RbSepFixHdl, Button*, pButton, void ) { OSL_ENSURE( pButton, "ScImportAsciiDlg::RbSepFixHdl - missing sender" ); @@ -673,9 +674,12 @@ IMPL_LINK( ScImportAsciiDlg, RbSepFixHdl, RadioButton*, pButton ) SetupSeparatorCtrls(); } - return 0; } +IMPL_LINK_TYPED( ScImportAsciiDlg, SeparatorClickHdl, Button*, pCtrl, void ) +{ + SeparatorHdl(pCtrl); +} IMPL_LINK( ScImportAsciiDlg, SeparatorHdl, Control*, pCtrl ) { OSL_ENSURE( pCtrl, "ScImportAsciiDlg::SeparatorHdl - missing sender" ); diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 8d75619fe006..06d8fea36cd7 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -302,7 +302,7 @@ sal_uInt16 ScImportOptionsDlg::GetCodeFromCombo( const ComboBox& rEd ) const return nCode; } -IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox ) +IMPL_LINK_TYPED( ScImportOptionsDlg, FixedWidthHdl, Button*, pCheckBox, void ) { if (pCheckBox == m_pCbFixed) { @@ -314,7 +314,6 @@ IMPL_LINK( ScImportOptionsDlg, FixedWidthHdl, CheckBox*, pCheckBox ) m_pCbShown->Enable( bEnable ); m_pCbQuoteAll->Enable( bEnable ); } - return 0; } IMPL_LINK( ScImportOptionsDlg, DoubleClickHdl, ListBox*, pLb ) diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index 08e62128c496..a15b9a670802 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -285,7 +285,7 @@ bool ScSpecialFilterDlg::IsRefInputMode() const // Handler: -IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) +IMPL_LINK_TYPED( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn, void ) { OSL_ENSURE( pDoc && pViewData, "Document or ViewData not found. :-/" ); @@ -398,7 +398,6 @@ IMPL_LINK( ScSpecialFilterDlg, EndDlgHdl, Button*, pBtn ) { Close(); } - return 0; } IMPL_LINK_TYPED( ScSpecialFilterDlg, TimeOutHdl, Idle*, _pIdle, void ) diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx index 35848bfdbe23..a5a6d567698f 100644 --- a/sc/source/ui/dbgui/sortdlg.cxx +++ b/sc/source/ui/dbgui/sortdlg.cxx @@ -63,7 +63,7 @@ void ScSortWarningDlg::dispose() ModalDialog::dispose(); } -IMPL_LINK( ScSortWarningDlg, BtnHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScSortWarningDlg, BtnHdl, Button*, pBtn, void ) { if ( pBtn == aBtnExtSort ) { @@ -73,7 +73,6 @@ IMPL_LINK( ScSortWarningDlg, BtnHdl, PushButton*, pBtn ) { EndDialog( BTN_CURRENT_SELECTION ); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/dbgui/subtdlg.cxx b/sc/source/ui/dbgui/subtdlg.cxx index 9e34ba7e35ae..42593d0e31ac 100644 --- a/sc/source/ui/dbgui/subtdlg.cxx +++ b/sc/source/ui/dbgui/subtdlg.cxx @@ -47,13 +47,12 @@ void ScSubTotalDlg::dispose() SfxTabDialog::dispose(); } -IMPL_LINK( ScSubTotalDlg, RemoveHdl, PushButton *, pBtn ) +IMPL_LINK_TYPED( ScSubTotalDlg, RemoveHdl, Button *, pBtn, void ) { if (pBtn == m_pBtnRemove) { EndDialog( SCRET_REMOVE ); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/dbgui/textimportoptions.cxx b/sc/source/ui/dbgui/textimportoptions.cxx index 9971bb8bc129..900eb07cb22a 100644 --- a/sc/source/ui/dbgui/textimportoptions.cxx +++ b/sc/source/ui/dbgui/textimportoptions.cxx @@ -72,7 +72,7 @@ bool ScTextImportOptionsDlg::isDateConversionSet() const void ScTextImportOptionsDlg::init() { - Link<> aLink = LINK( this, ScTextImportOptionsDlg, OKHdl ); + Link<Button*,void> aLink = LINK( this, ScTextImportOptionsDlg, OKHdl ); m_pBtnOk->SetClickHdl(aLink); aLink = LINK( this, ScTextImportOptionsDlg, RadioHdl ); m_pRbAutomatic->SetClickHdl(aLink); @@ -88,13 +88,12 @@ void ScTextImportOptionsDlg::init() m_pLbCustomLang->Disable(); } -IMPL_LINK_NOARG(ScTextImportOptionsDlg, OKHdl) +IMPL_LINK_NOARG_TYPED(ScTextImportOptionsDlg, OKHdl, Button*, void) { EndDialog(RET_OK); - return 0; } -IMPL_LINK( ScTextImportOptionsDlg, RadioHdl, RadioButton*, pBtn ) +IMPL_LINK_TYPED( ScTextImportOptionsDlg, RadioHdl, Button*, pBtn, void ) { if (pBtn == m_pRbAutomatic) { @@ -104,7 +103,6 @@ IMPL_LINK( ScTextImportOptionsDlg, RadioHdl, RadioButton*, pBtn ) { m_pLbCustomLang->Enable(); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index c5336a7c2fd7..176651486f3d 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -847,8 +847,9 @@ void ScTabPageSortOptions::FillUserSortListBox() // Handler: -IMPL_LINK( ScTabPageSortOptions, EnableHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( ScTabPageSortOptions, EnableHdl, Button*, pButton, void ) { + CheckBox* pBox = static_cast<CheckBox*>(pButton); if (pBox == m_pBtnCopyResult) { if ( pBox->IsChecked() ) @@ -873,7 +874,6 @@ IMPL_LINK( ScTabPageSortOptions, EnableHdl, CheckBox *, pBox ) else m_pLbSortUser->Disable(); } - return 0; } IMPL_LINK( ScTabPageSortOptions, SelOutPosHdl, ListBox *, pLb ) @@ -891,7 +891,7 @@ IMPL_LINK( ScTabPageSortOptions, SelOutPosHdl, ListBox *, pLb ) return 0; } -IMPL_LINK( ScTabPageSortOptions, SortDirHdl, RadioButton *, pBtn ) +IMPL_LINK_TYPED( ScTabPageSortOptions, SortDirHdl, Button *, pBtn, void ) { if (pBtn == m_pBtnTopDown) { @@ -901,7 +901,6 @@ IMPL_LINK( ScTabPageSortOptions, SortDirHdl, RadioButton *, pBtn ) { m_pBtnHeader->SetText( aStrRowLabel ); } - return 0; } void ScTabPageSortOptions::EdOutPosModHdl( Edit* pEd ) diff --git a/sc/source/ui/dbgui/tpsubt.cxx b/sc/source/ui/dbgui/tpsubt.cxx index 25d3ad90d39e..65fb0590005b 100644 --- a/sc/source/ui/dbgui/tpsubt.cxx +++ b/sc/source/ui/dbgui/tpsubt.cxx @@ -564,7 +564,7 @@ void ScTpSubTotalOptions::FillUserSortListBox() // Handler: -IMPL_LINK( ScTpSubTotalOptions, CheckHdl, CheckBox *, pBox ) +IMPL_LINK_TYPED( ScTpSubTotalOptions, CheckHdl, Button*, pBox, void ) { if ( pBox == pBtnSort ) { @@ -599,8 +599,6 @@ IMPL_LINK( ScTpSubTotalOptions, CheckHdl, CheckBox *, pBox ) else pLbUserDef->Disable(); } - - return 0; } ScTpSubTotalGroup1::~ScTpSubTotalGroup1() diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 40be7f26f420..196223bbca1d 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -663,10 +663,9 @@ IMPL_LINK_NOARG(ScTPValidationValue, SelectHdl) return 0; } -IMPL_LINK_NOARG(ScTPValidationValue, CheckHdl) +IMPL_LINK_NOARG_TYPED(ScTPValidationValue, CheckHdl, Button*, void) { m_pCbSort->Enable( m_pCbShow->IsChecked() ); - return 0; } // Input Help Page @@ -841,7 +840,7 @@ IMPL_LINK_NOARG(ScTPValidationError, SelectActionHdl) return 0L; } -IMPL_LINK_NOARG(ScTPValidationError, ClickSearchHdl) +IMPL_LINK_NOARG_TYPED(ScTPValidationError, ClickSearchHdl, Button*, void) { vcl::Window* pOld = Application::GetDefDialogParent(); Application::SetDefDialogParent( this ); @@ -856,8 +855,6 @@ IMPL_LINK_NOARG(ScTPValidationError, ClickSearchHdl) { m_pEdtTitle->SetText( aScriptURL ); } - - return 0L; } bool ScValidationDlg::EnterRefStatus() diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 0b4d4971206d..5eb86cf9eedf 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -132,7 +132,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, Link<> a2Link=LINK( this, ScFunctionDockWin, SetSelectionHdl); aFuncList->SetDoubleClickHdl(a2Link); aDDFuncList->SetSelectHdl(aLink); - aInsertButton->SetClickHdl(a2Link); + aInsertButton->SetClickHdl(LINK( this, ScFunctionDockWin, SetSelectionClickHdl)); Link<> a3Link=LINK( this, ScFunctionDockWin, SetSplitHdl); aPrivatSplit->SetCtrModifiedHdl(a3Link); @@ -955,6 +955,10 @@ IMPL_LINK( ScFunctionDockWin, SelHdl, ListBox*, pLb ) #* #************************************************************************/ +IMPL_LINK_TYPED( ScFunctionDockWin, SetSelectionClickHdl, Button*, pCtrl, void ) +{ + SetSelectionHdl(pCtrl); +} IMPL_LINK( ScFunctionDockWin, SetSelectionHdl, void*, pCtrl ) { if (static_cast<ImageButton *>(pCtrl) == aInsertButton.get() || diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx index 2449d65b1047..839119f5ad89 100644 --- a/sc/source/ui/inc/PivotLayoutDialog.hxx +++ b/sc/source/ui/inc/PivotLayoutDialog.hxx @@ -88,8 +88,8 @@ private: ScAddress::Details maAddressDetails; bool mbDialogLostFocus; - DECL_LINK(CancelClicked, PushButton*); - DECL_LINK(OKClicked, PushButton*); + DECL_LINK_TYPED(CancelClicked, Button*, void); + DECL_LINK_TYPED(OKClicked, Button*, void); DECL_LINK(GetFocusHandler, Control*); DECL_LINK(LoseFocusHandler, void*); DECL_LINK(ToggleSource, void*); diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx index 045a5726b771..dc751e490431 100644 --- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx +++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx @@ -70,9 +70,9 @@ private: void SelectGeneratorAndGenerateNumbers(); - DECL_LINK( OkClicked, PushButton* ); - DECL_LINK( CloseClicked, PushButton* ); - DECL_LINK( ApplyClicked, PushButton* ); + DECL_LINK_TYPED( OkClicked, Button*, void ); + DECL_LINK_TYPED( CloseClicked, Button*, void ); + DECL_LINK_TYPED( ApplyClicked, Button*, void ); DECL_LINK( GetFocusHandler, Control* ); DECL_LINK( LoseFocusHandler, void* ); diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx index c98fd7725e20..544475f25a0a 100644 --- a/sc/source/ui/inc/SamplingDialog.hxx +++ b/sc/source/ui/inc/SamplingDialog.hxx @@ -72,7 +72,7 @@ private: ScRange PerformRandomSampling(ScDocShell* pDocShell); ScRange PerformPeriodicSampling(ScDocShell* pDocShell); - DECL_LINK( OkClicked, PushButton* ); + DECL_LINK_TYPED( OkClicked, Button*, void ); DECL_LINK( GetFocusHandler, Control* ); DECL_LINK( LoseFocusHandler, void* ); DECL_LINK( SamplingSizeValueModified, void* ); diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx index e41ac800ee80..22a41d751fbb 100644 --- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx +++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx @@ -80,7 +80,7 @@ private: void GetRangeFromSelection(); DECL_LINK( GroupByChanged, void* ); - DECL_LINK( OkClicked, PushButton* ); + DECL_LINK_TYPED( OkClicked, Button*, void ); DECL_LINK( GetFocusHandler, Control* ); DECL_LINK( LoseFocusHandler, void* ); DECL_LINK( RefInputModifyHandler, void* ); diff --git a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx index ebe8b19ac82a..d02a54e9b00f 100644 --- a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx +++ b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx @@ -83,7 +83,7 @@ private: void GetRangeFromSelection(); DECL_LINK( GroupByChanged, void* ); - DECL_LINK( OkClicked, PushButton* ); + DECL_LINK_TYPED( OkClicked, Button*, void ); DECL_LINK( GetFocusHandler, Control* ); DECL_LINK( LoseFocusHandler, void* ); DECL_LINK( RefInputModifyHandler, void* ); diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx index dbc09faa4467..b48233e4e4c4 100644 --- a/sc/source/ui/inc/areasdlg.hxx +++ b/sc/source/ui/inc/areasdlg.hxx @@ -75,7 +75,7 @@ private: // Handler: DECL_LINK( Impl_SelectHdl, ListBox* ); DECL_LINK( Impl_ModifyHdl, formula::RefEdit* ); - DECL_LINK( Impl_BtnHdl, PushButton* ); + DECL_LINK_TYPED( Impl_BtnHdl, Button*, void ); DECL_LINK( Impl_GetFocusHdl, Control* ); }; diff --git a/sc/source/ui/inc/checklistmenu.hxx b/sc/source/ui/inc/checklistmenu.hxx index 123ca41c9485..ceffe378bc69 100644 --- a/sc/source/ui/inc/checklistmenu.hxx +++ b/sc/source/ui/inc/checklistmenu.hxx @@ -328,8 +328,8 @@ private: void selectCurrentMemberOnly(bool bSet); void cycleFocus(bool bReverse = false); - DECL_LINK( ButtonHdl, Button* ); - DECL_LINK( TriStateHdl, void* ); + DECL_LINK_TYPED( ButtonHdl, Button*, void ); + DECL_LINK_TYPED( TriStateHdl, Button*, void ); DECL_LINK( CheckHdl, SvTreeListBox* ); DECL_LINK( EdModifyHdl, void* ); diff --git a/sc/source/ui/inc/colorformat.hxx b/sc/source/ui/inc/colorformat.hxx index dd65562828b2..4c125f9689f2 100644 --- a/sc/source/ui/inc/colorformat.hxx +++ b/sc/source/ui/inc/colorformat.hxx @@ -48,7 +48,7 @@ private: ScDocument* mpDoc; ScAddress maPos; - DECL_LINK(OkBtnHdl, void*); + DECL_LINK_TYPED(OkBtnHdl, Button*, void); DECL_LINK(TypeSelectHdl, void*); DECL_LINK(PosSelectHdl, void*); diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx index 531b8c19a3ba..5a6faed4f9da 100644 --- a/sc/source/ui/inc/condformatdlg.hxx +++ b/sc/source/ui/inc/condformatdlg.hxx @@ -86,8 +86,8 @@ public: ScConditionalFormat* GetConditionalFormat() const; void RecalcAll(); - DECL_LINK( AddBtnHdl, void* ); - DECL_LINK( RemoveBtnHdl, void* ); + DECL_LINK_TYPED( AddBtnHdl, Button*, void ); + DECL_LINK_TYPED( RemoveBtnHdl, Button*, void ); DECL_LINK( ScrollHdl, void* ); DECL_LINK( EntrySelectHdl, ScCondFrmtEntry* ); @@ -147,7 +147,7 @@ public: void InvalidateRefData(); - DECL_LINK( BtnPressedHdl, Button* ); + DECL_LINK_TYPED( BtnPressedHdl, Button*, void ); DECL_LINK( RangeGetFocusHdl, formula::RefEdit* ); }; diff --git a/sc/source/ui/inc/condformatdlgentry.hxx b/sc/source/ui/inc/condformatdlgentry.hxx index 5bb04e32721c..814e366f9598 100644 --- a/sc/source/ui/inc/condformatdlgentry.hxx +++ b/sc/source/ui/inc/condformatdlgentry.hxx @@ -242,7 +242,7 @@ class ScDataBarFrmtEntry : public ScCondFrmtEntry virtual OUString GetExpressionString() SAL_OVERRIDE; void Init(); - DECL_LINK( OptionBtnHdl, void* ); + DECL_LINK_TYPED( OptionBtnHdl, Button*, void ); DECL_LINK( DataBarTypeSelectHdl, void* ); public: ScDataBarFrmtEntry( vcl::Window* pParemt, ScDocument* pDoc, const ScAddress& rPos, const ScDataBarFormat* pFormat = NULL ); diff --git a/sc/source/ui/inc/condformatmgr.hxx b/sc/source/ui/inc/condformatmgr.hxx index d713383a6ece..a72e6a20c852 100644 --- a/sc/source/ui/inc/condformatmgr.hxx +++ b/sc/source/ui/inc/condformatmgr.hxx @@ -67,9 +67,10 @@ private: ScDocument* mpDoc; ScAddress maPos; - DECL_LINK(RemoveBtnHdl, void*); + DECL_LINK_TYPED(RemoveBtnHdl, Button*, void); + DECL_LINK_TYPED(EditBtnClickHdl, Button*, void); + DECL_LINK_TYPED(AddBtnHdl, Button*, void); DECL_LINK(EditBtnHdl, void*); - DECL_LINK(AddBtnHdl, void*); bool mbModified; }; diff --git a/sc/source/ui/inc/conflictsdlg.hxx b/sc/source/ui/inc/conflictsdlg.hxx index 03e6e831b271..0ccea7822fa7 100644 --- a/sc/source/ui/inc/conflictsdlg.hxx +++ b/sc/source/ui/inc/conflictsdlg.hxx @@ -152,10 +152,10 @@ private: DECL_LINK( SelectHandle, void* ); DECL_LINK( DeselectHandle, void* ); DECL_LINK_TYPED( UpdateSelectionHdl, Idle*, void ); - DECL_LINK( KeepMineHandle, void* ); - DECL_LINK( KeepOtherHandle, void* ); - DECL_LINK( KeepAllMineHandle, void* ); - DECL_LINK( KeepAllOthersHandle, void* ); + DECL_LINK_TYPED( KeepMineHandle, Button*, void ); + DECL_LINK_TYPED( KeepOtherHandle, Button*, void ); + DECL_LINK_TYPED( KeepAllMineHandle, Button*, void ); + DECL_LINK_TYPED( KeepAllOthersHandle, Button*, void ); public: ScConflictsDlg( vcl::Window* pParent, ScViewData* pViewData, ScDocument* pSharedDoc, ScConflictsList& rConflictsList ); diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx index 0c09811eb3dd..ec532f370422 100644 --- a/sc/source/ui/inc/consdlg.hxx +++ b/sc/source/ui/inc/consdlg.hxx @@ -91,8 +91,8 @@ private: void FillAreaLists (); bool VerifyEdit ( formula::RefEdit* pEd ); - DECL_LINK( OkHdl, void* ); - DECL_LINK( ClickHdl, PushButton* ); + DECL_LINK_TYPED( OkHdl, Button*, void ); + DECL_LINK_TYPED( ClickHdl, Button*, void ); DECL_LINK( GetFocusHdl, Control* ); DECL_LINK( ModifyHdl, formula::RefEdit* ); DECL_LINK( SelectHdl, ListBox* ); diff --git a/sc/source/ui/inc/crdlg.hxx b/sc/source/ui/inc/crdlg.hxx index cc0b941e7da2..a3969d775612 100644 --- a/sc/source/ui/inc/crdlg.hxx +++ b/sc/source/ui/inc/crdlg.hxx @@ -38,7 +38,7 @@ private: VclPtr<RadioButton> m_pBtnCols; VclPtr<OKButton> m_pBtnOk; - DECL_LINK(OkHdl, void *); + DECL_LINK_TYPED(OkHdl, Button*, void); }; #endif diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx index f23f5dd51d7e..a8f4a7174460 100644 --- a/sc/source/ui/inc/crnrdlg.hxx +++ b/sc/source/ui/inc/crnrdlg.hxx @@ -77,14 +77,14 @@ private: void UpdateRangeData ( const ScRange& rRange, bool bColName ); void SetColRowData( const ScRange& rLabelRange, bool bRef=false); void AdjustColRowData( const ScRange& rDataRange, bool bRef=false); - DECL_LINK( CancelBtnHdl, void * ); - DECL_LINK( OkBtnHdl, void * ); - DECL_LINK( AddBtnHdl, void * ); - DECL_LINK( RemoveBtnHdl, void * ); + DECL_LINK_TYPED( CancelBtnHdl, Button*, void ); + DECL_LINK_TYPED( OkBtnHdl, Button*, void ); + DECL_LINK_TYPED( AddBtnHdl, Button*, void ); + DECL_LINK_TYPED( RemoveBtnHdl, Button*, void ); DECL_LINK( Range1SelectHdl, void * ); DECL_LINK( Range1DataModifyHdl, void * ); - DECL_LINK( ColClickHdl, void * ); - DECL_LINK( RowClickHdl, void * ); + DECL_LINK_TYPED( ColClickHdl, Button*, void ); + DECL_LINK_TYPED( RowClickHdl, Button*, void ); DECL_LINK( Range2DataModifyHdl, void * ); DECL_LINK( GetFocusHdl, Control* ); DECL_LINK( LoseFocusHdl, void* ); diff --git a/sc/source/ui/inc/dapitype.hxx b/sc/source/ui/inc/dapitype.hxx index fb85f0e47687..2d5047c75bc4 100644 --- a/sc/source/ui/inc/dapitype.hxx +++ b/sc/source/ui/inc/dapitype.hxx @@ -47,7 +47,7 @@ public: void AppendNamedRange(const OUString& rNames); private: - DECL_LINK( RadioClickHdl, RadioButton * ); + DECL_LINK_TYPED( RadioClickHdl, Button *, void ); }; class ScDataPilotServiceDlg : public ModalDialog diff --git a/sc/source/ui/inc/datafdlg.hxx b/sc/source/ui/inc/datafdlg.hxx index 762b0cd5d761..7bd344a63334 100644 --- a/sc/source/ui/inc/datafdlg.hxx +++ b/sc/source/ui/inc/datafdlg.hxx @@ -63,13 +63,13 @@ private: void SetButtonState(); // Handler: - DECL_LINK(Impl_NewHdl, void *); - DECL_LINK(Impl_PrevHdl, void *); - DECL_LINK(Impl_NextHdl, void *); + DECL_LINK_TYPED(Impl_NewHdl, Button*, void); + DECL_LINK_TYPED(Impl_PrevHdl, Button*, void); + DECL_LINK_TYPED(Impl_NextHdl, Button*, void); - DECL_LINK(Impl_RestoreHdl, void *); - DECL_LINK(Impl_DeleteHdl, void *); - DECL_LINK(Impl_CloseHdl, void *); + DECL_LINK_TYPED(Impl_RestoreHdl, Button*, void); + DECL_LINK_TYPED(Impl_DeleteHdl, Button*, void); + DECL_LINK_TYPED(Impl_CloseHdl, Button*, void); DECL_LINK(Impl_ScrollHdl, void *); DECL_LINK( Impl_DataModifyHdl, Edit* ); diff --git a/sc/source/ui/inc/datastreamdlg.hxx b/sc/source/ui/inc/datastreamdlg.hxx index 0b8bf8c38966..a81dbd18ed5b 100644 --- a/sc/source/ui/inc/datastreamdlg.hxx +++ b/sc/source/ui/inc/datastreamdlg.hxx @@ -46,8 +46,9 @@ class DataStreamDlg : public ModalDialog VclPtr<VclFrame> m_pVclFrameLimit; VclPtr<VclFrame> m_pVclFrameMove; + DECL_LINK_TYPED(UpdateClickHdl, Button*, void); DECL_LINK(UpdateHdl, void *); - DECL_LINK(BrowseHdl, void *); + DECL_LINK_TYPED(BrowseHdl, Button*, void); void UpdateEnable(); ScRange GetStartRange(); diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx index 68154228fb02..3476cd18caf4 100644 --- a/sc/source/ui/inc/dbnamdlg.hxx +++ b/sc/source/ui/inc/dbnamdlg.hxx @@ -91,10 +91,10 @@ private: void UpdateDBData( const OUString& rStrName ); void SetInfoStrings( const ScDBData* pDBData ); - DECL_LINK( CancelBtnHdl, void * ); - DECL_LINK( OkBtnHdl, void * ); - DECL_LINK( AddBtnHdl, void * ); - DECL_LINK( RemoveBtnHdl, void * ); + DECL_LINK_TYPED( CancelBtnHdl, Button*, void ); + DECL_LINK_TYPED( OkBtnHdl, Button*, void ); + DECL_LINK_TYPED( AddBtnHdl, Button*, void ); + DECL_LINK_TYPED( RemoveBtnHdl, Button*, void ); DECL_LINK( NameModifyHdl, void * ); DECL_LINK( AssModifyHdl, void * ); }; diff --git a/sc/source/ui/inc/delcodlg.hxx b/sc/source/ui/inc/delcodlg.hxx index a2741a6448a5..ea1bf0cbd2ab 100644 --- a/sc/source/ui/inc/delcodlg.hxx +++ b/sc/source/ui/inc/delcodlg.hxx @@ -43,7 +43,7 @@ private: static InsertDeleteFlags nPreviousChecks; void DisableChecks( bool bDelAllChecked = true ); - DECL_LINK( DelAllHdl, void * ); + DECL_LINK_TYPED( DelAllHdl, Button*, void ); public: ScDeleteContentsDlg( vcl::Window* pParent, diff --git a/sc/source/ui/inc/dpgroupdlg.hxx b/sc/source/ui/inc/dpgroupdlg.hxx index 3ba0db194083..21d48bb6aebe 100644 --- a/sc/source/ui/inc/dpgroupdlg.hxx +++ b/sc/source/ui/inc/dpgroupdlg.hxx @@ -46,7 +46,7 @@ private: virtual bool ImplGetValue( double& rfValue ) const = 0; virtual void ImplSetValue( double fValue ) = 0; - DECL_LINK( ClickHdl, RadioButton* ); + DECL_LINK_TYPED( ClickHdl, Button*, void ); private: VclPtr<RadioButton> mpRbAuto; @@ -119,7 +119,7 @@ public: sal_Int32 GetDatePart() const; private: - DECL_LINK( ClickHdl, RadioButton* ); + DECL_LINK_TYPED( ClickHdl, Button*, void ); DECL_LINK( CheckHdl, SvxCheckListBox* ); private: diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx index a3450cfc4133..f2ca572b2888 100644 --- a/sc/source/ui/inc/dwfunctr.hxx +++ b/sc/source/ui/inc/dwfunctr.hxx @@ -82,6 +82,7 @@ private: void UseSplitterInitPos(); DECL_LINK( SetSelectionHdl, void* ); + DECL_LINK_TYPED( SetSelectionClickHdl, Button*, void ); DECL_LINK( SelHdl, ListBox* ); DECL_LINK(SetSplitHdl,ScPrivatSplit*); DECL_LINK_TYPED( TimerHdl, Idle*, void ); diff --git a/sc/source/ui/inc/filldlg.hxx b/sc/source/ui/inc/filldlg.hxx index 70a2d086bb45..96d3b5961631 100644 --- a/sc/source/ui/inc/filldlg.hxx +++ b/sc/source/ui/inc/filldlg.hxx @@ -101,8 +101,8 @@ private: bool CheckIncrementVal(); bool CheckEndVal(); - DECL_LINK( OKHdl, void * ); - DECL_LINK( DisableHdl, Button * ); + DECL_LINK_TYPED( OKHdl, Button*, void ); + DECL_LINK_TYPED( DisableHdl, Button*, void ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_FILLDLG_HXX diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index ceb6b0a60b49..af30de6f8803 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -148,8 +148,8 @@ private: // Handler: DECL_LINK( LbSelectHdl, ListBox* ); DECL_LINK( ValModifyHdl, ComboBox* ); - DECL_LINK( CheckBoxHdl, CheckBox* ); - DECL_LINK( EndDlgHdl, Button* ); + DECL_LINK_TYPED( CheckBoxHdl, Button*, void ); + DECL_LINK_TYPED( EndDlgHdl, Button*, void ); DECL_LINK( ScrollHdl, void* ); DECL_LINK( MoreExpandedHdl, void* ); @@ -216,7 +216,7 @@ private: // Handler DECL_LINK( FilterAreaSelHdl, ListBox* ); DECL_LINK( FilterAreaModHdl, formula::RefEdit* ); - DECL_LINK( EndDlgHdl, Button* ); + DECL_LINK_TYPED( EndDlgHdl, Button*, void ); // Hack: RefInput control DECL_LINK_TYPED( TimeOutHdl, Idle*, void ); diff --git a/sc/source/ui/inc/highred.hxx b/sc/source/ui/inc/highred.hxx index b867d251f96e..2192e60f7717 100644 --- a/sc/source/ui/inc/highred.hxx +++ b/sc/source/ui/inc/highred.hxx @@ -61,8 +61,8 @@ private: void Init(); DECL_LINK( RefHandle, SvxTPFilter* ); - DECL_LINK(HighlightHandle, CheckBox*); - DECL_LINK(OKBtnHdl, PushButton*); + DECL_LINK_TYPED(HighlightHandle, Button*, void); + DECL_LINK_TYPED(OKBtnHdl, Button*, void); protected: diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx index a09ddba9aaad..05ce58b5794e 100644 --- a/sc/source/ui/inc/inputwin.hxx +++ b/sc/source/ui/inc/inputwin.hxx @@ -226,7 +226,7 @@ private: VclPtr<ImageButton> aButton; VclPtr<ScrollBar> aScrollBar; long nVertOffset; - DECL_LINK( ClickHdl, void* ); + DECL_LINK_TYPED( ClickHdl, Button*, void ); DECL_LINK( Impl_ScrollHdl, void* ); }; diff --git a/sc/source/ui/inc/inscodlg.hxx b/sc/source/ui/inc/inscodlg.hxx index 65ea1d9d5f6f..4c68cb053243 100644 --- a/sc/source/ui/inc/inscodlg.hxx +++ b/sc/source/ui/inc/inscodlg.hxx @@ -100,9 +100,9 @@ private: void TestModes(); // Handler - DECL_LINK( InsAllHdl, void* ); - DECL_LINK( LinkBtnHdl, void* ); - DECL_LINK( ShortCutHdl, PushButton* ); + DECL_LINK_TYPED( InsAllHdl, Button*, void ); + DECL_LINK_TYPED( LinkBtnHdl, Button*, void ); + DECL_LINK_TYPED( ShortCutHdl, Button*, void ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_INSCODLG_HXX diff --git a/sc/source/ui/inc/instbdlg.hxx b/sc/source/ui/inc/instbdlg.hxx index f80a634d2c21..647512aa07d7 100644 --- a/sc/source/ui/inc/instbdlg.hxx +++ b/sc/source/ui/inc/instbdlg.hxx @@ -91,11 +91,11 @@ private: void FillTables_Impl( ScDocument* pSrcDoc ); void DoEnable_Impl(); - DECL_LINK(BrowseHdl_Impl, void *); - DECL_LINK(ChoiceHdl_Impl, void *); + DECL_LINK_TYPED(BrowseHdl_Impl, Button*, void); + DECL_LINK_TYPED(ChoiceHdl_Impl, Button*, void); DECL_LINK(SelectHdl_Impl, void *); DECL_LINK(CountHdl_Impl, void *); - DECL_LINK(DoEnterHdl, void *); + DECL_LINK_TYPED(DoEnterHdl, Button*, void); DECL_LINK_TYPED(BrowseTimeoutHdl, Timer *, void); DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper*, void ); }; diff --git a/sc/source/ui/inc/linkarea.hxx b/sc/source/ui/inc/linkarea.hxx index c985d4ddce8c..610ea8c3d8d7 100644 --- a/sc/source/ui/inc/linkarea.hxx +++ b/sc/source/ui/inc/linkarea.hxx @@ -51,9 +51,9 @@ private: SfxObjectShellRef aSourceRef; DECL_LINK(FileHdl, void *); - DECL_LINK(BrowseHdl, void *); + DECL_LINK_TYPED(BrowseHdl, Button*, void); DECL_LINK(RangeHdl, void *); - DECL_LINK(ReloadHdl, void *); + DECL_LINK_TYPED(ReloadHdl, Button*, void); DECL_LINK_TYPED( DialogClosedHdl, sfx2::FileDialogHelper*, void ); void UpdateSourceRanges(); diff --git a/sc/source/ui/inc/mtrindlg.hxx b/sc/source/ui/inc/mtrindlg.hxx index 72b106fd3504..bb15971e2282 100644 --- a/sc/source/ui/inc/mtrindlg.hxx +++ b/sc/source/ui/inc/mtrindlg.hxx @@ -49,7 +49,7 @@ private: long nDefaultValue; long nCurrentValue; - DECL_LINK(SetDefValHdl, void *); + DECL_LINK_TYPED(SetDefValHdl, Button*, void); DECL_LINK(ModifyHdl, void *); }; diff --git a/sc/source/ui/inc/mvtabdlg.hxx b/sc/source/ui/inc/mvtabdlg.hxx index fa3e5ed2a051..1512f9db2778 100644 --- a/sc/source/ui/inc/mvtabdlg.hxx +++ b/sc/source/ui/inc/mvtabdlg.hxx @@ -75,7 +75,7 @@ private: void Init (); void InitDocListBox (); - DECL_LINK( OkHdl, void * ); + DECL_LINK_TYPED( OkHdl, Button*, void ); DECL_LINK( SelHdl, ListBox * ); DECL_LINK( CheckBtnHdl, void * ); DECL_LINK( CheckNameHdl, Edit * ); diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx index acdb9ed31e52..94c3bfc55d9a 100644 --- a/sc/source/ui/inc/namedefdlg.hxx +++ b/sc/source/ui/inc/namedefdlg.hxx @@ -64,8 +64,8 @@ private: bool IsNameValid(); bool IsFormulaValid(); - DECL_LINK( CancelBtnHdl, void * ); - DECL_LINK( AddBtnHdl, void* ); + DECL_LINK_TYPED( CancelBtnHdl, Button*, void ); + DECL_LINK_TYPED( AddBtnHdl, Button*, void ); DECL_LINK( NameModifyHdl, void* ); DECL_LINK( AssignGetFocusHdl, void * ); diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx index 5b6edb18fec1..dd125914360b 100644 --- a/sc/source/ui/inc/namedlg.hxx +++ b/sc/source/ui/inc/namedlg.hxx @@ -100,10 +100,10 @@ private: void SelectionChanged(); // Handler: - DECL_LINK( OkBtnHdl, void * ); - DECL_LINK( CancelBtnHdl, void * ); - DECL_LINK( AddBtnHdl, void * ); - DECL_LINK( RemoveBtnHdl, void * ); + DECL_LINK_TYPED( OkBtnHdl, Button*, void ); + DECL_LINK_TYPED( CancelBtnHdl, Button*, void ); + DECL_LINK_TYPED( AddBtnHdl, Button*, void ); + DECL_LINK_TYPED( RemoveBtnHdl, Button*, void ); DECL_LINK( EdModifyHdl, void * ); DECL_LINK( AssignGetFocusHdl, void * ); DECL_LINK( SelectionChangedHdl_Impl, void* ); diff --git a/sc/source/ui/inc/namepast.hxx b/sc/source/ui/inc/namepast.hxx index a71a95b23e9c..3e22bcb9add9 100644 --- a/sc/source/ui/inc/namepast.hxx +++ b/sc/source/ui/inc/namepast.hxx @@ -34,7 +34,7 @@ class ScDocShell; class ScNamePasteDlg : public ModalDialog { - DECL_LINK( ButtonHdl, Button * ); + DECL_LINK_TYPED( ButtonHdl, Button *, void ); private: VclPtr<PushButton> m_pBtnPasteAll; diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index d48d78da49a2..8f452cd650b7 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -189,11 +189,11 @@ private: bool FindTimeout( sal_Int32& rTimeout ); void ShowError( bool bCondition, formula::RefEdit* pFocus ); - DECL_LINK( BtnHdl, PushButton* ); - DECL_LINK( DelBtnHdl, PushButton* ); + DECL_LINK_TYPED( BtnHdl, Button*, void ); + DECL_LINK_TYPED( DelBtnHdl, Button*, void ); DECL_LINK( GetFocusHdl, Control* ); DECL_LINK( LoseFocusHdl, void* ); - DECL_LINK(ScrollHdl, void *); + DECL_LINK( ScrollHdl, void *); DECL_LINK( CursorUpHdl, ScCursorRefEdit* ); DECL_LINK( CursorDownHdl, ScCursorRefEdit* ); DECL_LINK( CondModifyHdl, void* ); @@ -230,7 +230,7 @@ class ScSolverSuccessDialog : public ModalDialog VclPtr<PushButton> m_pBtnOk; VclPtr<PushButton> m_pBtnCancel; - DECL_LINK(ClickHdl, PushButton*); + DECL_LINK_TYPED(ClickHdl, Button*, void); public: ScSolverSuccessDialog( vcl::Window* pParent, const OUString& rSolution ); diff --git a/sc/source/ui/inc/pfiltdlg.hxx b/sc/source/ui/inc/pfiltdlg.hxx index c2272b311c76..07480b3d3187 100644 --- a/sc/source/ui/inc/pfiltdlg.hxx +++ b/sc/source/ui/inc/pfiltdlg.hxx @@ -92,7 +92,7 @@ private: // Handler: DECL_LINK( LbSelectHdl, ListBox* ); DECL_LINK( ValModifyHdl, ComboBox* ); - DECL_LINK( CheckBoxHdl, CheckBox* ); + DECL_LINK_TYPED( CheckBoxHdl, Button*, void ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_PFILTDLG_HXX diff --git a/sc/source/ui/inc/protectiondlg.hxx b/sc/source/ui/inc/protectiondlg.hxx index 32a0b724c466..145704a3c974 100644 --- a/sc/source/ui/inc/protectiondlg.hxx +++ b/sc/source/ui/inc/protectiondlg.hxx @@ -64,8 +64,8 @@ private: OUString m_aSelectLockedCells; OUString m_aSelectUnlockedCells; - DECL_LINK( OKHdl, void* ); - DECL_LINK( CheckBoxHdl, CheckBox* ); + DECL_LINK_TYPED( OKHdl, Button*, void ); + DECL_LINK_TYPED( CheckBoxHdl, Button*, void ); DECL_LINK( PasswordModifyHdl, void* ); }; diff --git a/sc/source/ui/inc/pvfundlg.hxx b/sc/source/ui/inc/pvfundlg.hxx index bfebea6b8439..06710d492bdd 100644 --- a/sc/source/ui/inc/pvfundlg.hxx +++ b/sc/source/ui/inc/pvfundlg.hxx @@ -112,8 +112,8 @@ private: void Init( const ScDPLabelData& rLabelData, const ScPivotFuncData& rFuncData ); DECL_LINK(DblClickHdl, void *); - DECL_LINK( RadioClickHdl, RadioButton* ); - DECL_LINK( ClickHdl, PushButton* ); + DECL_LINK_TYPED( RadioClickHdl, Button* , void); + DECL_LINK_TYPED( ClickHdl, Button*, void ); private: VclPtr<RadioButton> mpRbNone; @@ -151,8 +151,8 @@ private: /** Searches for a listbox entry, starts search at specified position. */ sal_Int32 FindListBoxEntry( const ListBox& rLBox, const OUString& rEntry, sal_Int32 nStartPos ) const; - DECL_LINK( RadioClickHdl, RadioButton* ); - DECL_LINK( CheckHdl, CheckBox* ); + DECL_LINK_TYPED( RadioClickHdl, Button*, void ); + DECL_LINK_TYPED( CheckHdl, Button*, void ); DECL_LINK( SelectHdl, ListBox* ); private: diff --git a/sc/source/ui/inc/retypepassdlg.hxx b/sc/source/ui/inc/retypepassdlg.hxx index 8c746c1438f0..19cc33ebec57 100644 --- a/sc/source/ui/inc/retypepassdlg.hxx +++ b/sc/source/ui/inc/retypepassdlg.hxx @@ -85,8 +85,8 @@ private: OUString maTextHashGood; OUString maTextHashRegen; - DECL_LINK( OKHdl, void* ); - DECL_LINK( RetypeBtnHdl, PushButton* ); + DECL_LINK_TYPED( OKHdl, Button*, void ); + DECL_LINK_TYPED( RetypeBtnHdl, Button*, void ); struct TableItem { @@ -131,9 +131,9 @@ private: VclPtr<RadioButton> m_pBtnRemovePassword; - DECL_LINK( OKHdl, void* ); - DECL_LINK( RadioBtnHdl, RadioButton* ); - DECL_LINK( CheckBoxHdl, void* ); + DECL_LINK_TYPED( OKHdl, Button*, void ); + DECL_LINK_TYPED( RadioBtnHdl, Button*, void ); + DECL_LINK_TYPED( CheckBoxHdl, Button*, void ); DECL_LINK( PasswordModifyHdl, void* ); ScPassHashProtectable* mpProtected; diff --git a/sc/source/ui/inc/scendlg.hxx b/sc/source/ui/inc/scendlg.hxx index 96bc48d9add2..ce5779f4b8e1 100644 --- a/sc/source/ui/inc/scendlg.hxx +++ b/sc/source/ui/inc/scendlg.hxx @@ -51,8 +51,8 @@ private: const OUString aDefScenarioName; bool bIsEdit; - DECL_LINK(OkHdl, void *); - DECL_LINK( EnableHdl, CheckBox * ); + DECL_LINK_TYPED( OkHdl, Button*, void); + DECL_LINK_TYPED( EnableHdl, Button*, void ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_SCENDLG_HXX diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx index c05237a49984..e86785f782aa 100644 --- a/sc/source/ui/inc/scuiasciiopt.hxx +++ b/sc/source/ui/inc/scuiasciiopt.hxx @@ -102,8 +102,9 @@ private: DECL_LINK( CharSetHdl, SvxTextEncodingBox* ); DECL_LINK( FirstRowHdl, NumericField* ); - DECL_LINK( RbSepFixHdl, RadioButton* ); + DECL_LINK_TYPED( RbSepFixHdl, Button*, void ); DECL_LINK( SeparatorHdl, Control* ); + DECL_LINK_TYPED( SeparatorClickHdl, Button*, void ); DECL_LINK( LbColTypeHdl, ListBox* ); DECL_LINK(UpdateTextHdl, void *); DECL_LINK( ColTypeHdl, ScCsvTableBox* ); diff --git a/sc/source/ui/inc/scuiautofmt.hxx b/sc/source/ui/inc/scuiautofmt.hxx index 10bfe1f98752..ac0c8ca0dbc4 100644 --- a/sc/source/ui/inc/scuiautofmt.hxx +++ b/sc/source/ui/inc/scuiautofmt.hxx @@ -62,13 +62,13 @@ private: void Init (); void UpdateChecks (); - DECL_LINK( CheckHdl, Button * ); - DECL_LINK( AddHdl, void * ); - DECL_LINK( RemoveHdl, void * ); + DECL_LINK_TYPED( CheckHdl, Button*, void ); + DECL_LINK_TYPED( AddHdl, Button*, void ); + DECL_LINK_TYPED( RemoveHdl, Button*, void ); DECL_LINK( SelFmtHdl, void * ); - DECL_LINK( CloseHdl, PushButton * ); + DECL_LINK_TYPED( CloseHdl, Button *, void ); DECL_LINK( DblClkHdl, void * ); - DECL_LINK( RenameHdl, void *); + DECL_LINK_TYPED( RenameHdl, Button*, void); }; #endif diff --git a/sc/source/ui/inc/scuiimoptdlg.hxx b/sc/source/ui/inc/scuiimoptdlg.hxx index 348d27878dae..890d84da0e2c 100644 --- a/sc/source/ui/inc/scuiimoptdlg.hxx +++ b/sc/source/ui/inc/scuiimoptdlg.hxx @@ -61,7 +61,7 @@ private: private: sal_uInt16 GetCodeFromCombo( const ComboBox& rEd ) const; - DECL_LINK( FixedWidthHdl, CheckBox* ); + DECL_LINK_TYPED( FixedWidthHdl, Button*, void ); DECL_LINK( DoubleClickHdl, ListBox* ); }; diff --git a/sc/source/ui/inc/scuitphfedit.hxx b/sc/source/ui/inc/scuitphfedit.hxx index 3fddc293ddad..127767f531f3 100644 --- a/sc/source/ui/inc/scuitphfedit.hxx +++ b/sc/source/ui/inc/scuitphfedit.hxx @@ -98,7 +98,7 @@ private: static bool IsDateEntry(EditTextObject* pTextObj); static bool IsExtFileNameEntry(EditTextObject* pTextObj); DECL_LINK( ListHdl_Impl, ListBox* ); - DECL_LINK( ClickHdl, PushButton* ); + DECL_LINK_TYPED( ClickHdl, Button*, void ); DECL_STATIC_LINK( ScHFEditPage, MenuHdl, ScExtIButton* ); }; diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx index ca290c49de56..47c320217c35 100644 --- a/sc/source/ui/inc/simpref.hxx +++ b/sc/source/ui/inc/simpref.hxx @@ -56,8 +56,8 @@ private: void Init(); - DECL_LINK( CancelBtnHdl, void * ); - DECL_LINK( OkBtnHdl, void * ); + DECL_LINK_TYPED( CancelBtnHdl, Button*, void ); + DECL_LINK_TYPED( OkBtnHdl, Button*, void ); protected: diff --git a/sc/source/ui/inc/solveroptions.hxx b/sc/source/ui/inc/solveroptions.hxx index 28e557e08b3f..db7926f9afab 100644 --- a/sc/source/ui/inc/solveroptions.hxx +++ b/sc/source/ui/inc/solveroptions.hxx @@ -48,7 +48,7 @@ class ScSolverOptionsDialog : public ModalDialog DECL_LINK( EngineSelectHdl, void* ); DECL_LINK( SettingsSelHdl, void* ); DECL_LINK( SettingsDoubleClickHdl, void* ); - DECL_LINK( ButtonHdl, PushButton* ); + DECL_LINK_TYPED( ButtonHdl, Button*, void ); void ReadFromComponent(); void FillListBox(); diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx index 253067a20d95..f937d8fecaf3 100644 --- a/sc/source/ui/inc/solvrdlg.hxx +++ b/sc/source/ui/inc/solvrdlg.hxx @@ -80,7 +80,7 @@ private: bool CheckTargetValue( const OUString& rStrVal ); void RaiseError( ScSolverErr eError ); - DECL_LINK( BtnHdl, PushButton* ); + DECL_LINK_TYPED( BtnHdl, Button*, void ); DECL_LINK( GetFocusHdl, Control* ); DECL_LINK( LoseFocusHdl, void* ); }; diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx index c514aaffd8e9..65492a0b0e84 100644 --- a/sc/source/ui/inc/sortdlg.hxx +++ b/sc/source/ui/inc/sortdlg.hxx @@ -47,7 +47,7 @@ public: ScSortWarningDlg( vcl::Window* pParent, const OUString& rExtendText,const OUString& rCurrentText ); virtual ~ScSortWarningDlg(); virtual void dispose() SAL_OVERRIDE; - DECL_LINK( BtnHdl, PushButton* ); + DECL_LINK_TYPED( BtnHdl, Button*, void ); private: VclPtr<FixedText> aFtText; VclPtr<PushButton> aBtnExtSort; diff --git a/sc/source/ui/inc/subtdlg.hxx b/sc/source/ui/inc/subtdlg.hxx index 749e9d94dfcb..2dd41dcb4291 100644 --- a/sc/source/ui/inc/subtdlg.hxx +++ b/sc/source/ui/inc/subtdlg.hxx @@ -32,7 +32,7 @@ public: virtual void dispose() SAL_OVERRIDE; private: VclPtr<PushButton> m_pBtnRemove; - DECL_LINK( RemoveHdl, PushButton * ); + DECL_LINK_TYPED( RemoveHdl, Button *, void ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_SUBTDLG_HXX diff --git a/sc/source/ui/inc/tabbgcolordlg.hxx b/sc/source/ui/inc/tabbgcolordlg.hxx index 122f112c068b..b0576cac3332 100644 --- a/sc/source/ui/inc/tabbgcolordlg.hxx +++ b/sc/source/ui/inc/tabbgcolordlg.hxx @@ -64,7 +64,7 @@ private: void FillColorValueSets_Impl(); DECL_LINK(TabBgColorDblClickHdl_Impl, void *); - DECL_LINK(TabBgColorOKHdl_Impl, void *); + DECL_LINK_TYPED(TabBgColorOKHdl_Impl, Button*, void); }; #endif // INCLUDED_SC_SOURCE_UI_INC_TABBGCOLORDLG_HXX diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx index 33c247f7cfcd..fb1e1d2081a4 100644 --- a/sc/source/ui/inc/tabopdlg.hxx +++ b/sc/source/ui/inc/tabopdlg.hxx @@ -87,7 +87,7 @@ private: void Init(); void RaiseError( ScTabOpErr eError ); - DECL_LINK( BtnHdl, PushButton* ); + DECL_LINK_TYPED( BtnHdl, Button*, void ); DECL_LINK( GetFocusHdl, Control* ); DECL_LINK( LoseFocusHdl, void* ); }; diff --git a/sc/source/ui/inc/tabpages.hxx b/sc/source/ui/inc/tabpages.hxx index 999c52a0b0bf..7ab302b7abac 100644 --- a/sc/source/ui/inc/tabpages.hxx +++ b/sc/source/ui/inc/tabpages.hxx @@ -59,7 +59,7 @@ private: bool bHidePrint; // Handler: - DECL_LINK( ButtonClickHdl, TriStateBox* ); + DECL_LINK_TYPED( ButtonClickHdl, Button*, void ); void UpdateButtons(); }; diff --git a/sc/source/ui/inc/textimportoptions.hxx b/sc/source/ui/inc/textimportoptions.hxx index d7c8a5dec970..4eda9235c23f 100644 --- a/sc/source/ui/inc/textimportoptions.hxx +++ b/sc/source/ui/inc/textimportoptions.hxx @@ -50,9 +50,9 @@ private: VclPtr<CheckBox> m_pBtnConvertDate; - DECL_LINK(OKHdl, void *); + DECL_LINK_TYPED(OKHdl, Button*, void); - DECL_LINK( RadioHdl, RadioButton* ); + DECL_LINK_TYPED( RadioHdl, Button*, void ); }; #endif diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx index 0b27e75b27b6..9a51172ec4f1 100644 --- a/sc/source/ui/inc/tpcalc.hxx +++ b/sc/source/ui/inc/tpcalc.hxx @@ -67,16 +67,16 @@ private: VclPtr<FixedText> m_pFtPrec; VclPtr<NumericField> m_pEdPrec; - ScDocOptions* pOldOptions; - ScDocOptions* pLocalOptions; - sal_uInt16 nWhichCalc; + ScDocOptions* pOldOptions; + ScDocOptions* pLocalOptions; + sal_uInt16 nWhichCalc; private: void Init(); // Handler: - DECL_LINK( RadioClickHdl, RadioButton* ); - DECL_LINK( CheckClickHdl, CheckBox* ); + DECL_LINK_TYPED( RadioClickHdl, Button*, void ); + DECL_LINK_TYPED( CheckClickHdl, Button*, void ); }; #endif diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx index a3175b8ee1fd..1024c7dcb878 100644 --- a/sc/source/ui/inc/tpformula.hxx +++ b/sc/source/ui/inc/tpformula.hxx @@ -52,7 +52,7 @@ private: bool IsValidSeparator(const OUString& rSep) const; bool IsValidSeparatorSet() const; - DECL_LINK( ButtonHdl, Button* ); + DECL_LINK_TYPED( ButtonHdl, Button*, void ); DECL_LINK( SepModifyHdl, Edit* ); DECL_LINK( SepEditOnFocusHdl, Edit* ); diff --git a/sc/source/ui/inc/tphf.hxx b/sc/source/ui/inc/tphf.hxx index 9f5c8a599a23..9933947fb837 100644 --- a/sc/source/ui/inc/tphf.hxx +++ b/sc/source/ui/inc/tphf.hxx @@ -53,9 +53,9 @@ private: sal_uInt16 nPageUsage; VclPtr<ScStyleDlg> pStyleDlg; - DECL_LINK(BtnHdl, void *); + DECL_LINK_TYPED(BtnHdl, Button*, void); DECL_LINK( HFEditHdl, void* ); - DECL_LINK(TurnOnHdl, void *); + DECL_LINK_TYPED(TurnOnHdl, Button*, void); }; class ScHeaderPage : public ScHFPage diff --git a/sc/source/ui/inc/tpsort.hxx b/sc/source/ui/inc/tpsort.hxx index 0aa944192ba9..d642b2bea328 100644 --- a/sc/source/ui/inc/tpsort.hxx +++ b/sc/source/ui/inc/tpsort.hxx @@ -164,10 +164,10 @@ private: void FillUserSortListBox (); // Handler ------------------------ - DECL_LINK( EnableHdl, CheckBox * ); + DECL_LINK_TYPED( EnableHdl, Button*, void ); DECL_LINK( SelOutPosHdl, ListBox * ); void EdOutPosModHdl ( Edit* pEd ); - DECL_LINK( SortDirHdl, RadioButton * ); + DECL_LINK_TYPED( SortDirHdl, Button *, void ); DECL_LINK( FillAlgorHdl, void * ); }; diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx index 3295262e33b2..f31b635b51e5 100644 --- a/sc/source/ui/inc/tpsubt.hxx +++ b/sc/source/ui/inc/tpsubt.hxx @@ -158,7 +158,7 @@ private: void FillUserSortListBox (); // Handler ------------------------ - DECL_LINK( CheckHdl, CheckBox * ); + DECL_LINK_TYPED( CheckHdl, Button*, void ); }; #endif // INCLUDED_SC_SOURCE_UI_INC_TPSUBT_HXX diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx index 46042b854896..a7babb368e2a 100644 --- a/sc/source/ui/inc/tptable.hxx +++ b/sc/source/ui/inc/tptable.hxx @@ -73,8 +73,8 @@ private: private: // Handler: - DECL_LINK(PageDirHdl, void *); - DECL_LINK( PageNoHdl, CheckBox* ); + DECL_LINK_TYPED(PageDirHdl, Button*, void); + DECL_LINK_TYPED( PageNoHdl, Button*, void ); DECL_LINK(ScaleHdl, void *); }; diff --git a/sc/source/ui/inc/tpusrlst.hxx b/sc/source/ui/inc/tpusrlst.hxx index 2a4c28ffc77f..8195c7d45c23 100644 --- a/sc/source/ui/inc/tpusrlst.hxx +++ b/sc/source/ui/inc/tpusrlst.hxx @@ -96,7 +96,7 @@ private: // Handler: DECL_LINK( LbSelectHdl, ListBox* ); - DECL_LINK( BtnClickHdl, PushButton* ); + 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 2dc3667ae9ab..96d1e1b7acbe 100644 --- a/sc/source/ui/inc/tpview.hxx +++ b/sc/source/ui/inc/tpview.hxx @@ -63,7 +63,7 @@ class ScTpContentOptions : public SfxTabPage void InitGridOpt(); DECL_LINK( GridHdl, ListBox* ); DECL_LINK( SelLbObjHdl, ListBox* ); - DECL_LINK( CBHdl, CheckBox* ); + DECL_LINK_TYPED( CBHdl, Button*, void ); ScTpContentOptions( vcl::Window* pParent, const SfxItemSet& rArgSet ); @@ -107,7 +107,7 @@ class ScTpLayoutOptions : public SfxTabPage SvxStringArray aUnitArr; DECL_LINK(MetricHdl, void *); - DECL_LINK( AlignHdl, CheckBox* ); + 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 d050942fb8bb..00a66ac50927 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -101,7 +101,7 @@ private: void SetSecondFormula( const OUString& rFmlaStr ); DECL_LINK(SelectHdl, void *); - DECL_LINK(CheckHdl, void *); + DECL_LINK_TYPED(CheckHdl, Button*, void); VclPtr<ListBox> m_pLbAllow; VclPtr<CheckBox> m_pCbAllow; /// Allow blank cells. @@ -299,7 +299,7 @@ private: // Handler ------------------------ DECL_LINK(SelectActionHdl, void *); - DECL_LINK(ClickSearchHdl, void *); + DECL_LINK_TYPED(ClickSearchHdl, Button*, void); public: ScTPValidationError( vcl::Window* pParent, const SfxItemSet& rArgSet ); diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx index 1bc0c375c936..44c6d7ebc3c1 100644 --- a/sc/source/ui/inc/xmlsourcedlg.hxx +++ b/sc/source/ui/inc/xmlsourcedlg.hxx @@ -95,7 +95,7 @@ private: void RefEditModified(); DECL_LINK(GetFocusHdl, Control*); - DECL_LINK(BtnPressedHdl, Button*); + DECL_LINK_TYPED(BtnPressedHdl, Button*, void); DECL_LINK(TreeItemSelectHdl, void*); DECL_LINK(RefModifiedHdl, void*); }; diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx index 23704b345a29..907938dc27db 100644 --- a/sc/source/ui/miscdlgs/conflictsdlg.cxx +++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx @@ -653,32 +653,24 @@ void ScConflictsDlg::KeepAllHandler( bool bMine ) EndDialog( RET_OK ); } -IMPL_LINK_NOARG(ScConflictsDlg, KeepMineHandle) +IMPL_LINK_NOARG_TYPED(ScConflictsDlg, KeepMineHandle, Button*, void) { KeepHandler( true ); - - return 0; } -IMPL_LINK_NOARG(ScConflictsDlg, KeepOtherHandle) +IMPL_LINK_NOARG_TYPED(ScConflictsDlg, KeepOtherHandle, Button*, void) { KeepHandler( false ); - - return 0; } -IMPL_LINK_NOARG(ScConflictsDlg, KeepAllMineHandle) +IMPL_LINK_NOARG_TYPED(ScConflictsDlg, KeepAllMineHandle, Button*, void) { KeepAllHandler( true ); - - return 0; } -IMPL_LINK_NOARG(ScConflictsDlg, KeepAllOthersHandle) +IMPL_LINK_NOARG_TYPED(ScConflictsDlg, KeepAllOthersHandle, Button*, void) { KeepAllHandler( false ); - - return 0; } void ScConflictsDlg::UpdateView() diff --git a/sc/source/ui/miscdlgs/crdlg.cxx b/sc/source/ui/miscdlgs/crdlg.cxx index f4dbff4623f5..2fc9fe903231 100644 --- a/sc/source/ui/miscdlgs/crdlg.cxx +++ b/sc/source/ui/miscdlgs/crdlg.cxx @@ -59,10 +59,9 @@ void ScColOrRowDlg::dispose() } -IMPL_LINK_NOARG(ScColOrRowDlg, OkHdl) +IMPL_LINK_NOARG_TYPED(ScColOrRowDlg, OkHdl, Button*, void) { EndDialog( m_pBtnCols->IsChecked() ? SCRET_COLS : SCRET_ROWS ); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index 8d7c3f7fe52e..fa24392796b8 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -500,7 +500,7 @@ bool ScColRowNameRangesDlg::IsRefInputMode() const // handler called when OK is clicked, calls the add button handler before // passing the range lists to the document -IMPL_LINK_NOARG(ScColRowNameRangesDlg, OkBtnHdl) +IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, OkBtnHdl, Button*, void) { AddBtnHdl( 0 ); @@ -514,17 +514,15 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, OkBtnHdl) pDocShell->SetDocumentModified(); Close(); - return 0; } -IMPL_LINK_NOARG(ScColRowNameRangesDlg, CancelBtnHdl) +IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, CancelBtnHdl, Button*, void) { Close(); - return 0; } // handler called when add button clicked: set ranges and add to listbox -IMPL_LINK_NOARG(ScColRowNameRangesDlg, AddBtnHdl) +IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, AddBtnHdl, Button*, void) { OUString aNewArea( pEdAssign->GetText() ); OUString aNewData( pEdAssign2->GetText() ); @@ -577,10 +575,9 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, AddBtnHdl) pEdAssign2->GrabFocus(); } } - return 0; } -IMPL_LINK_NOARG(ScColRowNameRangesDlg, RemoveBtnHdl) +IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, RemoveBtnHdl, Button*, void) { OUString aRangeStr = pLbRange->GetSelectEntry(); sal_uInt16 nSelectPos = pLbRange->GetSelectEntryPos(); @@ -588,7 +585,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RemoveBtnHdl) (reinterpret_cast<sal_uLong>(pLbRange->GetEntryData( nSelectPos )) == nEntryDataCol); NameRangeMap::const_iterator itr = aRangeMap.find(aRangeStr); if (itr == aRangeMap.end()) - return 0; + return; const ScRange& rRange = itr->second; ScRangePair* pPair = NULL; @@ -638,7 +635,6 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RemoveBtnHdl) Range1SelectHdl( 0 ); } } - return 0; } // handler called when a row in the listbox is selected, updates form input fields @@ -768,7 +764,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range2DataModifyHdl) } // handler for the radio button for columns, adjust ranges -IMPL_LINK_NOARG(ScColRowNameRangesDlg, ColClickHdl) +IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, ColClickHdl, Button*, void) { if ( !pBtnColHead->GetSavedValue() ) { @@ -785,11 +781,10 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, ColClickHdl) aRange.aEnd.SetRow( MAXROW ); AdjustColRowData( aRange ); } - return 0; } // handler for the radio button for columns, adjust range -IMPL_LINK_NOARG(ScColRowNameRangesDlg, RowClickHdl) +IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, RowClickHdl, Button*, void) { if ( !pBtnRowHead->GetSavedValue() ) { @@ -806,7 +801,6 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RowClickHdl) aRange.aEnd.SetCol( MAXCOL ); AdjustColRowData( aRange ); } - return 0; } IMPL_LINK( ScColRowNameRangesDlg, GetFocusHdl, Control*, pCtrl ) diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx index 5b1d6c8f2d6f..4eb2c94bb2ec 100644 --- a/sc/source/ui/miscdlgs/datafdlg.cxx +++ b/sc/source/ui/miscdlgs/datafdlg.cxx @@ -258,7 +258,7 @@ IMPL_LINK( ScDataFormDlg, Impl_DataModifyHdl, Edit*, pEdit) return 0; } -IMPL_LINK_NOARG(ScDataFormDlg, Impl_NewHdl) +IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_NewHdl, Button*, void) { ScViewData& rViewData = pTabViewShell->GetViewData(); ScDocShell* pDocSh = rViewData.GetDocShell(); @@ -289,10 +289,9 @@ IMPL_LINK_NOARG(ScDataFormDlg, Impl_NewHdl) pDocSh->PostPaintGridAll(); } } - return 0; } -IMPL_LINK_NOARG(ScDataFormDlg, Impl_PrevHdl) +IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_PrevHdl, Button*, void) { if (pDoc) { @@ -302,10 +301,9 @@ IMPL_LINK_NOARG(ScDataFormDlg, Impl_PrevHdl) SetButtonState(); FillCtrls(nCurrentRow); } - return 0; } -IMPL_LINK_NOARG(ScDataFormDlg, Impl_NextHdl) +IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_NextHdl, Button*, void) { if (pDoc) { @@ -315,19 +313,17 @@ IMPL_LINK_NOARG(ScDataFormDlg, Impl_NextHdl) SetButtonState(); FillCtrls(nCurrentRow); } - return 0; } -IMPL_LINK_NOARG(ScDataFormDlg, Impl_RestoreHdl) +IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_RestoreHdl, Button*, void) { if (pDoc) { FillCtrls(nCurrentRow); } - return 0; } -IMPL_LINK_NOARG(ScDataFormDlg, Impl_DeleteHdl) +IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_DeleteHdl, Button*, void) { ScViewData& rViewData = pTabViewShell->GetViewData(); ScDocShell* pDocSh = rViewData.GetDocShell(); @@ -344,13 +340,11 @@ IMPL_LINK_NOARG(ScDataFormDlg, Impl_DeleteHdl) pDocSh->SetDocumentModified(); pDocSh->PostPaintGridAll(); } - return 0; } -IMPL_LINK_NOARG(ScDataFormDlg, Impl_CloseHdl) +IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_CloseHdl, Button*, void) { EndDialog( ); - return 0; } IMPL_LINK_NOARG(ScDataFormDlg, Impl_ScrollHdl) diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx index 7f6c826a46de..5ba0bd1b6af0 100644 --- a/sc/source/ui/miscdlgs/datastreamdlg.cxx +++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx @@ -40,13 +40,13 @@ DataStreamDlg::DataStreamDlg(ScDocShell *pDocShell, vcl::Window* pParent) get(m_pVclFrameMove, "framemove"); m_pCbUrl->SetSelectHdl( LINK( this, DataStreamDlg, UpdateHdl ) ); - m_pRBAddressValue->SetClickHdl( LINK( this, DataStreamDlg, UpdateHdl ) ); + m_pRBAddressValue->SetClickHdl( LINK( this, DataStreamDlg, UpdateClickHdl ) ); m_pRBAddressValue->Enable(false); m_pRBScriptData->Enable(false); m_pRBDirectData->Hide(); m_pRBScriptData->Hide(); m_pRBNoMove->Hide(); - m_pRBValuesInLine->SetClickHdl( LINK( this, DataStreamDlg, UpdateHdl ) ); + m_pRBValuesInLine->SetClickHdl( LINK( this, DataStreamDlg, UpdateClickHdl ) ); m_pEdRange->SetModifyHdl( LINK( this, DataStreamDlg, UpdateHdl ) ); m_pBtnBrowse->SetClickHdl( LINK( this, DataStreamDlg, BrowseHdl ) ); UpdateEnable(); @@ -79,17 +79,20 @@ void DataStreamDlg::dispose() ModalDialog::dispose(); } -IMPL_LINK_NOARG(DataStreamDlg, BrowseHdl) +IMPL_LINK_NOARG_TYPED(DataStreamDlg, BrowseHdl, Button*, void) { sfx2::FileDialogHelper aFileDialog(0, 0); if ( aFileDialog.Execute() != ERRCODE_NONE ) - return 0; + return; m_pCbUrl->SetText( aFileDialog.GetPath() ); UpdateEnable(); - return 0; } +IMPL_LINK_NOARG_TYPED(DataStreamDlg, UpdateClickHdl, Button*, void) +{ + UpdateEnable(); +} IMPL_LINK_NOARG(DataStreamDlg, UpdateHdl) { UpdateEnable(); diff --git a/sc/source/ui/miscdlgs/delcodlg.cxx b/sc/source/ui/miscdlgs/delcodlg.cxx index 3ebd534f0e86..3ab1ecb854f4 100644 --- a/sc/source/ui/miscdlgs/delcodlg.cxx +++ b/sc/source/ui/miscdlgs/delcodlg.cxx @@ -150,11 +150,9 @@ void ScDeleteContentsDlg::DisableObjects() aBtnDelObjects->Disable(); } -IMPL_LINK_NOARG(ScDeleteContentsDlg, DelAllHdl) +IMPL_LINK_NOARG_TYPED(ScDeleteContentsDlg, DelAllHdl, Button*, void) { DisableChecks( aBtnDelAll->IsChecked() ); - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/filldlg.cxx b/sc/source/ui/miscdlgs/filldlg.cxx index 73244b6304e8..a254a0ee8aa8 100644 --- a/sc/source/ui/miscdlgs/filldlg.cxx +++ b/sc/source/ui/miscdlgs/filldlg.cxx @@ -251,7 +251,7 @@ bool ScFillSeriesDlg::CheckEndVal() // Handler: -IMPL_LINK( ScFillSeriesDlg, DisableHdl, Button *, pBtn ) +IMPL_LINK_TYPED( ScFillSeriesDlg, DisableHdl, Button *, pBtn, void ) { if ( pBtn == m_pBtnDate ) { @@ -284,10 +284,9 @@ IMPL_LINK( ScFillSeriesDlg, DisableHdl, Button *, pBtn ) m_pFtEndVal->Disable(); m_pEdEndVal->Disable(); } - return 0; } -IMPL_LINK_NOARG(ScFillSeriesDlg, OKHdl) +IMPL_LINK_NOARG_TYPED(ScFillSeriesDlg, OKHdl, Button*, void) { if ( m_pBtnLeft->IsChecked() ) theFillDir = FILL_TO_LEFT; else if ( m_pBtnRight->IsChecked() ) theFillDir = FILL_TO_RIGHT; @@ -328,8 +327,6 @@ IMPL_LINK_NOARG(ScFillSeriesDlg, OKHdl) ScopedVclPtr<MessageDialog>::Create(this, aErrMsgInvalidVal)->Execute(); pEdWrong->GrabFocus(); } - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx index b9d893f301f4..d59aec06a6cb 100644 --- a/sc/source/ui/miscdlgs/highred.cxx +++ b/sc/source/ui/miscdlgs/highred.cxx @@ -183,7 +183,7 @@ bool ScHighlightChgDlg::IsRefInputMode() const return m_pEdAssign->IsVisible(); } -IMPL_LINK( ScHighlightChgDlg, HighlightHandle, CheckBox*, pCb ) +IMPL_LINK_TYPED( ScHighlightChgDlg, HighlightHandle, Button*, pCb, void ) { if(pCb!=NULL) { @@ -200,7 +200,6 @@ IMPL_LINK( ScHighlightChgDlg, HighlightHandle, CheckBox*, pCb ) m_pCbReject->Disable(); } } - return 0; } IMPL_LINK( ScHighlightChgDlg, RefHandle, SvxTPFilter*, pRef ) @@ -217,7 +216,7 @@ IMPL_LINK( ScHighlightChgDlg, RefHandle, SvxTPFilter*, pRef ) return 0; } -IMPL_LINK( ScHighlightChgDlg, OKBtnHdl, PushButton*, pOKBtn ) +IMPL_LINK_TYPED( ScHighlightChgDlg, OKBtnHdl, Button*, pOKBtn, void ) { if (pOKBtn == m_pOkButton) { @@ -246,7 +245,6 @@ IMPL_LINK( ScHighlightChgDlg, OKBtnHdl, PushButton*, pOKBtn ) pViewData->GetDocShell()->PostPaintGridAll(); Close(); } - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx index 0b3357e9e814..9a7922a03821 100644 --- a/sc/source/ui/miscdlgs/inscodlg.cxx +++ b/sc/source/ui/miscdlgs/inscodlg.cxx @@ -306,7 +306,7 @@ void ScInsertContentsDlg::SetCellShiftDisabled( int nDisable ) } } -IMPL_LINK( ScInsertContentsDlg, ShortCutHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScInsertContentsDlg, ShortCutHdl, Button*, pBtn, void ) { if ( pBtn == mpBtnShortCutPasteValuesOnly ) { @@ -341,22 +341,17 @@ IMPL_LINK( ScInsertContentsDlg, ShortCutHdl, PushButton*, pBtn ) nShortCutMoveMode = INS_NONE; EndDialog(RET_OK); } - return 0; } -IMPL_LINK_NOARG(ScInsertContentsDlg, InsAllHdl) +IMPL_LINK_NOARG_TYPED(ScInsertContentsDlg, InsAllHdl, Button*, void) { DisableChecks( mpBtnInsAll->IsChecked() ); - - return 0; } -IMPL_LINK_NOARG(ScInsertContentsDlg, LinkBtnHdl) +IMPL_LINK_NOARG_TYPED(ScInsertContentsDlg, LinkBtnHdl, Button*, void) { TestModes(); - - return 0; } ScInsertContentsDlg::~ScInsertContentsDlg() diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index 11d0458a3ec0..8cef9ad6f2d6 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -268,7 +268,7 @@ IMPL_LINK_NOARG(ScInsertTableDlg, CountHdl_Impl) return 0; } -IMPL_LINK_NOARG(ScInsertTableDlg, ChoiceHdl_Impl) +IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, ChoiceHdl_Impl, Button*, void) { if ( m_pBtnNew->IsChecked() ) SetNewTable_Impl(); @@ -276,16 +276,14 @@ IMPL_LINK_NOARG(ScInsertTableDlg, ChoiceHdl_Impl) SetFromTo_Impl(); DoEnable_Impl(); - return 0; } -IMPL_LINK_NOARG(ScInsertTableDlg, BrowseHdl_Impl) +IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, BrowseHdl_Impl, Button*, void) { delete pDocInserter; pDocInserter = new ::sfx2::DocumentInserter( OUString::createFromAscii( ScDocShell::Factory().GetShortName() ) ); pDocInserter->StartExecuteModal( LINK( this, ScInsertTableDlg, DialogClosedHdl ) ); - return 0; } IMPL_LINK_NOARG(ScInsertTableDlg, SelectHdl_Impl) @@ -302,7 +300,7 @@ void ScInsertTableDlg::DoEnable_Impl() m_pBtnOk->Disable(); } -IMPL_LINK_NOARG(ScInsertTableDlg, DoEnterHdl) +IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, DoEnterHdl, Button*, void) { if(nTableCount > 1 || ScDocument::ValidTabName(m_pEdName->GetText())) { @@ -313,7 +311,6 @@ IMPL_LINK_NOARG(ScInsertTableDlg, DoEnterHdl) OUString aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) ); (void)ScopedVclPtrInstance<MessageDialog>::Create(this, aErrMsg)->Execute(); } - return 0; } IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, BrowseTimeoutHdl, Timer *, void) diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx index 3b0d426b7b0f..246cac6e3a0c 100644 --- a/sc/source/ui/miscdlgs/linkarea.cxx +++ b/sc/source/ui/miscdlgs/linkarea.cxx @@ -95,13 +95,12 @@ short ScLinkedAreaDlg::Execute() #define FILTERNAME_HTML "HTML (StarCalc)" #define FILTERNAME_QUERY "calc_HTML_WebQuery" -IMPL_LINK_NOARG(ScLinkedAreaDlg, BrowseHdl) +IMPL_LINK_NOARG_TYPED(ScLinkedAreaDlg, BrowseHdl, Button*, void) { if ( !pDocInserter ) pDocInserter = new sfx2::DocumentInserter( OUString::createFromAscii( ScDocShell::Factory().GetShortName() ) ); pDocInserter->StartExecuteModal( LINK( this, ScLinkedAreaDlg, DialogClosedHdl ) ); - return 0; } IMPL_LINK_NOARG(ScLinkedAreaDlg, FileHdl) @@ -204,10 +203,9 @@ IMPL_LINK_NOARG(ScLinkedAreaDlg, RangeHdl) return 0; } -IMPL_LINK_NOARG(ScLinkedAreaDlg, ReloadHdl) +IMPL_LINK_NOARG_TYPED(ScLinkedAreaDlg, ReloadHdl, Button*, void) { UpdateEnable(); - return 0; } IMPL_LINK_TYPED( ScLinkedAreaDlg, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, void ) diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx index f59a36cb22b2..92c39f599d66 100644 --- a/sc/source/ui/miscdlgs/mtrindlg.cxx +++ b/sc/source/ui/miscdlgs/mtrindlg.cxx @@ -96,7 +96,7 @@ long ScMetricInputDlg::GetInputValue( FieldUnit eUnit ) const // Handler: -IMPL_LINK_NOARG(ScMetricInputDlg, SetDefValHdl) +IMPL_LINK_NOARG_TYPED(ScMetricInputDlg, SetDefValHdl, Button*, void) { if ( m_pBtnDefVal->IsChecked() ) { @@ -105,7 +105,6 @@ IMPL_LINK_NOARG(ScMetricInputDlg, SetDefValHdl) } else m_pEdValue->SetValue( nCurrentValue ); - return 0; } IMPL_LINK_NOARG(ScMetricInputDlg, ModifyHdl) diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 4359e1b9f8d2..6840c5297d0e 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -263,7 +263,7 @@ IMPL_LINK( ScMoveTableDlg, CheckBtnHdl, void *, pBtn ) return 0; } -IMPL_LINK_NOARG(ScMoveTableDlg, OkHdl) +IMPL_LINK_NOARG_TYPED(ScMoveTableDlg, OkHdl, Button*, void) { sal_uInt16 nDocSel = pLbDoc->GetSelectEntryPos(); sal_uInt16 nDocLast = pLbDoc->GetEntryCount()-1; @@ -294,8 +294,6 @@ IMPL_LINK_NOARG(ScMoveTableDlg, OkHdl) } EndDialog( RET_OK ); - - return 0; } IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb ) diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 2cb6a11f967e..60cdf3df92cb 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -120,13 +120,12 @@ void ScSolverSuccessDialog::dispose() ModalDialog::dispose(); } -IMPL_LINK( ScSolverSuccessDialog, ClickHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScSolverSuccessDialog, ClickHdl, Button*, pBtn, void ) { if (pBtn == m_pBtnOk) EndDialog(RET_OK); else EndDialog(); - return 0; } ScCursorRefEdit::ScCursorRefEdit( vcl::Window* pParent, vcl::Window *pLabel ) @@ -600,7 +599,7 @@ bool ScOptSolverDlg::IsRefInputMode() const // Handler: -IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScOptSolverDlg, BtnHdl, Button*, pBtn, void ) { if ( pBtn == m_pBtnSolve || pBtn == m_pBtnCancel ) { @@ -640,8 +639,6 @@ IMPL_LINK( ScOptSolverDlg, BtnHdl, PushButton*, pBtn ) maProperties = pOptDlg->GetProperties(); } } - - return 0; } IMPL_LINK( ScOptSolverDlg, GetFocusHdl, Control*, pCtrl ) @@ -679,7 +676,7 @@ IMPL_LINK_NOARG(ScOptSolverDlg, LoseFocusHdl) return 0; } -IMPL_LINK( ScOptSolverDlg, DelBtnHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScOptSolverDlg, DelBtnHdl, Button*, pBtn, void ) { for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow ) if( pBtn == mpDelButton[nRow] ) @@ -703,8 +700,6 @@ IMPL_LINK( ScOptSolverDlg, DelBtnHdl, PushButton*, pBtn ) } } } - - return 0; } IMPL_LINK_NOARG(ScOptSolverDlg, TargetModifyHdl) diff --git a/sc/source/ui/miscdlgs/protectiondlg.cxx b/sc/source/ui/miscdlgs/protectiondlg.cxx index 826689fe5392..eac9eac93291 100644 --- a/sc/source/ui/miscdlgs/protectiondlg.cxx +++ b/sc/source/ui/miscdlgs/protectiondlg.cxx @@ -89,13 +89,11 @@ void ScTableProtectionDlg::WriteData(ScTableProtection& rData) const void ScTableProtectionDlg::Init() { - Link<> aLink = LINK( this, ScTableProtectionDlg, CheckBoxHdl ); - m_pBtnProtect->SetClickHdl(aLink); + m_pBtnProtect->SetClickHdl(LINK( this, ScTableProtectionDlg, CheckBoxHdl )); - aLink = LINK( this, ScTableProtectionDlg, OKHdl ); - m_pBtnOk->SetClickHdl(aLink); + m_pBtnOk->SetClickHdl(LINK( this, ScTableProtectionDlg, OKHdl )); - aLink = LINK( this, ScTableProtectionDlg, PasswordModifyHdl ); + Link<> aLink = LINK( this, ScTableProtectionDlg, PasswordModifyHdl ); m_pPassword1Edit->SetModifyHdl(aLink); m_pPassword2Edit->SetModifyHdl(aLink); @@ -122,7 +120,7 @@ void ScTableProtectionDlg::EnableOptionalWidgets(bool bEnable) m_pOptionsListBox->Invalidate(); } -IMPL_LINK( ScTableProtectionDlg, CheckBoxHdl, CheckBox*, pBtn ) +IMPL_LINK_TYPED( ScTableProtectionDlg, CheckBoxHdl, Button*, pBtn, void ) { if (pBtn == m_pBtnProtect) { @@ -130,14 +128,11 @@ IMPL_LINK( ScTableProtectionDlg, CheckBoxHdl, CheckBox*, pBtn ) EnableOptionalWidgets(bChecked); m_pBtnOk->Enable(bChecked); } - - return 0; } -IMPL_LINK_NOARG(ScTableProtectionDlg, OKHdl) +IMPL_LINK_NOARG_TYPED(ScTableProtectionDlg, OKHdl, Button*, void) { EndDialog(RET_OK); - return 0; } IMPL_LINK_NOARG(ScTableProtectionDlg, PasswordModifyHdl) diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx index 662a2a9fcef9..639f74744d80 100644 --- a/sc/source/ui/miscdlgs/retypepassdlg.cxx +++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx @@ -153,7 +153,7 @@ void ScRetypePassDlg::WriteNewDataToDocument(ScDocument& rDoc) const void ScRetypePassDlg::Init() { - Link<> aLink = LINK( this, ScRetypePassDlg, OKHdl ); + Link<Button*,void> aLink = LINK( this, ScRetypePassDlg, OKHdl ); mpBtnOk->SetClickHdl(aLink); aLink = LINK( this, ScRetypePassDlg, RetypeBtnHdl ); @@ -263,13 +263,12 @@ void ScRetypePassDlg::CheckHashStatus() mpBtnOk->Disable(); } -IMPL_LINK_NOARG(ScRetypePassDlg, OKHdl) +IMPL_LINK_NOARG_TYPED(ScRetypePassDlg, OKHdl, Button*, void) { EndDialog(RET_OK); - return 0; } -IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScRetypePassDlg, RetypeBtnHdl, Button*, pBtn, void ) { ScPassHashProtectable* pProtected = NULL; if (pBtn == mpBtnRetypeDoc) @@ -289,7 +288,7 @@ IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn ) if (!pProtected) // What the ... !? - return 0; + return; ScopedVclPtrInstance< ScRetypePassInputDlg > aDlg(this, pProtected); if (aDlg->Execute() == RET_OK) @@ -310,7 +309,6 @@ IMPL_LINK( ScRetypePassDlg, RetypeBtnHdl, PushButton*, pBtn ) SetDocData(); CheckHashStatus(); } - return 0; } ScRetypePassInputDlg::ScRetypePassInputDlg(vcl::Window* pParent, ScPassHashProtectable* pProtected) @@ -363,16 +361,16 @@ OUString ScRetypePassInputDlg::GetNewPassword() const void ScRetypePassInputDlg::Init() { - Link<> aLink = LINK( this, ScRetypePassInputDlg, OKHdl ); + Link<Button*,void> aLink = LINK( this, ScRetypePassInputDlg, OKHdl ); m_pBtnOk->SetClickHdl(aLink); aLink = LINK( this, ScRetypePassInputDlg, RadioBtnHdl ); m_pBtnRetypePassword->SetClickHdl(aLink); m_pBtnRemovePassword->SetClickHdl(aLink); aLink = LINK( this, ScRetypePassInputDlg, CheckBoxHdl ); m_pBtnMatchOldPass->SetClickHdl(aLink); - aLink = LINK( this, ScRetypePassInputDlg, PasswordModifyHdl ); - m_pPassword1Edit->SetModifyHdl(aLink); - m_pPassword2Edit->SetModifyHdl(aLink); + Link<> aLink2 = LINK( this, ScRetypePassInputDlg, PasswordModifyHdl ); + m_pPassword1Edit->SetModifyHdl(aLink2); + m_pPassword2Edit->SetModifyHdl(aLink2); m_pBtnOk->Disable(); m_pBtnRetypePassword->Check(); @@ -416,13 +414,12 @@ void ScRetypePassInputDlg::CheckPasswordInput() m_pBtnOk->Enable(bPassGood); } -IMPL_LINK_NOARG(ScRetypePassInputDlg, OKHdl) +IMPL_LINK_NOARG_TYPED(ScRetypePassInputDlg, OKHdl, Button*, void) { EndDialog(RET_OK); - return 0; } -IMPL_LINK( ScRetypePassInputDlg, RadioBtnHdl, RadioButton*, pBtn ) +IMPL_LINK_TYPED( ScRetypePassInputDlg, RadioBtnHdl, Button*, pBtn, void ) { if (pBtn == m_pBtnRetypePassword) { @@ -436,14 +433,11 @@ IMPL_LINK( ScRetypePassInputDlg, RadioBtnHdl, RadioButton*, pBtn ) m_pPasswordGrid->Disable(); m_pBtnOk->Enable(); } - - return 0; } -IMPL_LINK_NOARG(ScRetypePassInputDlg, CheckBoxHdl) +IMPL_LINK_NOARG_TYPED(ScRetypePassInputDlg, CheckBoxHdl, Button*, void) { CheckPasswordInput(); - return 0; } IMPL_LINK_NOARG(ScRetypePassInputDlg, PasswordModifyHdl) diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx index fb7f9ffafe4d..f12eab8a8af0 100644 --- a/sc/source/ui/miscdlgs/scuiautofmt.cxx +++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx @@ -163,7 +163,7 @@ void ScAutoFormatDlg::UpdateChecks() // Handler: -IMPL_LINK( ScAutoFormatDlg, CloseHdl, PushButton *, pBtn ) +IMPL_LINK_TYPED( ScAutoFormatDlg, CloseHdl, Button *, pBtn, void ) { if (pBtn == m_pBtnOk || pBtn == m_pBtnCancel) { @@ -172,7 +172,6 @@ IMPL_LINK( ScAutoFormatDlg, CloseHdl, PushButton *, pBtn ) EndDialog( (pBtn == m_pBtnOk) ? RET_OK : RET_CANCEL ); } - return 0; } IMPL_LINK_NOARG(ScAutoFormatDlg, DblClkHdl) @@ -184,7 +183,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, DblClkHdl) return 0; } -IMPL_LINK( ScAutoFormatDlg, CheckHdl, Button *, pBtn ) +IMPL_LINK_TYPED( ScAutoFormatDlg, CheckHdl, Button *, pBtn, void ) { ScAutoFormatData* pData = pFormat->findByIndex(nIndex); bool bCheck = static_cast<CheckBox*>(pBtn)->IsChecked(); @@ -209,11 +208,9 @@ IMPL_LINK( ScAutoFormatDlg, CheckHdl, Button *, pBtn ) } m_pWndPreview->NotifyChange( pData ); - - return 0; } -IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl) +IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, AddHdl, Button*, void) { if ( !bFmtInserted && pSelFmtData ) { @@ -279,11 +276,9 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl) bOk = true; } } - - return 0; } -IMPL_LINK_NOARG(ScAutoFormatDlg, RemoveHdl) +IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RemoveHdl, Button*, void) { if ( (nIndex > 0) && (m_pLbFormat->GetEntryCount() > 0) ) { @@ -317,11 +312,9 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RemoveHdl) } SelFmtHdl( 0 ); - - return 0; } -IMPL_LINK_NOARG(ScAutoFormatDlg, RenameHdl) +IMPL_LINK_NOARG_TYPED(ScAutoFormatDlg, RenameHdl, Button*, void) { bool bOk = false; while( !bOk ) @@ -400,8 +393,6 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RenameHdl) else bOk = true; } - - return 0; } IMPL_LINK_NOARG(ScAutoFormatDlg, SelFmtHdl) diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx index 429b84a6140a..c6e121abaa86 100644 --- a/sc/source/ui/miscdlgs/simpref.cxx +++ b/sc/source/ui/miscdlgs/simpref.cxx @@ -190,7 +190,7 @@ void ScSimpleRefDlg::RefInputDone( bool bForced) // Handler: -IMPL_LINK_NOARG(ScSimpleRefDlg, OkBtnHdl) +IMPL_LINK_NOARG_TYPED(ScSimpleRefDlg, OkBtnHdl, Button*, void) { bAutoReOpen=false; OUString aResult=m_pEdAssign->GetText(); @@ -198,10 +198,9 @@ IMPL_LINK_NOARG(ScSimpleRefDlg, OkBtnHdl) Link<> aUnoLink = aDoneHdl; // stack var because this is deleted in DoClose DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() ); aUnoLink.Call( &aResult ); - return 0; } -IMPL_LINK_NOARG(ScSimpleRefDlg, CancelBtnHdl) +IMPL_LINK_NOARG_TYPED(ScSimpleRefDlg, CancelBtnHdl, Button*, void) { bAutoReOpen=false; OUString aResult=m_pEdAssign->GetText(); @@ -209,7 +208,6 @@ IMPL_LINK_NOARG(ScSimpleRefDlg, CancelBtnHdl) Link<> aUnoLink = aAbortedHdl; // stack var because this is deleted in DoClose DoClose( ScSimpleRefDlgWrapper::GetChildWindowId() ); aUnoLink.Call( &aResult ); - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index 66446d5d54cd..b539260f396a 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -350,12 +350,10 @@ void ScSolverOptionsDialog::EditOption() } } -IMPL_LINK( ScSolverOptionsDialog, ButtonHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScSolverOptionsDialog, ButtonHdl, Button*, pBtn, void ) { if (pBtn == m_pBtnEdit) EditOption(); - - return 0; } IMPL_LINK_NOARG(ScSolverOptionsDialog, SettingsDoubleClickHdl) diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index 09d0fa1cea88..ff37302b9658 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -199,7 +199,7 @@ bool ScSolverDlg::CheckTargetValue( const OUString& rStrVal ) // Handler: -IMPL_LINK( ScSolverDlg, BtnHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScSolverDlg, BtnHdl, Button*, pBtn, void ) { if (pBtn == m_pBtnOk) { @@ -253,8 +253,6 @@ IMPL_LINK( ScSolverDlg, BtnHdl, PushButton*, pBtn ) { Close(); } - - return 0; } IMPL_LINK( ScSolverDlg, GetFocusHdl, Control*, pCtrl ) diff --git a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx index 56541ae00c71..337cf71762f5 100644 --- a/sc/source/ui/miscdlgs/tabbgcolordlg.cxx +++ b/sc/source/ui/miscdlgs/tabbgcolordlg.cxx @@ -129,16 +129,13 @@ IMPL_LINK_NOARG(ScTabBgColorDlg, TabBgColorDblClickHdl_Impl) return 0; } -IMPL_LINK_NOARG(ScTabBgColorDlg, TabBgColorOKHdl_Impl) -{ - // Handler, called when the OK button is pushed - +IMPL_LINK_NOARG_TYPED(ScTabBgColorDlg, TabBgColorOKHdl_Impl, Button*, void) +{ sal_uInt16 nItemId = m_pTabBgColorSet->GetSelectItemId(); Color aColor = nItemId ? ( m_pTabBgColorSet->GetItemColor( nItemId ) ) : Color( COL_AUTO ); m_aTabBgColor = aColor; EndDialog( RET_OK ); - return 0; } ScTabBgColorDlg::ScTabBgColorValueSet::ScTabBgColorValueSet(vcl::Window* pParent, WinBits nStyle) diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 5ff6903d29f2..dd74ab0e431a 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -244,7 +244,7 @@ static bool lcl_Parse( const OUString& rString, ScDocument* pDoc, SCTAB nCurTab, // Handler: -IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScTabOpDlg, BtnHdl, Button*, pBtn, void ) { if (pBtn == m_pBtnOk) { @@ -320,8 +320,6 @@ IMPL_LINK( ScTabOpDlg, BtnHdl, PushButton*, pBtn ) } else if (pBtn == m_pBtnCancel) Close(); - - return 0; } IMPL_LINK( ScTabOpDlg, GetFocusHdl, Control*, pCtrl ) diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx index 0f80368c5377..9eafd5f40209 100644 --- a/sc/source/ui/namedlg/namedefdlg.cxx +++ b/sc/source/ui/namedlg/namedefdlg.cxx @@ -327,16 +327,14 @@ void ScNameDefDlg::SetActive() RefInputDone(); } -IMPL_LINK_NOARG(ScNameDefDlg, CancelBtnHdl) +IMPL_LINK_NOARG_TYPED(ScNameDefDlg, CancelBtnHdl, Button*, void) { CancelPushed(); - return 0; } -IMPL_LINK_NOARG(ScNameDefDlg, AddBtnHdl) +IMPL_LINK_NOARG_TYPED(ScNameDefDlg, AddBtnHdl, Button*, void) { AddPushed(); - return 0; }; IMPL_LINK_NOARG(ScNameDefDlg, NameModifyHdl) diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index 3b1aa06e89ab..63ae44dca41a 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -483,27 +483,24 @@ void ScNameDlg::GetRangeNames(boost::ptr_map<OUString, ScRangeName>& rRangeMap) maRangeMap.swap(rRangeMap); } -IMPL_LINK_NOARG(ScNameDlg, OkBtnHdl) +IMPL_LINK_NOARG_TYPED(ScNameDlg, OkBtnHdl, Button*, void) { Close(); - return 0; } -IMPL_LINK_NOARG(ScNameDlg, CancelBtnHdl) +IMPL_LINK_NOARG_TYPED(ScNameDlg, CancelBtnHdl, Button*, void) { CancelPushed(); - return 0; } -IMPL_LINK_NOARG(ScNameDlg, AddBtnHdl) +IMPL_LINK_NOARG_TYPED(ScNameDlg, AddBtnHdl, Button*, void) { - return long(AddPushed()); + AddPushed(); } -IMPL_LINK_NOARG(ScNameDlg, RemoveBtnHdl) +IMPL_LINK_NOARG_TYPED(ScNameDlg, RemoveBtnHdl, Button*, void) { RemovePushed(); - return 0; } IMPL_LINK_NOARG(ScNameDlg, EdModifyHdl) diff --git a/sc/source/ui/namedlg/namepast.cxx b/sc/source/ui/namedlg/namepast.cxx index 5f0c238327ef..7b64fed12108 100644 --- a/sc/source/ui/namedlg/namepast.cxx +++ b/sc/source/ui/namedlg/namepast.cxx @@ -77,7 +77,7 @@ void ScNamePasteDlg::dispose() ModalDialog::dispose(); } -IMPL_LINK( ScNamePasteDlg, ButtonHdl, Button *, pButton ) +IMPL_LINK_TYPED( ScNamePasteDlg, ButtonHdl, Button *, pButton, void ) { if( pButton == m_pBtnPasteAll ) { @@ -97,7 +97,6 @@ IMPL_LINK( ScNamePasteDlg, ButtonHdl, Button *, pButton ) { EndDialog( BTN_PASTE_CLOSE ); } - return 0; } std::vector<OUString> ScNamePasteDlg::GetSelectedNames() const diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 912a09897d53..8349ed374125 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -192,10 +192,9 @@ void ScCalcOptionsDialog::SelectedDeviceChanged() #endif } -IMPL_LINK(ScCalcOptionsDialog, AsZeroModifiedHdl, CheckBox*, pCheckBox ) +IMPL_LINK_TYPED(ScCalcOptionsDialog, AsZeroModifiedHdl, Button*, pCheckBox, void ) { - maConfig.mbEmptyStringAsZero = pCheckBox->IsChecked(); - return 0; + maConfig.mbEmptyStringAsZero = static_cast<CheckBox*>(pCheckBox)->IsChecked(); } IMPL_LINK(ScCalcOptionsDialog, ConversionModifiedHdl, ListBox*, pConv ) @@ -230,10 +229,9 @@ IMPL_LINK(ScCalcOptionsDialog, SyntaxModifiedHdl, ListBox*, pSyntax) return 0; } -IMPL_LINK(ScCalcOptionsDialog, CBUseOpenCLHdl, CheckBox*, pCheckBox) +IMPL_LINK_TYPED(ScCalcOptionsDialog, CBUseOpenCLHdl, Button*, pCheckBox, void) { - maConfig.mbOpenCLSubsetOnly = pCheckBox->IsChecked(); - return 0; + maConfig.mbOpenCLSubsetOnly = static_cast<CheckBox*>(pCheckBox)->IsChecked(); } IMPL_LINK(ScCalcOptionsDialog, SpinOpenCLMinSizeHdl, NumericField*, pSpin) @@ -691,8 +689,7 @@ struct Reduction : Op } -IMPL_STATIC_LINK( - ScCalcOptionsDialog, TestClickHdl, PushButton*, pButton) +IMPL_STATIC_LINK_TYPED(ScCalcOptionsDialog, TestClickHdl, Button*, pButton, void) { pButton->Disable(); @@ -821,8 +818,6 @@ IMPL_STATIC_LINK( xTestDocument->mpDoc->CalcAll(); ScInterpreter::SetGlobalConfig(xTestDocument->maOldCalcConfig); - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/optdlg/calcoptionsdlg.hxx b/sc/source/ui/optdlg/calcoptionsdlg.hxx index ff29e4bd9f6d..633762e6b253 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.hxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.hxx @@ -41,11 +41,11 @@ public: DECL_LINK( BtnAutomaticSelectHdl, void* ); DECL_LINK( DeviceSelHdl, void* ); DECL_LINK( EditModifiedHdl, Edit * ); - DECL_STATIC_LINK( ScCalcOptionsDialog, TestClickHdl, PushButton* ); - DECL_LINK( AsZeroModifiedHdl, CheckBox*); + DECL_STATIC_LINK_TYPED( ScCalcOptionsDialog, TestClickHdl, Button*, void ); + DECL_LINK_TYPED( AsZeroModifiedHdl, Button*, void); DECL_LINK( ConversionModifiedHdl, ListBox*); DECL_LINK( SyntaxModifiedHdl, ListBox*); - DECL_LINK( CBUseOpenCLHdl, CheckBox*); + DECL_LINK_TYPED( CBUseOpenCLHdl, Button*, void); DECL_LINK( SpinOpenCLMinSizeHdl, NumericField*); const ScCalcConfig& GetConfig() const { return maConfig;} diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx index a3fad625889e..8073d3735ba5 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -206,7 +206,7 @@ SfxTabPage::sfxpg ScTpCalcOptions::DeactivatePage( SfxItemSet* pSetP ) // Handler: -IMPL_LINK( ScTpCalcOptions, RadioClickHdl, RadioButton*, pBtn ) +IMPL_LINK_TYPED( ScTpCalcOptions, RadioClickHdl, Button*, pBtn, void ) { if (pBtn == m_pBtnDateStd) { @@ -220,12 +220,11 @@ IMPL_LINK( ScTpCalcOptions, RadioClickHdl, RadioButton*, pBtn ) { pLocalOptions->SetDate( 1, 1, 1904 ); } - - return 0; } -IMPL_LINK( ScTpCalcOptions, CheckClickHdl, CheckBox*, pBtn ) +IMPL_LINK_TYPED( ScTpCalcOptions, CheckClickHdl, Button*, p, void ) { + CheckBox* pBtn = static_cast<CheckBox*>(p); if (pBtn == m_pBtnGeneralPrec) { if (pBtn->IsChecked()) @@ -254,8 +253,6 @@ IMPL_LINK( ScTpCalcOptions, CheckClickHdl, CheckBox*, pBtn ) m_pFtEps->Disable(); m_pEdEps->Disable(); } } - - return 0; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index 255d71a31754..7201fb855306 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -58,13 +58,13 @@ ScTpFormulaOptions::ScTpFormulaOptions(vcl::Window* pParent, const SfxItemSet& r mpLbFormulaSyntax->InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_XL_A1).toString()); mpLbFormulaSyntax->InsertEntry(ScResId(SCSTR_FORMULA_SYNTAX_XL_R1C1).toString()); - Link<> aLink = LINK( this, ScTpFormulaOptions, ButtonHdl ); - mpBtnSepReset->SetClickHdl(aLink); - mpBtnCustomCalcDefault->SetClickHdl(aLink); - mpBtnCustomCalcCustom->SetClickHdl(aLink); - mpBtnCustomCalcDetails->SetClickHdl(aLink); + Link<Button*,void> aLink2 = LINK( this, ScTpFormulaOptions, ButtonHdl ); + mpBtnSepReset->SetClickHdl(aLink2); + mpBtnCustomCalcDefault->SetClickHdl(aLink2); + mpBtnCustomCalcCustom->SetClickHdl(aLink2); + mpBtnCustomCalcDetails->SetClickHdl(aLink2); - aLink = LINK( this, ScTpFormulaOptions, SepModifyHdl ); + Link<> aLink = LINK( this, ScTpFormulaOptions, SepModifyHdl ); mpEdSepFuncArg->SetModifyHdl(aLink); mpEdSepArrayCol->SetModifyHdl(aLink); mpEdSepArrayRow->SetModifyHdl(aLink); @@ -195,7 +195,7 @@ bool ScTpFormulaOptions::IsValidSeparatorSet() const return true; } -IMPL_LINK( ScTpFormulaOptions, ButtonHdl, Button*, pBtn ) +IMPL_LINK_TYPED( ScTpFormulaOptions, ButtonHdl, Button*, pBtn, void ) { if (pBtn == mpBtnSepReset) ResetSeparators(); @@ -205,8 +205,6 @@ IMPL_LINK( ScTpFormulaOptions, ButtonHdl, Button*, pBtn ) UpdateCustomCalcRadioButtons(false); else if (pBtn == mpBtnCustomCalcDetails) LaunchCustomCalcSettings(); - - return 0; } IMPL_LINK( ScTpFormulaOptions, SepModifyHdl, Edit*, pEdit ) diff --git a/sc/source/ui/optdlg/tpusrlst.cxx b/sc/source/ui/optdlg/tpusrlst.cxx index c2668e43cfa1..3b8de0f93041 100644 --- a/sc/source/ui/optdlg/tpusrlst.cxx +++ b/sc/source/ui/optdlg/tpusrlst.cxx @@ -480,7 +480,7 @@ IMPL_LINK( ScTpUserLists, LbSelectHdl, ListBox*, pLb ) return 0; } -IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScTpUserLists, BtnClickHdl, Button*, pBtn, void ) { if ( pBtn == mpBtnNew || pBtn == mpBtnDiscard ) { @@ -660,7 +660,7 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) else if ( pViewData && (pBtn == mpBtnCopy) ) { if ( bCopyDone ) - return 0; + return; ScRefAddress theStartPos; ScRefAddress theEndPos; @@ -708,8 +708,6 @@ IMPL_LINK( ScTpUserLists, BtnClickHdl, PushButton*, pBtn ) mpEdCopyFrom->SetSelection( Selection( 0, SELECTION_MAX ) ); } } - - return 0; } IMPL_LINK( ScTpUserLists, EdEntriesModHdl, VclMultiLineEdit*, pEd ) diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index c1ba49adc89d..8c69bb17d017 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -75,7 +75,7 @@ ScTpContentOptions::ScTpContentOptions( vcl::Window* pParent, pDrawLB-> SetSelectHdl(aSelObjHdl); pGridLB-> SetSelectHdl( LINK( this, ScTpContentOptions, GridHdl ) ); - Link<> aCBHdl(LINK( this, ScTpContentOptions, CBHdl ) ); + Link<Button*, void> aCBHdl(LINK( this, ScTpContentOptions, CBHdl ) ); pFormulaCB ->SetClickHdl(aCBHdl); pNilCB ->SetClickHdl(aCBHdl); pAnnotCB ->SetClickHdl(aCBHdl); @@ -260,10 +260,10 @@ IMPL_LINK( ScTpContentOptions, SelLbObjHdl, ListBox*, pLb ) return 0; } -IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn ) +IMPL_LINK_TYPED( ScTpContentOptions, CBHdl, Button*, pBtn, void ) { ScViewOption eOption = VOPT_FORMULAS; - bool bChecked = pBtn->IsChecked(); + bool bChecked = static_cast<CheckBox*>(pBtn)->IsChecked(); if ( pFormulaCB == pBtn ) eOption = VOPT_FORMULAS; else if ( pNilCB == pBtn ) eOption = VOPT_NULLVALS; @@ -280,8 +280,6 @@ IMPL_LINK( ScTpContentOptions, CBHdl, CheckBox*, pBtn ) else if ( pRowColHeaderCB == pBtn ) eOption = VOPT_HEADER; pLocalOptions->SetOption( eOption, bChecked ); - - return 0; } void ScTpContentOptions::InitGridOpt() @@ -698,10 +696,9 @@ IMPL_LINK_NOARG(ScTpLayoutOptions, MetricHdl) return 0; } -IMPL_LINK( ScTpLayoutOptions, AlignHdl, CheckBox*, pBox ) +IMPL_LINK_TYPED( ScTpLayoutOptions, AlignHdl, Button*, pBox, void ) { - m_pAlignLB->Enable(pBox->IsChecked()); - return 0; + m_pAlignLB->Enable(static_cast<CheckBox*>(pBox)->IsChecked()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index 82f5260f7d17..c2095e176a75 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -465,7 +465,7 @@ void ScPrintAreasDlg::Impl_FillLists() // Handler: -IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScPrintAreasDlg, Impl_BtnHdl, Button*, pBtn, void ) { if ( pBtnOk == pBtn ) { @@ -511,8 +511,6 @@ IMPL_LINK( ScPrintAreasDlg, Impl_BtnHdl, PushButton*, pBtn ) } else if ( pBtnCancel == pBtn ) Close(); - - return 0; } IMPL_LINK( ScPrintAreasDlg, Impl_GetFocusHdl, Control*, pCtr ) diff --git a/sc/source/ui/pagedlg/scuitphfedit.cxx b/sc/source/ui/pagedlg/scuitphfedit.cxx index 1a14789a8b4c..38dd1ce3835e 100644 --- a/sc/source/ui/pagedlg/scuitphfedit.cxx +++ b/sc/source/ui/pagedlg/scuitphfedit.cxx @@ -795,11 +795,11 @@ IMPL_LINK( ScHFEditPage, ListHdl_Impl, ListBox*, pList ) return 0; } -IMPL_LINK( ScHFEditPage, ClickHdl, PushButton*, pBtn ) +IMPL_LINK_TYPED( ScHFEditPage, ClickHdl, Button*, pBtn, void ) { pActiveEdWnd = ::GetScEditWindow(); if ( !pActiveEdWnd ) - return 0; + return; if ( pBtn == m_pBtnText ) { @@ -824,8 +824,6 @@ IMPL_LINK( ScHFEditPage, ClickHdl, PushButton*, pBtn ) } InsertToDefinedList(); pActiveEdWnd->GrabFocus(); - - return 0; } IMPL_STATIC_LINK( ScHFEditPage, MenuHdl, ScExtIButton*, pBtn ) diff --git a/sc/source/ui/pagedlg/tphf.cxx b/sc/source/ui/pagedlg/tphf.cxx index 8575607d6e48..c091636f4847 100644 --- a/sc/source/ui/pagedlg/tphf.cxx +++ b/sc/source/ui/pagedlg/tphf.cxx @@ -147,7 +147,7 @@ void ScHFPage::DeactivatePage() // Handler: -IMPL_LINK_NOARG(ScHFPage, TurnOnHdl) +IMPL_LINK_NOARG_TYPED(ScHFPage, TurnOnHdl, Button*, void) { SvxHFPage::TurnOnHdl( m_pTurnOnBox ); @@ -155,18 +155,15 @@ IMPL_LINK_NOARG(ScHFPage, TurnOnHdl) m_pBtnEdit->Enable(); else m_pBtnEdit->Disable(); - - return 0; } -IMPL_LINK_NOARG(ScHFPage, BtnHdl) +IMPL_LINK_NOARG_TYPED(ScHFPage, BtnHdl, Button*, void) { // When the Edit-Dialog is directly called from the Button's Click-Handler, // the GrabFocus from the Edit-Dialog under OS/2 doesn't work.(Bug #41805#). // With the new StarView, this workaround should be again considered! Application::PostUserEvent( LINK( this, ScHFPage, HFEditHdl ), NULL, true ); - return 0; } IMPL_LINK_NOARG(ScHFPage, HFEditHdl) diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx index 685e288796ed..f65472fd8405 100644 --- a/sc/source/ui/pagedlg/tptable.cxx +++ b/sc/source/ui/pagedlg/tptable.cxx @@ -359,13 +359,12 @@ void ScTablePage::DataChanged( const DataChangedEvent& rDCEvt ) // Handler: -IMPL_LINK_NOARG(ScTablePage, PageDirHdl) +IMPL_LINK_NOARG_TYPED(ScTablePage, PageDirHdl, Button*, void) { ShowImage(); - return 0; } -IMPL_LINK( ScTablePage, PageNoHdl, CheckBox*, pBtn ) +IMPL_LINK_TYPED( ScTablePage, PageNoHdl, Button*, pBtn, void ) { if ( m_pBtnPageNo->IsChecked() ) { @@ -375,8 +374,6 @@ IMPL_LINK( ScTablePage, PageNoHdl, CheckBox*, pBtn ) } else m_pEdPageNo->Disable(); - - return 0; } IMPL_LINK_NOARG(ScTablePage, ScaleHdl) diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx index 270b68f7a634..9ef96251d0e9 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.cxx @@ -110,11 +110,9 @@ void AlignmentPropertyPanel::Initialize() Link<> aLink = LINK(this, AlignmentPropertyPanel, MFLeftIndentMdyHdl); mpMFLeftIndent->SetModifyHdl ( aLink ); - aLink = LINK(this, AlignmentPropertyPanel, CBOXMergnCellClkHdl); - mpCBXMergeCell->SetClickHdl ( aLink ); + mpCBXMergeCell->SetClickHdl ( LINK(this, AlignmentPropertyPanel, CBOXMergnCellClkHdl) ); - aLink = LINK(this, AlignmentPropertyPanel, CBOXWrapTextClkHdl); - mpCBXWrapText->SetClickHdl ( aLink ); + mpCBXWrapText->SetClickHdl ( LINK(this, AlignmentPropertyPanel, CBOXWrapTextClkHdl) ); //rotation mpMtrAngle->SetAccessibleName(OUString( "Text Orientation")); //wj acc @@ -122,10 +120,10 @@ void AlignmentPropertyPanel::Initialize() mpMtrAngle->EnableAutocomplete( false ); mpCBStacked->SetClickHdl(LINK(this, AlignmentPropertyPanel, ClickStackHdl)); - aLink = LINK(this, AlignmentPropertyPanel, ReferenceEdgeHdl); - mpRefEdgeBottom->SetClickHdl(aLink); - mpRefEdgeTop->SetClickHdl(aLink); - mpRefEdgeStd->SetClickHdl(aLink); + Link<Button*,void> aLink2 = LINK(this, AlignmentPropertyPanel, ReferenceEdgeHdl); + mpRefEdgeBottom->SetClickHdl(aLink2); + mpRefEdgeTop->SetClickHdl(aLink2); + mpRefEdgeStd->SetClickHdl(aLink2); mpMtrAngle->InsertValue(0, FUNIT_CUSTOM); mpMtrAngle->InsertValue(45, FUNIT_CUSTOM); @@ -141,7 +139,7 @@ void AlignmentPropertyPanel::Initialize() mpMtrAngle->SetAccessibleRelationLabeledBy(mpFtRotate); } -IMPL_LINK( AlignmentPropertyPanel, ReferenceEdgeHdl, Control*, pControl ) +IMPL_LINK_TYPED( AlignmentPropertyPanel, ReferenceEdgeHdl, Button*, pControl, void ) { SvxRotateMode eMode; if(pControl == mpRefEdgeBottom) @@ -152,7 +150,6 @@ IMPL_LINK( AlignmentPropertyPanel, ReferenceEdgeHdl, Control*, pControl ) eMode = SVX_ROTATE_MODE_STANDARD; SvxRotateModeItem aItem(eMode,ATTR_ROTATE_MODE); GetBindings()->GetDispatcher()->Execute(SID_ATTR_ALIGN_LOCKPOS, SfxCallMode::RECORD, &aItem, 0l); - return 0; } IMPL_LINK_NOARG( AlignmentPropertyPanel, AngleModifiedHdl ) @@ -193,13 +190,12 @@ IMPL_LINK_NOARG( AlignmentPropertyPanel, AngleModifiedHdl ) SID_ATTR_ALIGN_DEGREES, SfxCallMode::RECORD, &aAngleItem, 0L ); return 0; } -IMPL_LINK_NOARG( AlignmentPropertyPanel, ClickStackHdl ) +IMPL_LINK_NOARG_TYPED( AlignmentPropertyPanel, ClickStackHdl, Button*, void ) { bool bVertical = mpCBStacked->IsChecked(); SfxBoolItem aStackItem( SID_ATTR_ALIGN_STACKED, bVertical ); GetBindings()->GetDispatcher()->Execute( SID_ATTR_ALIGN_STACKED, SfxCallMode::RECORD, &aStackItem, 0L ); - return 0; } IMPL_LINK_NOARG(AlignmentPropertyPanel, MFLeftIndentMdyHdl) { @@ -211,7 +207,7 @@ IMPL_LINK_NOARG(AlignmentPropertyPanel, MFLeftIndentMdyHdl) return 0L; } -IMPL_LINK_NOARG(AlignmentPropertyPanel, CBOXMergnCellClkHdl) +IMPL_LINK_NOARG_TYPED(AlignmentPropertyPanel, CBOXMergnCellClkHdl, Button*, void) { bool bState = mpCBXMergeCell->IsChecked(); @@ -224,16 +220,13 @@ IMPL_LINK_NOARG(AlignmentPropertyPanel, CBOXMergnCellClkHdl) GetBindings()->GetDispatcher()->Execute(FID_MERGE_OFF, SfxCallMode::RECORD); GetBindings()->Invalidate(FID_MERGE_TOGGLE,true); //modified end - - return 0; } -IMPL_LINK_NOARG(AlignmentPropertyPanel, CBOXWrapTextClkHdl) +IMPL_LINK_NOARG_TYPED(AlignmentPropertyPanel, CBOXWrapTextClkHdl, Button*, void) { bool bState = mpCBXWrapText->IsChecked(); SfxBoolItem aItem( SID_ATTR_ALIGN_LINEBREAK , bState); GetBindings()->GetDispatcher()->Execute(SID_ATTR_ALIGN_LINEBREAK, SfxCallMode::RECORD, &aItem, 0L); - return 0; } VclPtr<vcl::Window> AlignmentPropertyPanel::Create ( diff --git a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx index 42e4bcac6352..3d20848bcb29 100644 --- a/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx +++ b/sc/source/ui/sidebar/AlignmentPropertyPanel.hxx @@ -98,11 +98,11 @@ private: SfxBindings* mpBindings; DECL_LINK( MFLeftIndentMdyHdl, void * ); - DECL_LINK( CBOXMergnCellClkHdl, void * ); - DECL_LINK( CBOXWrapTextClkHdl, void * ); + DECL_LINK_TYPED( CBOXMergnCellClkHdl, Button*, void ); + DECL_LINK_TYPED( CBOXWrapTextClkHdl, Button*, void ); DECL_LINK( AngleModifiedHdl, void * ); - DECL_LINK( ClickStackHdl, void * ); - DECL_LINK( ReferenceEdgeHdl, Control* ); + DECL_LINK_TYPED( ClickStackHdl, Button*, void ); + DECL_LINK_TYPED( ReferenceEdgeHdl, Button*, void ); void Initialize(); static void FormatDegrees(double& dTmp); diff --git a/sc/source/ui/sidebar/CellLineStyleControl.cxx b/sc/source/ui/sidebar/CellLineStyleControl.cxx index c250b903d350..141027f14f08 100644 --- a/sc/source/ui/sidebar/CellLineStyleControl.cxx +++ b/sc/source/ui/sidebar/CellLineStyleControl.cxx @@ -59,7 +59,7 @@ void CellLineStyleControl::dispose() void CellLineStyleControl::Initialize() { //maPushButtonMoreOptions->SetIcoPosX(2); - Link<> aLink = LINK(this, CellLineStyleControl, PBClickHdl); + Link<Button*,void> aLink = LINK(this, CellLineStyleControl, PBClickHdl); maPushButtonMoreOptions->SetClickHdl(aLink); maCellLineStyleValueSet->SetStyle(maCellLineStyleValueSet->GetStyle()| WB_3DLOOK | WB_NO_DIRECTSELECT); @@ -88,8 +88,7 @@ void CellLineStyleControl::Initialize() } SetAllNoSel(); - aLink = LINK(this, CellLineStyleControl, VSSelectHdl); - maCellLineStyleValueSet->SetSelectHdl(aLink); + maCellLineStyleValueSet->SetSelectHdl(LINK(this, CellLineStyleControl, VSSelectHdl)); maCellLineStyleValueSet->StartSelection(); maCellLineStyleValueSet->Show(); } @@ -185,7 +184,7 @@ IMPL_LINK(CellLineStyleControl, VSSelectHdl, void *, pControl) return 0L; } -IMPL_LINK(CellLineStyleControl, PBClickHdl, PushButton *, pPBtn) +IMPL_LINK_TYPED(CellLineStyleControl, PBClickHdl, Button *, pPBtn, void) { if(pPBtn == maPushButtonMoreOptions.get()) { @@ -196,8 +195,6 @@ IMPL_LINK(CellLineStyleControl, PBClickHdl, PushButton *, pPBtn) mrCellAppearancePropertyPanel.EndCellLineStylePopupMode(); } - - return 0; } void CellLineStyleControl::SetLineStyleSelect(sal_uInt16 out, sal_uInt16 in, sal_uInt16 dis) diff --git a/sc/source/ui/sidebar/CellLineStyleControl.hxx b/sc/source/ui/sidebar/CellLineStyleControl.hxx index c4de870e3331..5647f0e96425 100644 --- a/sc/source/ui/sidebar/CellLineStyleControl.hxx +++ b/sc/source/ui/sidebar/CellLineStyleControl.hxx @@ -42,7 +42,7 @@ private: void SetAllNoSel(); DECL_LINK(VSSelectHdl, void*); - DECL_LINK(PBClickHdl, PushButton*); + DECL_LINK_TYPED(PBClickHdl, Button*, void); public: CellLineStyleControl(vcl::Window* pParent, CellAppearancePropertyPanel& rPanel); diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx index e78bf7f11e16..25ad6a570091 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.cxx @@ -100,8 +100,8 @@ void NumberFormatPropertyPanel::Initialize() mpEdDecimals->SetAccessibleName(OUString( "Decimal Places")); mpEdLeadZeroes->SetAccessibleName(OUString( "Leading Zeroes")); - mpBtnNegRed->SetClickHdl( aLink ); - mpBtnThousand->SetClickHdl( aLink ); + mpBtnNegRed->SetClickHdl( LINK(this, NumberFormatPropertyPanel, NumFormatValueClickHdl) ); + mpBtnThousand->SetClickHdl( LINK(this, NumberFormatPropertyPanel, NumFormatValueClickHdl) ); mpTBCategory->SetAccessibleRelationLabeledBy(mpTBCategory); } @@ -118,6 +118,10 @@ IMPL_LINK( NumberFormatPropertyPanel, NumFormatSelectHdl, ListBox*, pBox ) return 0L; } +IMPL_LINK_NOARG_TYPED( NumberFormatPropertyPanel, NumFormatValueClickHdl, Button*, void ) +{ + NumFormatValueHdl(nullptr); +} IMPL_LINK_NOARG( NumberFormatPropertyPanel, NumFormatValueHdl ) { OUString aFormat; diff --git a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx index c401b8a0d643..7a024e078fc0 100644 --- a/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx +++ b/sc/source/ui/sidebar/NumberFormatPropertyPanel.hxx @@ -86,6 +86,7 @@ private: DECL_LINK(NumFormatSelectHdl, ListBox*); DECL_LINK(NumFormatValueHdl, void*); + DECL_LINK_TYPED(NumFormatValueClickHdl, Button*, void); void Initialize(); }; diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index 3777b5edec9c..353a521e175f 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -94,7 +94,7 @@ ScXMLSourceDlg::ScXMLSourceDlg( maXMLParam.maImgElementRepeat = Image(ScResId(IMG_ELEMENT_REPEAT)); maXMLParam.maImgAttribute = Image(ScResId(IMG_ELEMENT_ATTRIBUTE)); - Link<> aBtnHdl = LINK(this, ScXMLSourceDlg, BtnPressedHdl); + Link<Button*,void> aBtnHdl = LINK(this, ScXMLSourceDlg, BtnPressedHdl); mpBtnSelectSource->SetClickHdl(aBtnHdl); mpBtnOk->SetClickHdl(aBtnHdl); mpBtnCancel->SetClickHdl(aBtnHdl); @@ -669,7 +669,7 @@ IMPL_LINK(ScXMLSourceDlg, GetFocusHdl, Control*, pCtrl) return 0; } -IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn) +IMPL_LINK_TYPED(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn, void) { if (pBtn == mpBtnSelectSource) SelectSourceFile(); @@ -677,7 +677,6 @@ IMPL_LINK(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn) OkPressed(); else if (pBtn == mpBtnCancel) CancelPressed(); - return 0; } IMPL_LINK_NOARG(ScXMLSourceDlg, TreeItemSelectHdl) |