summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx11
-rw-r--r--sc/source/ui/StatisticsDialogs/SamplingDialog.cxx19
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx19
-rw-r--r--sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx29
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx5
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx19
-rw-r--r--sc/source/ui/dbgui/consdlg.cxx13
-rw-r--r--sc/source/ui/dbgui/validate.cxx9
-rw-r--r--sc/source/ui/inc/PivotLayoutDialog.hxx4
-rw-r--r--sc/source/ui/inc/RandomNumberGeneratorDialog.hxx4
-rw-r--r--sc/source/ui/inc/SamplingDialog.hxx4
-rw-r--r--sc/source/ui/inc/StatisticsInputOutputDialog.hxx4
-rw-r--r--sc/source/ui/inc/StatisticsTwoVariableDialog.hxx4
-rw-r--r--sc/source/ui/inc/areasdlg.hxx2
-rw-r--r--sc/source/ui/inc/condformatdlg.hxx2
-rw-r--r--sc/source/ui/inc/consdlg.hxx2
-rw-r--r--sc/source/ui/inc/crnrdlg.hxx4
-rw-r--r--sc/source/ui/inc/namedefdlg.hxx2
-rw-r--r--sc/source/ui/inc/namedlg.hxx2
-rw-r--r--sc/source/ui/inc/optsolver.hxx4
-rw-r--r--sc/source/ui/inc/solvrdlg.hxx4
-rw-r--r--sc/source/ui/inc/tabopdlg.hxx4
-rw-r--r--sc/source/ui/inc/tpdefaults.hxx2
-rw-r--r--sc/source/ui/inc/tpformula.hxx2
-rw-r--r--sc/source/ui/inc/validate.hxx4
-rw-r--r--sc/source/ui/inc/xmlsourcedlg.hxx2
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx13
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx23
-rw-r--r--sc/source/ui/miscdlgs/solvrdlg.cxx15
-rw-r--r--sc/source/ui/miscdlgs/tabopdlg.cxx15
-rw-r--r--sc/source/ui/namedlg/namedefdlg.cxx3
-rw-r--r--sc/source/ui/namedlg/namedlg.cxx3
-rw-r--r--sc/source/ui/optdlg/tpdefaults.cxx5
-rw-r--r--sc/source/ui/optdlg/tpformula.cxx13
-rw-r--r--sc/source/ui/pagedlg/areasdlg.cxx18
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx13
36 files changed, 130 insertions, 171 deletions
diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
index 7482da61a6f2..fe2fbc0fcb91 100644
--- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx
@@ -112,7 +112,7 @@ void ScRandomNumberGeneratorDialog::Init()
mpButtonClose->SetClickHdl( LINK( this, ScRandomNumberGeneratorDialog, CloseClicked ) );
mpButtonApply->SetClickHdl( LINK( this, ScRandomNumberGeneratorDialog, ApplyClicked ) );
- Link<> aLink = LINK( this, ScRandomNumberGeneratorDialog, GetFocusHandler );
+ Link<Control&,void> aLink = LINK( this, ScRandomNumberGeneratorDialog, GetFocusHandler );
mpInputRangeEdit->SetGetFocusHdl( aLink );
mpInputRangeButton->SetGetFocusHdl( aLink );
@@ -342,23 +342,20 @@ IMPL_LINK_NOARG_TYPED( ScRandomNumberGeneratorDialog, CloseClicked, Button*, voi
Close();
}
-IMPL_LINK( ScRandomNumberGeneratorDialog, GetFocusHandler, Control*, pCtrl )
+IMPL_LINK_TYPED( ScRandomNumberGeneratorDialog, GetFocusHandler, Control&, rCtrl, void )
{
Edit* pEdit = NULL;
- if( (pCtrl == static_cast<Control*>(mpInputRangeEdit)) || (pCtrl == static_cast<Control*>(mpInputRangeButton)) )
+ if( (&rCtrl == static_cast<Control*>(mpInputRangeEdit)) || (&rCtrl == static_cast<Control*>(mpInputRangeButton)) )
pEdit = mpInputRangeEdit;
if( pEdit )
pEdit->SetSelection( Selection( 0, SELECTION_MAX ) );
-
- return 0;
}
-IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, LoseFocusHandler)
+IMPL_LINK_NOARG_TYPED(ScRandomNumberGeneratorDialog, LoseFocusHandler, Control&, void)
{
mbDialogLostFocus = !IsActive();
- return 0;
}
IMPL_LINK_NOARG(ScRandomNumberGeneratorDialog, InputRangeModified)
diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
index 0d71b2687490..258f19e8b9ff 100644
--- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx
@@ -89,7 +89,7 @@ void ScSamplingDialog::Init()
mpButtonOk->SetClickHdl( LINK( this, ScSamplingDialog, OkClicked ) );
mpButtonOk->Enable(false);
- Link<> aLink = LINK( this, ScSamplingDialog, GetFocusHandler );
+ Link<Control&,void> aLink = LINK( this, ScSamplingDialog, GetFocusHandler );
mpInputRangeEdit->SetGetFocusHdl( aLink );
mpInputRangeButton->SetGetFocusHdl( aLink );
mpOutputRangeEdit->SetGetFocusHdl( aLink );
@@ -101,9 +101,9 @@ void ScSamplingDialog::Init()
mpOutputRangeEdit->SetLoseFocusHdl( aLink );
mpOutputRangeButton->SetLoseFocusHdl( aLink );
- aLink = LINK( this, ScSamplingDialog, RefInputModifyHandler);
- mpInputRangeEdit->SetModifyHdl( aLink);
- mpOutputRangeEdit->SetModifyHdl( aLink);
+ Link<> aLink2 = LINK( this, ScSamplingDialog, RefInputModifyHandler);
+ mpInputRangeEdit->SetModifyHdl( aLink2);
+ mpOutputRangeEdit->SetModifyHdl( aLink2);
mpSampleSize->SetModifyHdl( LINK( this, ScSamplingDialog, SamplingSizeValueModified ));
@@ -294,25 +294,22 @@ IMPL_LINK_NOARG_TYPED( ScSamplingDialog, OkClicked, Button*, void )
Close();
}
-IMPL_LINK( ScSamplingDialog, GetFocusHandler, Control*, pCtrl )
+IMPL_LINK_TYPED( ScSamplingDialog, GetFocusHandler, Control&, rCtrl, void )
{
mpActiveEdit = NULL;
- if( (pCtrl == static_cast<Control*>(mpInputRangeEdit)) || (pCtrl == static_cast<Control*>(mpInputRangeButton)) )
+ if( (&rCtrl == static_cast<Control*>(mpInputRangeEdit)) || (&rCtrl == static_cast<Control*>(mpInputRangeButton)) )
mpActiveEdit = mpInputRangeEdit;
- else if( (pCtrl == static_cast<Control*>(mpOutputRangeEdit)) || (pCtrl == static_cast<Control*>(mpOutputRangeButton)) )
+ else if( (&rCtrl == static_cast<Control*>(mpOutputRangeEdit)) || (&rCtrl == static_cast<Control*>(mpOutputRangeButton)) )
mpActiveEdit = mpOutputRangeEdit;
if( mpActiveEdit )
mpActiveEdit->SetSelection( Selection( 0, SELECTION_MAX ) );
-
- return 0;
}
-IMPL_LINK_NOARG(ScSamplingDialog, LoseFocusHandler)
+IMPL_LINK_NOARG_TYPED(ScSamplingDialog, LoseFocusHandler, Control&, void)
{
mDialogLostFocus = !IsActive();
- return 0;
}
IMPL_LINK_NOARG(ScSamplingDialog, SamplingSizeValueModified)
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
index c676bda90320..276f5c1ba2c1 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsInputOutputDialog.cxx
@@ -113,7 +113,7 @@ void ScStatisticsInputOutputDialog::Init()
mpButtonOk->SetClickHdl( LINK( this, ScStatisticsInputOutputDialog, OkClicked ) );
mpButtonOk->Enable(false);
- Link<> aLink = LINK( this, ScStatisticsInputOutputDialog, GetFocusHandler );
+ Link<Control&,void> aLink = LINK( this, ScStatisticsInputOutputDialog, GetFocusHandler );
mpInputRangeEdit->SetGetFocusHdl( aLink );
mpInputRangeButton->SetGetFocusHdl( aLink );
mpOutputRangeEdit->SetGetFocusHdl( aLink );
@@ -125,9 +125,9 @@ void ScStatisticsInputOutputDialog::Init()
mpOutputRangeEdit->SetLoseFocusHdl( aLink );
mpOutputRangeButton->SetLoseFocusHdl( aLink );
- aLink = LINK( this, ScStatisticsInputOutputDialog, RefInputModifyHandler);
- mpInputRangeEdit->SetModifyHdl( aLink);
- mpOutputRangeEdit->SetModifyHdl( aLink);
+ Link<> aLink2 = LINK( this, ScStatisticsInputOutputDialog, RefInputModifyHandler);
+ mpInputRangeEdit->SetModifyHdl( aLink2);
+ mpOutputRangeEdit->SetModifyHdl( aLink2);
mpOutputRangeEdit->GrabFocus();
@@ -198,25 +198,22 @@ IMPL_LINK_NOARG_TYPED( ScStatisticsInputOutputDialog, OkClicked, Button*, void )
Close();
}
-IMPL_LINK( ScStatisticsInputOutputDialog, GetFocusHandler, Control*, pCtrl )
+IMPL_LINK_TYPED( ScStatisticsInputOutputDialog, GetFocusHandler, Control&, rCtrl, void )
{
mpActiveEdit = NULL;
- if( (pCtrl == static_cast<Control*>(mpInputRangeEdit)) || (pCtrl == static_cast<Control*>(mpInputRangeButton)) )
+ if( (&rCtrl == static_cast<Control*>(mpInputRangeEdit)) || (&rCtrl == static_cast<Control*>(mpInputRangeButton)) )
mpActiveEdit = mpInputRangeEdit;
- else if( (pCtrl == static_cast<Control*>(mpOutputRangeEdit)) || (pCtrl == static_cast<Control*>(mpOutputRangeButton)) )
+ else if( (&rCtrl == static_cast<Control*>(mpOutputRangeEdit)) || (&rCtrl == static_cast<Control*>(mpOutputRangeButton)) )
mpActiveEdit = mpOutputRangeEdit;
if( mpActiveEdit )
mpActiveEdit->SetSelection( Selection( 0, SELECTION_MAX ) );
-
- return 0;
}
-IMPL_LINK_NOARG( ScStatisticsInputOutputDialog, LoseFocusHandler )
+IMPL_LINK_NOARG_TYPED( ScStatisticsInputOutputDialog, LoseFocusHandler, Control&, void )
{
mDialogLostFocus = !IsActive();
- return 0;
}
IMPL_LINK_NOARG_TYPED( ScStatisticsInputOutputDialog, GroupByChanged, RadioButton&, void )
diff --git a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
index 44fdfecc3cc0..16816f5a0f89 100644
--- a/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
+++ b/sc/source/ui/StatisticsDialogs/StatisticsTwoVariableDialog.cxx
@@ -95,7 +95,7 @@ void ScStatisticsTwoVariableDialog::Init()
mpButtonOk->SetClickHdl( LINK( this, ScStatisticsTwoVariableDialog, OkClicked ) );
mpButtonOk->Enable(false);
- Link<> aLink = LINK( this, ScStatisticsTwoVariableDialog, GetFocusHandler );
+ Link<Control&,void> aLink = LINK( this, ScStatisticsTwoVariableDialog, GetFocusHandler );
mpVariable1RangeEdit->SetGetFocusHdl( aLink );
mpVariable1RangeButton->SetGetFocusHdl( aLink );
mpVariable2RangeEdit->SetGetFocusHdl( aLink );
@@ -111,10 +111,10 @@ void ScStatisticsTwoVariableDialog::Init()
mpOutputRangeEdit->SetLoseFocusHdl( aLink );
mpOutputRangeButton->SetLoseFocusHdl( aLink );
- aLink = LINK( this, ScStatisticsTwoVariableDialog, RefInputModifyHandler);
- mpVariable1RangeEdit->SetModifyHdl( aLink);
- mpVariable2RangeEdit->SetModifyHdl( aLink);
- mpOutputRangeEdit->SetModifyHdl( aLink);
+ Link<> aLink2 = LINK( this, ScStatisticsTwoVariableDialog, RefInputModifyHandler);
+ mpVariable1RangeEdit->SetModifyHdl( aLink2);
+ mpVariable2RangeEdit->SetModifyHdl( aLink2);
+ mpOutputRangeEdit->SetModifyHdl( aLink2);
mpOutputRangeEdit->GrabFocus();
@@ -211,35 +211,32 @@ IMPL_LINK_NOARG_TYPED( ScStatisticsTwoVariableDialog, OkClicked, Button*, void )
Close();
}
-IMPL_LINK( ScStatisticsTwoVariableDialog, GetFocusHandler, Control*, pCtrl )
+IMPL_LINK_TYPED( ScStatisticsTwoVariableDialog, GetFocusHandler, Control&, rCtrl, void )
{
mpActiveEdit = NULL;
- if( pCtrl == mpVariable1RangeEdit
- || pCtrl == mpVariable1RangeButton )
+ if( &rCtrl == mpVariable1RangeEdit
+ || &rCtrl == mpVariable1RangeButton )
{
mpActiveEdit = mpVariable1RangeEdit;
}
- else if( pCtrl == mpVariable2RangeEdit
- || pCtrl == mpVariable2RangeButton )
+ else if( &rCtrl == mpVariable2RangeEdit
+ || &rCtrl == mpVariable2RangeButton )
{
mpActiveEdit = mpVariable2RangeEdit;
}
- else if( pCtrl == mpOutputRangeEdit
- || pCtrl == mpOutputRangeButton )
+ else if( &rCtrl == mpOutputRangeEdit
+ || &rCtrl == mpOutputRangeButton )
{
mpActiveEdit = mpOutputRangeEdit;
}
if( mpActiveEdit )
mpActiveEdit->SetSelection( Selection( 0, SELECTION_MAX ) );
-
- return 0;
}
-IMPL_LINK_NOARG( ScStatisticsTwoVariableDialog, LoseFocusHandler )
+IMPL_LINK_NOARG_TYPED( ScStatisticsTwoVariableDialog, LoseFocusHandler, Control&, void )
{
mDialogLostFocus = !IsActive();
- return 0;
}
IMPL_LINK_NOARG_TYPED( ScStatisticsTwoVariableDialog, GroupByChanged, RadioButton&, void )
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index 60f13958ff70..27cc8d0a93b0 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -786,10 +786,9 @@ IMPL_LINK( ScCondFormatDlg, EdRangeModifyHdl, Edit*, pEdit )
return 0;
}
-IMPL_LINK( ScCondFormatDlg, RangeGetFocusHdl, formula::RefEdit*, pEdit )
+IMPL_LINK_TYPED( ScCondFormatDlg, RangeGetFocusHdl, Control&, rControl, void )
{
- mpLastEdit = pEdit;
- return 0;
+ mpLastEdit = static_cast<formula::RefEdit*>(&rControl);
}
// ------------------------------------------------------
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 85203ca54aeb..87eb9c75ee6e 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -78,8 +78,6 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
maAddressDetails (mpDocument->GetAddressConvention(), 0, 0),
mbDialogLostFocus (false)
{
- Link<> aLink;
-
get(mpListBoxField, "listbox-fields");
get(mpListBoxPage, "listbox-page");
get(mpListBoxColumn, "listbox-column");
@@ -117,7 +115,7 @@ ScPivotLayoutDialog::ScPivotLayoutDialog(
mpSourceEdit->SetReferences(this, mpSourceRadioSelection);
mpSourceButton->SetReferences(this, mpSourceEdit);
- aLink = LINK(this, ScPivotLayoutDialog, GetFocusHandler);
+ Link<Control&,void> aLink = LINK(this, ScPivotLayoutDialog, GetFocusHandler);
mpSourceEdit->SetGetFocusHdl(aLink);
mpSourceButton->SetGetFocusHdl(aLink);
@@ -655,31 +653,28 @@ IMPL_LINK_NOARG_TYPED( ScPivotLayoutDialog, CancelClicked, Button*, void )
Close();
}
-IMPL_LINK(ScPivotLayoutDialog, GetFocusHandler, Control*, pCtrl)
+IMPL_LINK_TYPED(ScPivotLayoutDialog, GetFocusHandler, Control&, rCtrl, void)
{
mpActiveEdit = NULL;
- if (pCtrl == static_cast<Control*>(mpSourceEdit) ||
- pCtrl == static_cast<Control*>(mpSourceButton))
+ if (&rCtrl == static_cast<Control*>(mpSourceEdit) ||
+ &rCtrl == static_cast<Control*>(mpSourceButton))
{
mpActiveEdit = mpSourceEdit;
}
- else if (pCtrl == static_cast<Control*>(mpDestinationEdit) ||
- pCtrl == static_cast<Control*>(mpDestinationButton))
+ else if (&rCtrl == static_cast<Control*>(mpDestinationEdit) ||
+ &rCtrl == static_cast<Control*>(mpDestinationButton))
{
mpActiveEdit = mpDestinationEdit;
}
if (mpActiveEdit)
mpActiveEdit->SetSelection(Selection(0, SELECTION_MAX));
-
- return 0;
}
-IMPL_LINK_NOARG(ScPivotLayoutDialog, LoseFocusHandler)
+IMPL_LINK_NOARG_TYPED(ScPivotLayoutDialog, LoseFocusHandler, Control&, void)
{
mbDialogLostFocus = !IsActive();
- return 0;
}
IMPL_LINK_NOARG(ScPivotLayoutDialog, SourceEditModified)
diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx
index 1977ee8d3425..ab3772cd7ec3 100644
--- a/sc/source/ui/dbgui/consdlg.cxx
+++ b/sc/source/ui/dbgui/consdlg.cxx
@@ -345,22 +345,21 @@ bool ScConsolidateDlg::VerifyEdit( formula::RefEdit* pEd )
// Handler:
-IMPL_LINK( ScConsolidateDlg, GetFocusHdl, Control*, pCtr )
+IMPL_LINK_TYPED( ScConsolidateDlg, GetFocusHdl, Control&, rControl, void )
{
- if ( pCtr ==static_cast<Control*>(pEdDataArea) ||
- pCtr ==static_cast<Control*>(pEdDestArea))
+ if ( &rControl ==static_cast<Control*>(pEdDataArea) ||
+ &rControl ==static_cast<Control*>(pEdDestArea))
{
- pRefInputEdit = static_cast<formula::RefEdit*>(pCtr);
+ pRefInputEdit = static_cast<formula::RefEdit*>(&rControl);
}
- else if(pCtr ==static_cast<Control*>(pLbDataArea) )
+ else if(&rControl ==static_cast<Control*>(pLbDataArea) )
{
pRefInputEdit = pEdDataArea;
}
- else if(pCtr ==static_cast<Control*>(pLbDestArea) )
+ else if(&rControl ==static_cast<Control*>(pLbDestArea) )
{
pRefInputEdit = pEdDestArea;
}
- return 0;
}
IMPL_LINK_NOARG_TYPED(ScConsolidateDlg, OkHdl, Button*, void)
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 2262955ce46e..ae2628455887 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -576,7 +576,7 @@ void ScTPValidationValue::RemoveRefDlg()
}
}
-IMPL_LINK_NOARG(ScTPValidationValue, EditSetFocusHdl)
+IMPL_LINK_NOARG_TYPED(ScTPValidationValue, EditSetFocusHdl, Control&, void)
{
const sal_Int32 nPos = m_pLbAllow->GetSelectEntryPos();
@@ -584,12 +584,11 @@ IMPL_LINK_NOARG(ScTPValidationValue, EditSetFocusHdl)
{
SetupRefDlg();
}
-
- return 0;
}
-IMPL_LINK( ScTPValidationValue, KillFocusHdl, vcl::Window *, pWnd )
+IMPL_LINK_TYPED( ScTPValidationValue, KillFocusHdl, Control&, rControl, void )
{
+ vcl::Window* pWnd = static_cast<vcl::Window*>(&rControl);
if( pWnd == m_pRefEdit || pWnd == m_pBtnRef )
if( ScValidationDlg *pValidationDlg = GetValidationDlg() )
if ( (pValidationDlg->IsActive() || pValidationDlg->IsChildFocus() ) && !pValidationDlg->IsRefInputting() )
@@ -597,8 +596,6 @@ IMPL_LINK( ScTPValidationValue, KillFocusHdl, vcl::Window *, pWnd )
{
RemoveRefDlg();
}
-
- return 0;
}
IMPL_LINK_NOARG(ScTPValidationValue, SelectHdl)
diff --git a/sc/source/ui/inc/PivotLayoutDialog.hxx b/sc/source/ui/inc/PivotLayoutDialog.hxx
index a299d3fa0df0..e8aeaecb95d0 100644
--- a/sc/source/ui/inc/PivotLayoutDialog.hxx
+++ b/sc/source/ui/inc/PivotLayoutDialog.hxx
@@ -90,8 +90,8 @@ private:
DECL_LINK_TYPED(CancelClicked, Button*, void);
DECL_LINK_TYPED(OKClicked, Button*, void);
- DECL_LINK(GetFocusHandler, Control*);
- DECL_LINK(LoseFocusHandler, void*);
+ DECL_LINK_TYPED(GetFocusHandler, Control&, void);
+ DECL_LINK_TYPED(LoseFocusHandler, Control&, void);
DECL_LINK_TYPED(ToggleSource, RadioButton&, void);
DECL_LINK_TYPED(ToggleDestination, RadioButton&, void);
DECL_LINK(SourceEditModified, void*);
diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
index a588b503d727..b9d7934bd4f5 100644
--- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
+++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx
@@ -73,8 +73,8 @@ private:
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* );
+ DECL_LINK_TYPED( GetFocusHandler, Control&, void );
+ DECL_LINK_TYPED( LoseFocusHandler, Control&, void );
DECL_LINK( InputRangeModified, void* );
DECL_LINK( Parameter1ValueModified, void* );
diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx
index 15b54d78279d..10507378f558 100644
--- a/sc/source/ui/inc/SamplingDialog.hxx
+++ b/sc/source/ui/inc/SamplingDialog.hxx
@@ -73,8 +73,8 @@ private:
ScRange PerformPeriodicSampling(ScDocShell* pDocShell);
DECL_LINK_TYPED( OkClicked, Button*, void );
- DECL_LINK( GetFocusHandler, Control* );
- DECL_LINK( LoseFocusHandler, void* );
+ DECL_LINK_TYPED( GetFocusHandler, Control&, void );
+ DECL_LINK_TYPED( LoseFocusHandler, Control&, void );
DECL_LINK( SamplingSizeValueModified, void* );
DECL_LINK_TYPED( ToggleSamplingMethod, RadioButton&, void );
DECL_LINK( RefInputModifyHandler, void* );
diff --git a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
index 340e5fbdd550..21510d6cf884 100644
--- a/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
+++ b/sc/source/ui/inc/StatisticsInputOutputDialog.hxx
@@ -81,8 +81,8 @@ private:
DECL_LINK_TYPED( GroupByChanged, RadioButton&, void );
DECL_LINK_TYPED( OkClicked, Button*, void );
- DECL_LINK( GetFocusHandler, Control* );
- DECL_LINK( LoseFocusHandler, void* );
+ DECL_LINK_TYPED( GetFocusHandler, Control&, void );
+ DECL_LINK_TYPED( LoseFocusHandler, Control&, void );
DECL_LINK( RefInputModifyHandler, void* );
};
diff --git a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
index 0a18619ab6ea..ebe8de00494d 100644
--- a/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
+++ b/sc/source/ui/inc/StatisticsTwoVariableDialog.hxx
@@ -84,8 +84,8 @@ private:
DECL_LINK_TYPED( GroupByChanged, RadioButton&, void );
DECL_LINK_TYPED( OkClicked, Button*, void );
- DECL_LINK( GetFocusHandler, Control* );
- DECL_LINK( LoseFocusHandler, void* );
+ DECL_LINK_TYPED( GetFocusHandler, Control&, void );
+ DECL_LINK_TYPED( LoseFocusHandler, Control&, void );
DECL_LINK( RefInputModifyHandler, void* );
};
diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx
index b48233e4e4c4..7b93cc8f46a8 100644
--- a/sc/source/ui/inc/areasdlg.hxx
+++ b/sc/source/ui/inc/areasdlg.hxx
@@ -76,7 +76,7 @@ private:
DECL_LINK( Impl_SelectHdl, ListBox* );
DECL_LINK( Impl_ModifyHdl, formula::RefEdit* );
DECL_LINK_TYPED( Impl_BtnHdl, Button*, void );
- DECL_LINK( Impl_GetFocusHdl, Control* );
+ DECL_LINK_TYPED( Impl_GetFocusHdl, Control&, void );
};
#endif
diff --git a/sc/source/ui/inc/condformatdlg.hxx b/sc/source/ui/inc/condformatdlg.hxx
index 62678a1efd89..bac7c365f590 100644
--- a/sc/source/ui/inc/condformatdlg.hxx
+++ b/sc/source/ui/inc/condformatdlg.hxx
@@ -148,7 +148,7 @@ public:
void InvalidateRefData();
DECL_LINK_TYPED( BtnPressedHdl, Button*, void );
- DECL_LINK( RangeGetFocusHdl, formula::RefEdit* );
+ DECL_LINK_TYPED( RangeGetFocusHdl, Control&, void );
};
#endif
diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx
index 2bdf95278847..e875010bfda9 100644
--- a/sc/source/ui/inc/consdlg.hxx
+++ b/sc/source/ui/inc/consdlg.hxx
@@ -93,7 +93,7 @@ private:
DECL_LINK_TYPED( OkHdl, Button*, void );
DECL_LINK_TYPED( ClickHdl, Button*, void );
- DECL_LINK( GetFocusHdl, Control* );
+ DECL_LINK_TYPED( GetFocusHdl, Control&, void );
DECL_LINK( ModifyHdl, formula::RefEdit* );
DECL_LINK( SelectHdl, ListBox* );
diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx
index a8f4a7174460..8e84a04daaea 100644
--- a/sc/source/ui/inc/crnrdlg.hxx
+++ b/sc/source/ui/inc/crnrdlg.hxx
@@ -86,8 +86,8 @@ private:
DECL_LINK_TYPED( ColClickHdl, Button*, void );
DECL_LINK_TYPED( RowClickHdl, Button*, void );
DECL_LINK( Range2DataModifyHdl, void * );
- DECL_LINK( GetFocusHdl, Control* );
- DECL_LINK( LoseFocusHdl, void* );
+ DECL_LINK_TYPED( GetFocusHdl, Control&, void );
+ DECL_LINK_TYPED( LoseFocusHdl, Control&, void );
};
#endif // INCLUDED_SC_SOURCE_UI_INC_CRNRDLG_HXX
diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx
index 94c3bfc55d9a..0cc9c6cd9911 100644
--- a/sc/source/ui/inc/namedefdlg.hxx
+++ b/sc/source/ui/inc/namedefdlg.hxx
@@ -67,7 +67,7 @@ private:
DECL_LINK_TYPED( CancelBtnHdl, Button*, void );
DECL_LINK_TYPED( AddBtnHdl, Button*, void );
DECL_LINK( NameModifyHdl, void* );
- DECL_LINK( AssignGetFocusHdl, void * );
+ DECL_LINK_TYPED( AssignGetFocusHdl, Control&, void );
protected:
virtual void RefInputDone( bool bForced = false ) SAL_OVERRIDE;
diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx
index 9a8329ab00d1..332a0d7b0b0d 100644
--- a/sc/source/ui/inc/namedlg.hxx
+++ b/sc/source/ui/inc/namedlg.hxx
@@ -106,7 +106,7 @@ private:
DECL_LINK_TYPED( RemoveBtnHdl, Button*, void );
DECL_LINK( EdModifyHdl, void * );
DECL_LINK_TYPED( EdModifyCheckBoxHdl, CheckBox&, void );
- DECL_LINK( AssignGetFocusHdl, void * );
+ DECL_LINK_TYPED( AssignGetFocusHdl, Control&, void );
DECL_LINK_TYPED( SelectionChangedHdl_Impl, SvTreeListBox*, void );
DECL_LINK( ScopeChangedHdl, void* );
diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx
index 77062131d0c4..6bdb0dd1b64d 100644
--- a/sc/source/ui/inc/optsolver.hxx
+++ b/sc/source/ui/inc/optsolver.hxx
@@ -191,8 +191,8 @@ private:
DECL_LINK_TYPED( BtnHdl, Button*, void );
DECL_LINK_TYPED( DelBtnHdl, Button*, void );
- DECL_LINK( GetFocusHdl, Control* );
- DECL_LINK( LoseFocusHdl, void* );
+ DECL_LINK_TYPED( GetFocusHdl, Control&, void );
+ DECL_LINK_TYPED( LoseFocusHdl, Control&, void );
DECL_LINK_TYPED( ScrollHdl, ScrollBar*, void);
DECL_LINK_TYPED( CursorUpHdl, ScCursorRefEdit&, void );
DECL_LINK_TYPED( CursorDownHdl, ScCursorRefEdit&, void );
diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx
index f937d8fecaf3..828dbb2f1777 100644
--- a/sc/source/ui/inc/solvrdlg.hxx
+++ b/sc/source/ui/inc/solvrdlg.hxx
@@ -81,8 +81,8 @@ private:
void RaiseError( ScSolverErr eError );
DECL_LINK_TYPED( BtnHdl, Button*, void );
- DECL_LINK( GetFocusHdl, Control* );
- DECL_LINK( LoseFocusHdl, void* );
+ DECL_LINK_TYPED( GetFocusHdl, Control&, void );
+ DECL_LINK_TYPED( LoseFocusHdl, Control&, void );
};
#endif // INCLUDED_SC_SOURCE_UI_INC_SOLVRDLG_HXX
diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx
index fb1e1d2081a4..e9eac1f2e2a1 100644
--- a/sc/source/ui/inc/tabopdlg.hxx
+++ b/sc/source/ui/inc/tabopdlg.hxx
@@ -88,8 +88,8 @@ private:
void RaiseError( ScTabOpErr eError );
DECL_LINK_TYPED( BtnHdl, Button*, void );
- DECL_LINK( GetFocusHdl, Control* );
- DECL_LINK( LoseFocusHdl, void* );
+ DECL_LINK_TYPED( GetFocusHdl, Control&, void );
+ DECL_LINK_TYPED( LoseFocusHdl, Control&, void );
};
#endif // INCLUDED_SC_SOURCE_UI_INC_TABOPDLG_HXX
diff --git a/sc/source/ui/inc/tpdefaults.hxx b/sc/source/ui/inc/tpdefaults.hxx
index deb267368baa..0cc0371f8e33 100644
--- a/sc/source/ui/inc/tpdefaults.hxx
+++ b/sc/source/ui/inc/tpdefaults.hxx
@@ -37,7 +37,7 @@ private:
DECL_LINK(NumModifiedHdl, void *);
DECL_LINK( PrefixModifiedHdl, Edit* );
- DECL_LINK( PrefixEditOnFocusHdl, Edit* );
+ DECL_LINK_TYPED( PrefixEditOnFocusHdl, Control&, void );
private:
VclPtr<NumericField> m_pEdNSheets;
diff --git a/sc/source/ui/inc/tpformula.hxx b/sc/source/ui/inc/tpformula.hxx
index 1024c7dcb878..35e5a70b9cf3 100644
--- a/sc/source/ui/inc/tpformula.hxx
+++ b/sc/source/ui/inc/tpformula.hxx
@@ -54,7 +54,7 @@ private:
DECL_LINK_TYPED( ButtonHdl, Button*, void );
DECL_LINK( SepModifyHdl, Edit* );
- DECL_LINK( SepEditOnFocusHdl, Edit* );
+ DECL_LINK_TYPED( SepEditOnFocusHdl, Control&, void );
private:
VclPtr<ListBox> mpLbFormulaSyntax;
diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx
index 00a66ac50927..9251a899771f 100644
--- a/sc/source/ui/inc/validate.hxx
+++ b/sc/source/ui/inc/validate.hxx
@@ -124,8 +124,8 @@ private:
OUString maStrList;
sal_Unicode mcFmlaSep; /// List separator in formulas.
- DECL_LINK(EditSetFocusHdl, void *);
- DECL_LINK( KillFocusHdl, vcl::Window *);
+ DECL_LINK_TYPED( EditSetFocusHdl, Control&, void );
+ DECL_LINK_TYPED( KillFocusHdl, Control&, void );
void OnClick( Button *pBtn );
VclPtr<formula::RefEdit> m_pRefEdit;
public:
diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx
index 6c5e4f0aed33..b9e50fc41f46 100644
--- a/sc/source/ui/inc/xmlsourcedlg.hxx
+++ b/sc/source/ui/inc/xmlsourcedlg.hxx
@@ -94,7 +94,7 @@ private:
void CancelPressed();
void RefEditModified();
- DECL_LINK(GetFocusHdl, Control*);
+ DECL_LINK_TYPED(GetFocusHdl, Control&, void);
DECL_LINK_TYPED(BtnPressedHdl, Button*, void);
DECL_LINK_TYPED(TreeItemSelectHdl, SvTreeListBox*, void);
DECL_LINK(RefModifiedHdl, void*);
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 54faeabe0fab..5cd874c5e8f1 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -107,7 +107,7 @@ void ScColRowNameRangesDlg::Init()
pBtnRowHead->SetClickHdl ( LINK( this, ScColRowNameRangesDlg, RowClickHdl ) );
pEdAssign2->SetModifyHdl ( LINK( this, ScColRowNameRangesDlg, Range2DataModifyHdl ) );
- Link<> aLink = LINK( this, ScColRowNameRangesDlg, GetFocusHdl );
+ Link<Control&,void> aLink = LINK( this, ScColRowNameRangesDlg, GetFocusHdl );
pEdAssign->SetGetFocusHdl( aLink );
pRbAssign->SetGetFocusHdl( aLink );
pEdAssign2->SetGetFocusHdl( aLink );
@@ -802,25 +802,22 @@ IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, RowClickHdl, Button*, void)
}
}
-IMPL_LINK( ScColRowNameRangesDlg, GetFocusHdl, Control*, pCtrl )
+IMPL_LINK_TYPED( ScColRowNameRangesDlg, GetFocusHdl, Control&, rCtrl, void )
{
- if( (pCtrl == static_cast<Control*>(pEdAssign)) || (pCtrl == static_cast<Control*>(pRbAssign)) )
+ if( (&rCtrl == static_cast<Control*>(pEdAssign)) || (&rCtrl == static_cast<Control*>(pRbAssign)) )
pEdActive = pEdAssign;
- else if( (pCtrl == static_cast<Control*>(pEdAssign2)) || (pCtrl == static_cast<Control*>(pRbAssign2)) )
+ else if( (&rCtrl == static_cast<Control*>(pEdAssign2)) || (&rCtrl == static_cast<Control*>(pRbAssign2)) )
pEdActive = pEdAssign2;
else
pEdActive = NULL;
if( pEdActive )
pEdActive->SetSelection( Selection( 0, SELECTION_MAX ) );
-
- return 0;
}
-IMPL_LINK_NOARG(ScColRowNameRangesDlg, LoseFocusHdl)
+IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, LoseFocusHdl, Control&, void)
{
bDlgLostFocus = !IsActive();
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx
index ace5271850ed..35286f880f73 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -376,7 +376,7 @@ void ScOptSolverDlg::Init(const ScAddress& rCursorPos)
m_pBtnCancel->SetClickHdl( LINK( this, ScOptSolverDlg, BtnHdl ) );
m_pBtnSolve->SetClickHdl( LINK( this, ScOptSolverDlg, BtnHdl ) );
- Link<> aLink = LINK( this, ScOptSolverDlg, GetFocusHdl );
+ Link<Control&,void> aLink = LINK( this, ScOptSolverDlg, GetFocusHdl );
m_pEdObjectiveCell->SetGetFocusHdl( aLink );
m_pRBObjectiveCell->SetGetFocusHdl( aLink );
m_pEdTargetValue->SetGetFocusHdl( aLink );
@@ -641,39 +641,36 @@ IMPL_LINK_TYPED( ScOptSolverDlg, BtnHdl, Button*, pBtn, void )
}
}
-IMPL_LINK( ScOptSolverDlg, GetFocusHdl, Control*, pCtrl )
+IMPL_LINK_TYPED( ScOptSolverDlg, GetFocusHdl, Control&, rCtrl, void )
{
Edit* pEdit = NULL;
mpEdActive = NULL;
- if( pCtrl == m_pEdObjectiveCell || pCtrl == m_pRBObjectiveCell )
+ if( &rCtrl == m_pEdObjectiveCell || &rCtrl == m_pRBObjectiveCell )
pEdit = mpEdActive = m_pEdObjectiveCell;
- else if( pCtrl == m_pEdTargetValue || pCtrl == m_pRBTargetValue )
+ else if( &rCtrl == m_pEdTargetValue || &rCtrl == m_pRBTargetValue )
pEdit = mpEdActive = m_pEdTargetValue;
- else if( pCtrl == m_pEdVariableCells || pCtrl == m_pRBVariableCells )
+ else if( &rCtrl == m_pEdVariableCells || &rCtrl == m_pRBVariableCells )
pEdit = mpEdActive = m_pEdVariableCells;
for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow )
{
- if( pCtrl == mpLeftEdit[nRow] || pCtrl == mpLeftButton[nRow] )
+ if( &rCtrl == mpLeftEdit[nRow] || &rCtrl == mpLeftButton[nRow] )
pEdit = mpEdActive = mpLeftEdit[nRow].get();
- else if( pCtrl == mpRightEdit[nRow] || pCtrl == mpRightButton[nRow] )
+ else if( &rCtrl == mpRightEdit[nRow] || &rCtrl == mpRightButton[nRow] )
pEdit = mpEdActive = mpRightEdit[nRow].get();
- else if( pCtrl == mpOperator[nRow] ) // focus on "operator" list box
+ else if( &rCtrl == mpOperator[nRow] ) // focus on "operator" list box
mpEdActive = mpRightEdit[nRow].get(); // use right edit for ref input, but don't change selection
}
- if( pCtrl == m_pRbValue ) // focus on "Value of" radio button
+ if( &rCtrl == m_pRbValue ) // focus on "Value of" radio button
mpEdActive = m_pEdTargetValue; // use value edit for ref input, but don't change selection
if( pEdit )
pEdit->SetSelection( Selection( 0, SELECTION_MAX ) );
-
- return 0;
}
-IMPL_LINK_NOARG(ScOptSolverDlg, LoseFocusHdl)
+IMPL_LINK_NOARG_TYPED(ScOptSolverDlg, LoseFocusHdl, Control&, void)
{
mbDlgLostFocus = !IsActive();
- return 0;
}
IMPL_LINK_TYPED( ScOptSolverDlg, DelBtnHdl, Button*, pBtn, void )
diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx
index ff37302b9658..bf775e7233de 100644
--- a/sc/source/ui/miscdlgs/solvrdlg.cxx
+++ b/sc/source/ui/miscdlgs/solvrdlg.cxx
@@ -96,7 +96,7 @@ void ScSolverDlg::Init()
m_pBtnOk->SetClickHdl( LINK( this, ScSolverDlg, BtnHdl ) );
m_pBtnCancel->SetClickHdl( LINK( this, ScSolverDlg, BtnHdl ) );
- Link<> aLink = LINK( this, ScSolverDlg, GetFocusHdl );
+ Link<Control&,void> aLink = LINK( this, ScSolverDlg, GetFocusHdl );
m_pEdFormulaCell->SetGetFocusHdl( aLink );
m_pRBFormulaCell->SetGetFocusHdl( aLink );
m_pEdVariableCell->SetGetFocusHdl( aLink );
@@ -255,28 +255,25 @@ IMPL_LINK_TYPED( ScSolverDlg, BtnHdl, Button*, pBtn, void )
}
}
-IMPL_LINK( ScSolverDlg, GetFocusHdl, Control*, pCtrl )
+IMPL_LINK_TYPED( ScSolverDlg, GetFocusHdl, Control&, rCtrl, void )
{
Edit* pEdit = NULL;
pEdActive = NULL;
- if( (pCtrl == static_cast<Control*>(m_pEdFormulaCell)) || (pCtrl == static_cast<Control*>(m_pRBFormulaCell)) )
+ if( (&rCtrl == static_cast<Control*>(m_pEdFormulaCell)) || (&rCtrl == static_cast<Control*>(m_pRBFormulaCell)) )
pEdit = pEdActive = m_pEdFormulaCell;
- else if( (pCtrl == static_cast<Control*>(m_pEdVariableCell)) || (pCtrl == static_cast<Control*>(m_pRBVariableCell)) )
+ else if( (&rCtrl == static_cast<Control*>(m_pEdVariableCell)) || (&rCtrl == static_cast<Control*>(m_pRBVariableCell)) )
pEdit = pEdActive = m_pEdVariableCell;
- else if( pCtrl == static_cast<Control*>(m_pEdTargetVal) )
+ else if( &rCtrl == static_cast<Control*>(m_pEdTargetVal) )
pEdit = m_pEdTargetVal;
if( pEdit )
pEdit->SetSelection( Selection( 0, SELECTION_MAX ) );
-
- return 0;
}
-IMPL_LINK_NOARG(ScSolverDlg, LoseFocusHdl)
+IMPL_LINK_NOARG_TYPED(ScSolverDlg, LoseFocusHdl, Control&, void)
{
bDlgLostFocus = !IsActive();
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx
index dd74ab0e431a..50d46e222422 100644
--- a/sc/source/ui/miscdlgs/tabopdlg.cxx
+++ b/sc/source/ui/miscdlgs/tabopdlg.cxx
@@ -103,7 +103,7 @@ void ScTabOpDlg::Init()
m_pBtnOk->SetClickHdl ( LINK( this, ScTabOpDlg, BtnHdl ) );
m_pBtnCancel->SetClickHdl ( LINK( this, ScTabOpDlg, BtnHdl ) );
- Link<> aLink = LINK( this, ScTabOpDlg, GetFocusHdl );
+ Link<Control&,void> aLink = LINK( this, ScTabOpDlg, GetFocusHdl );
m_pEdFormulaRange->SetGetFocusHdl( aLink );
m_pRBFormulaRange->SetGetFocusHdl( aLink );
m_pEdRowCell->SetGetFocusHdl( aLink );
@@ -322,27 +322,24 @@ IMPL_LINK_TYPED( ScTabOpDlg, BtnHdl, Button*, pBtn, void )
Close();
}
-IMPL_LINK( ScTabOpDlg, GetFocusHdl, Control*, pCtrl )
+IMPL_LINK_TYPED( ScTabOpDlg, GetFocusHdl, Control&, rCtrl, void )
{
- if( (pCtrl == static_cast<Control*>(m_pEdFormulaRange)) || (pCtrl == static_cast<Control*>(m_pRBFormulaRange)) )
+ if( (&rCtrl == static_cast<Control*>(m_pEdFormulaRange)) || (&rCtrl == static_cast<Control*>(m_pRBFormulaRange)) )
pEdActive = m_pEdFormulaRange;
- else if( (pCtrl == static_cast<Control*>(m_pEdRowCell)) || (pCtrl == static_cast<Control*>(m_pRBRowCell)) )
+ else if( (&rCtrl == static_cast<Control*>(m_pEdRowCell)) || (&rCtrl == static_cast<Control*>(m_pRBRowCell)) )
pEdActive = m_pEdRowCell;
- else if( (pCtrl == static_cast<Control*>(m_pEdColCell)) || (pCtrl == static_cast<Control*>(m_pRBColCell)) )
+ else if( (&rCtrl == static_cast<Control*>(m_pEdColCell)) || (&rCtrl == static_cast<Control*>(m_pRBColCell)) )
pEdActive = m_pEdColCell;
else
pEdActive = NULL;
if( pEdActive )
pEdActive->SetSelection( Selection( 0, SELECTION_MAX ) );
-
- return 0;
}
-IMPL_LINK_NOARG(ScTabOpDlg, LoseFocusHdl)
+IMPL_LINK_NOARG_TYPED(ScTabOpDlg, LoseFocusHdl, Control&, void)
{
bDlgLostFocus = !IsActive();
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx
index 9eafd5f40209..ac516d4a1390 100644
--- a/sc/source/ui/namedlg/namedefdlg.cxx
+++ b/sc/source/ui/namedlg/namedefdlg.cxx
@@ -343,10 +343,9 @@ IMPL_LINK_NOARG(ScNameDefDlg, NameModifyHdl)
return 0;
}
-IMPL_LINK_NOARG(ScNameDefDlg, AssignGetFocusHdl)
+IMPL_LINK_NOARG_TYPED(ScNameDefDlg, AssignGetFocusHdl, Control&, void)
{
IsNameValid();
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx
index 1a103ede8c0c..be5178409d9f 100644
--- a/sc/source/ui/namedlg/namedlg.cxx
+++ b/sc/source/ui/namedlg/namedlg.cxx
@@ -514,10 +514,9 @@ IMPL_LINK_NOARG(ScNameDlg, EdModifyHdl)
return 0;
}
-IMPL_LINK_NOARG(ScNameDlg, AssignGetFocusHdl)
+IMPL_LINK_NOARG_TYPED(ScNameDlg, AssignGetFocusHdl, Control&, void)
{
EdModifyHdl(m_pEdAssign);
- return 0;
}
IMPL_LINK_NOARG_TYPED(ScNameDlg, SelectionChangedHdl_Impl, SvTreeListBox*, void)
diff --git a/sc/source/ui/optdlg/tpdefaults.cxx b/sc/source/ui/optdlg/tpdefaults.cxx
index a2929f77eb3a..ceb39672d224 100644
--- a/sc/source/ui/optdlg/tpdefaults.cxx
+++ b/sc/source/ui/optdlg/tpdefaults.cxx
@@ -134,10 +134,9 @@ IMPL_LINK( ScTpDefaultsOptions, PrefixModifiedHdl, Edit*, pEdit )
return 0;
}
-IMPL_LINK( ScTpDefaultsOptions, PrefixEditOnFocusHdl, Edit*, pEdit )
+IMPL_LINK_TYPED( ScTpDefaultsOptions, PrefixEditOnFocusHdl, Control&, rControl, void )
{
- OnFocusPrefixInput(pEdit);
- return 0;
+ OnFocusPrefixInput(static_cast<Edit*>(&rControl));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 7201fb855306..c78e1afa8845 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -69,10 +69,10 @@ ScTpFormulaOptions::ScTpFormulaOptions(vcl::Window* pParent, const SfxItemSet& r
mpEdSepArrayCol->SetModifyHdl(aLink);
mpEdSepArrayRow->SetModifyHdl(aLink);
- aLink = LINK( this, ScTpFormulaOptions, SepEditOnFocusHdl );
- mpEdSepFuncArg->SetGetFocusHdl(aLink);
- mpEdSepArrayCol->SetGetFocusHdl(aLink);
- mpEdSepArrayRow->SetGetFocusHdl(aLink);
+ Link<Control&,void> aLink3 = LINK( this, ScTpFormulaOptions, SepEditOnFocusHdl );
+ mpEdSepFuncArg->SetGetFocusHdl(aLink3);
+ mpEdSepArrayCol->SetGetFocusHdl(aLink3);
+ mpEdSepArrayRow->SetGetFocusHdl(aLink3);
// Get the decimal separator for current locale.
OUString aSep = ScGlobal::GetpLocaleData()->getNumDecimalSep();
@@ -229,10 +229,9 @@ IMPL_LINK( ScTpFormulaOptions, SepModifyHdl, Edit*, pEdit )
return 0;
}
-IMPL_LINK( ScTpFormulaOptions, SepEditOnFocusHdl, Edit*, pEdit )
+IMPL_LINK_TYPED( ScTpFormulaOptions, SepEditOnFocusHdl, Control&, rControl, void )
{
- OnFocusSeparatorInput(pEdit);
- return 0;
+ OnFocusSeparatorInput(static_cast<Edit*>(&rControl));
}
VclPtr<SfxTabPage> ScTpFormulaOptions::Create(vcl::Window* pParent, const SfxItemSet* rCoreSet)
diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx
index 3b20cd717f20..9db2934591f8 100644
--- a/sc/source/ui/pagedlg/areasdlg.cxx
+++ b/sc/source/ui/pagedlg/areasdlg.cxx
@@ -517,28 +517,26 @@ IMPL_LINK_TYPED( ScPrintAreasDlg, Impl_BtnHdl, Button*, pBtn, void )
Close();
}
-IMPL_LINK( ScPrintAreasDlg, Impl_GetFocusHdl, Control*, pCtr )
+IMPL_LINK_TYPED( ScPrintAreasDlg, Impl_GetFocusHdl, Control&, rCtrl, void )
{
- if ( pCtr ==static_cast<Control *>(pEdPrintArea) ||
- pCtr ==static_cast<Control *>(pEdRepeatRow) ||
- pCtr ==static_cast<Control *>(pEdRepeatCol))
+ if ( &rCtrl ==static_cast<Control *>(pEdPrintArea) ||
+ &rCtrl ==static_cast<Control *>(pEdRepeatRow) ||
+ &rCtrl ==static_cast<Control *>(pEdRepeatCol))
{
- pRefInputEdit = static_cast<formula::RefEdit*>(pCtr);
+ pRefInputEdit = static_cast<formula::RefEdit*>(&rCtrl);
}
- else if ( pCtr ==static_cast<Control *>(pLbPrintArea))
+ else if ( &rCtrl ==static_cast<Control *>(pLbPrintArea))
{
pRefInputEdit = pEdPrintArea;
}
- else if ( pCtr ==static_cast<Control *>(pLbRepeatRow))
+ else if ( &rCtrl ==static_cast<Control *>(pLbRepeatRow))
{
pRefInputEdit = pEdRepeatRow;
}
- else if ( pCtr ==static_cast<Control *>(pLbRepeatCol))
+ else if ( &rCtrl ==static_cast<Control *>(pLbRepeatCol))
{
pRefInputEdit = pEdRepeatCol;
}
-
- return 0;
}
IMPL_LINK( ScPrintAreasDlg, Impl_SelectHdl, ListBox*, pLb )
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index deb99aa3dab3..e5e8379d54f9 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -99,13 +99,13 @@ ScXMLSourceDlg::ScXMLSourceDlg(
mpBtnOk->SetClickHdl(aBtnHdl);
mpBtnCancel->SetClickHdl(aBtnHdl);
- Link<> aLink = LINK(this, ScXMLSourceDlg, GetFocusHdl);
- mpRefEdit->SetGetFocusHdl(aLink);
- mpRefBtn->SetGetFocusHdl(aLink);
+ Link<Control&,void> aLink2 = LINK(this, ScXMLSourceDlg, GetFocusHdl);
+ mpRefEdit->SetGetFocusHdl(aLink2);
+ mpRefBtn->SetGetFocusHdl(aLink2);
mpLbTree->SetSelectHdl(LINK(this, ScXMLSourceDlg, TreeItemSelectHdl));
- aLink = LINK(this, ScXMLSourceDlg, RefModifiedHdl);
+ Link<> aLink = LINK(this, ScXMLSourceDlg, RefModifiedHdl);
mpRefEdit->SetModifyHdl(aLink);
mpBtnOk->Disable();
@@ -662,10 +662,9 @@ void ScXMLSourceDlg::RefEditModified()
mpBtnOk->Enable(bHasLink);
}
-IMPL_LINK(ScXMLSourceDlg, GetFocusHdl, Control*, pCtrl)
+IMPL_LINK_TYPED(ScXMLSourceDlg, GetFocusHdl, Control&, rCtrl, void)
{
- HandleGetFocus(pCtrl);
- return 0;
+ HandleGetFocus(&rCtrl);
}
IMPL_LINK_TYPED(ScXMLSourceDlg, BtnPressedHdl, Button*, pBtn, void)