summaryrefslogtreecommitdiff
path: root/sc/source/ui/miscdlgs
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-15 08:13:49 +0200
committerNoel Grandin <noelgrandin@gmail.com>2015-10-16 09:11:29 +0000
commit6f1313b3d44ea54e9a331e0fc00871081fa662fe (patch)
treefa6d9b6da04daedcb63ea2a0bc8c414288ed8bc6 /sc/source/ui/miscdlgs
parent14bf708ef586b15dffed66ffaf524baf4d8fcbfa (diff)
convert Link<> to typed
Change-Id: Icbba339dac0be31e30dff021bba06a219f8aecd6 Reviewed-on: https://gerrit.libreoffice.org/19405 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui/miscdlgs')
-rw-r--r--sc/source/ui/miscdlgs/crnrdlg.cxx10
-rw-r--r--sc/source/ui/miscdlgs/datafdlg.cxx5
-rw-r--r--sc/source/ui/miscdlgs/datastreamdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/mtrindlg.cxx3
-rw-r--r--sc/source/ui/miscdlgs/mvtabdlg.cxx6
-rw-r--r--sc/source/ui/miscdlgs/optsolver.cxx8
-rw-r--r--sc/source/ui/miscdlgs/protectiondlg.cxx5
-rw-r--r--sc/source/ui/miscdlgs/retypepassdlg.cxx5
9 files changed, 18 insertions, 30 deletions
diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx
index 169e4bf05acf..9fde83cf8d42 100644
--- a/sc/source/ui/miscdlgs/crnrdlg.cxx
+++ b/sc/source/ui/miscdlgs/crnrdlg.cxx
@@ -338,9 +338,9 @@ void ScColRowNameRangesDlg::SetActive()
GrabFocus();
if( pEdActive == pEdAssign )
- Range1DataModifyHdl( 0 );
+ Range1DataModifyHdl( *pEdAssign );
else if( pEdActive == pEdAssign2 )
- Range2DataModifyHdl( 0 );
+ Range2DataModifyHdl( *pEdAssign2 );
RefInputDone();
}
@@ -705,7 +705,7 @@ IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, Range1SelectHdl, ListBox&, void)
}
// handler called when the label range has changed
-IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1DataModifyHdl)
+IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, Range1DataModifyHdl, Edit&, void)
{
OUString aNewArea( pEdAssign->GetText() );
bool bValid = false;
@@ -735,11 +735,10 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range1DataModifyHdl)
pRbAssign2->Disable();
}
pBtnRemove->Disable();
- return 0;
}
// handler called when the data range has changed
-IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range2DataModifyHdl)
+IMPL_LINK_NOARG_TYPED(ScColRowNameRangesDlg, Range2DataModifyHdl, Edit&, void)
{
OUString aNewData( pEdAssign2->GetText() );
if ( !aNewData.isEmpty() )
@@ -757,7 +756,6 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, Range2DataModifyHdl)
{
pBtnAdd->Disable();
}
- return 0;
}
// handler for the radio button for columns, adjust ranges
diff --git a/sc/source/ui/miscdlgs/datafdlg.cxx b/sc/source/ui/miscdlgs/datafdlg.cxx
index 8c095bcfa434..32c6dd94504e 100644
--- a/sc/source/ui/miscdlgs/datafdlg.cxx
+++ b/sc/source/ui/miscdlgs/datafdlg.cxx
@@ -251,11 +251,10 @@ void ScDataFormDlg::FillCtrls(SCROW /*nCurrentRow*/)
m_pSlider->SetThumbPos(nCurrentRow-nStartRow-1);
}
-IMPL_LINK( ScDataFormDlg, Impl_DataModifyHdl, Edit*, pEdit)
+IMPL_LINK_TYPED( ScDataFormDlg, Impl_DataModifyHdl, Edit&, rEdit, void)
{
- if ( pEdit->IsModified() )
+ if ( rEdit.IsModified() )
m_pBtnRestore->Enable( true );
- return 0;
}
IMPL_LINK_NOARG_TYPED(ScDataFormDlg, Impl_NewHdl, Button*, void)
diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx
index c453f941cc7b..5aa18913cd82 100644
--- a/sc/source/ui/miscdlgs/datastreamdlg.cxx
+++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx
@@ -97,10 +97,9 @@ IMPL_LINK_NOARG_TYPED(DataStreamDlg, UpdateComboBoxHdl, ComboBox&, void)
{
UpdateEnable();
}
-IMPL_LINK_NOARG(DataStreamDlg, UpdateHdl)
+IMPL_LINK_NOARG_TYPED(DataStreamDlg, UpdateHdl, Edit&, void)
{
UpdateEnable();
- return 0;
}
void DataStreamDlg::UpdateEnable()
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 683ccd3d9dbb..410b27a8a538 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -246,7 +246,7 @@ const OUString* ScInsertTableDlg::GetNextTable( sal_uInt16* pN )
// Handler:
-IMPL_LINK_NOARG(ScInsertTableDlg, CountHdl_Impl)
+IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, CountHdl_Impl, Edit&, void)
{
nTableCount = static_cast<SCTAB>(m_pNfCount->GetValue());
if ( nTableCount==1)
@@ -265,7 +265,6 @@ IMPL_LINK_NOARG(ScInsertTableDlg, CountHdl_Impl)
}
DoEnable_Impl();
- return 0;
}
IMPL_LINK_NOARG_TYPED(ScInsertTableDlg, ChoiceHdl_Impl, Button*, void)
diff --git a/sc/source/ui/miscdlgs/mtrindlg.cxx b/sc/source/ui/miscdlgs/mtrindlg.cxx
index 92c39f599d66..cedfcbe1e487 100644
--- a/sc/source/ui/miscdlgs/mtrindlg.cxx
+++ b/sc/source/ui/miscdlgs/mtrindlg.cxx
@@ -107,10 +107,9 @@ IMPL_LINK_NOARG_TYPED(ScMetricInputDlg, SetDefValHdl, Button*, void)
m_pEdValue->SetValue( nCurrentValue );
}
-IMPL_LINK_NOARG(ScMetricInputDlg, ModifyHdl)
+IMPL_LINK_NOARG_TYPED(ScMetricInputDlg, ModifyHdl, Edit&, void)
{
m_pBtnDefVal->Check( nDefaultValue == m_pEdValue->GetValue() );
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx
index cc7f92ebe6f5..3e3ed9951daa 100644
--- a/sc/source/ui/miscdlgs/mvtabdlg.cxx
+++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx
@@ -319,15 +319,13 @@ IMPL_LINK_TYPED( ScMoveTableDlg, SelHdl, ListBox&, rLb, void )
}
}
-IMPL_LINK( ScMoveTableDlg, CheckNameHdl, Edit *, pEdt )
+IMPL_LINK_TYPED( ScMoveTableDlg, CheckNameHdl, Edit&, rEdt, void )
{
- if ( pEdt == pEdTabName )
+ if ( &rEdt == pEdTabName )
{
mbEverEdited = true;
CheckNewTabName();
}
-
- 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 77fb82af60cc..01a7d5e3750c 100644
--- a/sc/source/ui/miscdlgs/optsolver.cxx
+++ b/sc/source/ui/miscdlgs/optsolver.cxx
@@ -410,7 +410,7 @@ void ScOptSolverDlg::Init(const ScAddress& rCursorPos)
Link<ScCursorRefEdit&,void> aCursorUp = LINK( this, ScOptSolverDlg, CursorUpHdl );
Link<ScCursorRefEdit&,void> aCursorDown = LINK( this, ScOptSolverDlg, CursorDownHdl );
- Link<> aCondModify = LINK( this, ScOptSolverDlg, CondModifyHdl );
+ Link<Edit&,void> aCondModify = LINK( this, ScOptSolverDlg, CondModifyHdl );
for ( sal_uInt16 nRow = 0; nRow < EDIT_ROW_COUNT; ++nRow )
{
mpLeftEdit[nRow]->SetCursorLinks( aCursorUp, aCursorDown );
@@ -699,21 +699,19 @@ IMPL_LINK_TYPED( ScOptSolverDlg, DelBtnHdl, Button*, pBtn, void )
}
}
-IMPL_LINK_NOARG(ScOptSolverDlg, TargetModifyHdl)
+IMPL_LINK_NOARG_TYPED(ScOptSolverDlg, TargetModifyHdl, Edit&, void)
{
// modify handler for the target edit:
// select "Value of" if something is input into the edit
if ( !m_pEdTargetValue->GetText().isEmpty() )
m_pRbValue->Check();
- return 0;
}
-IMPL_LINK_NOARG(ScOptSolverDlg, CondModifyHdl)
+IMPL_LINK_NOARG_TYPED(ScOptSolverDlg, CondModifyHdl, Edit&, void)
{
// modify handler for the condition edits, just to enable/disable "delete" buttons
ReadConditions();
EnableButtons();
- return 0;
}
IMPL_LINK_NOARG_TYPED(ScOptSolverDlg, SelectHdl, ListBox&, void)
diff --git a/sc/source/ui/miscdlgs/protectiondlg.cxx b/sc/source/ui/miscdlgs/protectiondlg.cxx
index eac9eac93291..bb0860deaaec 100644
--- a/sc/source/ui/miscdlgs/protectiondlg.cxx
+++ b/sc/source/ui/miscdlgs/protectiondlg.cxx
@@ -93,7 +93,7 @@ void ScTableProtectionDlg::Init()
m_pBtnOk->SetClickHdl(LINK( this, ScTableProtectionDlg, OKHdl ));
- Link<> aLink = LINK( this, ScTableProtectionDlg, PasswordModifyHdl );
+ Link<Edit&,void> aLink = LINK( this, ScTableProtectionDlg, PasswordModifyHdl );
m_pPassword1Edit->SetModifyHdl(aLink);
m_pPassword2Edit->SetModifyHdl(aLink);
@@ -135,12 +135,11 @@ IMPL_LINK_NOARG_TYPED(ScTableProtectionDlg, OKHdl, Button*, void)
EndDialog(RET_OK);
}
-IMPL_LINK_NOARG(ScTableProtectionDlg, PasswordModifyHdl)
+IMPL_LINK_NOARG_TYPED(ScTableProtectionDlg, PasswordModifyHdl, Edit&, void)
{
OUString aPass1 = m_pPassword1Edit->GetText();
OUString aPass2 = m_pPassword2Edit->GetText();
m_pBtnOk->Enable(aPass1 == aPass2);
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx
index 639f74744d80..1244b093c6a5 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.cxx
+++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx
@@ -368,7 +368,7 @@ void ScRetypePassInputDlg::Init()
m_pBtnRemovePassword->SetClickHdl(aLink);
aLink = LINK( this, ScRetypePassInputDlg, CheckBoxHdl );
m_pBtnMatchOldPass->SetClickHdl(aLink);
- Link<> aLink2 = LINK( this, ScRetypePassInputDlg, PasswordModifyHdl );
+ Link<Edit&,void> aLink2 = LINK( this, ScRetypePassInputDlg, PasswordModifyHdl );
m_pPassword1Edit->SetModifyHdl(aLink2);
m_pPassword2Edit->SetModifyHdl(aLink2);
@@ -440,10 +440,9 @@ IMPL_LINK_NOARG_TYPED(ScRetypePassInputDlg, CheckBoxHdl, Button*, void)
CheckPasswordInput();
}
-IMPL_LINK_NOARG(ScRetypePassInputDlg, PasswordModifyHdl)
+IMPL_LINK_NOARG_TYPED(ScRetypePassInputDlg, PasswordModifyHdl, Edit&, void)
{
CheckPasswordInput();
- return 0;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */