summaryrefslogtreecommitdiff
path: root/formula/source
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-09-17 09:49:07 +0200
committerNoel Grandin <noel@peralex.com>2015-09-17 12:22:48 +0200
commitb56850ecbc9c10c6226cdae0d42443933b24dff7 (patch)
treeefd6ad0089c5b5079070528f9a2d90ae47e9cf28 /formula/source
parentd7c428c687f3edc0e110d07c0bb381fe30ad6db9 (diff)
convert Link<> to typed
Change-Id: I93988860f409e13d99aaec06a0b0833b3814da24
Diffstat (limited to 'formula/source')
-rw-r--r--formula/source/ui/dlg/formula.cxx18
-rw-r--r--formula/source/ui/dlg/parawin.cxx4
-rw-r--r--formula/source/ui/dlg/parawin.hxx9
3 files changed, 14 insertions, 17 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index eb1b6a7171e5..a435d1caad57 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -121,8 +121,8 @@ public:
const FormulaHelper& GetFormulaHelper() const { return m_aFormulaHelper;}
uno::Reference< sheet::XFormulaOpCodeMapper > GetFormulaOpCodeMapper() const;
- DECL_LINK( ModifyHdl, ParaWin* );
- DECL_LINK( FxHdl, ParaWin* );
+ DECL_LINK_TYPED( ModifyHdl, ParaWin&, void );
+ DECL_LINK_TYPED( FxHdl, ParaWin&, void );
DECL_LINK_TYPED( MatrixHdl, Button*, void );
DECL_LINK(FormulaHdl, void *);
@@ -1239,16 +1239,16 @@ void FormulaDlg_Impl::SaveArg( sal_uInt16 nEd )
}
}
-IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr )
+IMPL_LINK_TYPED( FormulaDlg_Impl, FxHdl, ParaWin&, rPtr, void )
{
- if(pPtr==pParaWin)
+ if(&rPtr==pParaWin)
{
m_pBtnForward->Enable(true); //@ In order to be able to input another function.
m_pTabCtrl->SetCurPageId(TP_FUNCTION);
OUString aUndoStr = m_pHelper->getCurrentFormula(); // it will be added before a ";"
FormEditData* pData = m_pHelper->getFormEditData();
- if (!pData) return 0;
+ if (!pData) return;
sal_uInt16 nArgNo = pParaWin->GetActiveLine();
nEdFocus=nArgNo;
@@ -1271,12 +1271,11 @@ IMPL_LINK( FormulaDlg_Impl, FxHdl, ParaWin*, pPtr )
FillDialog(false);
pFuncPage->SetFocus(); //There Parawin is not visible anymore
}
- return 0;
}
-IMPL_LINK( FormulaDlg_Impl, ModifyHdl, ParaWin*, pPtr )
+IMPL_LINK_TYPED( FormulaDlg_Impl, ModifyHdl, ParaWin&, rPtr, void )
{
- if(pPtr==pParaWin)
+ if(&rPtr==pParaWin)
{
SaveArg(pParaWin->GetActiveLine());
UpdateValues();
@@ -1284,7 +1283,6 @@ IMPL_LINK( FormulaDlg_Impl, ModifyHdl, ParaWin*, pPtr )
UpdateSelection();
CalcStruct(pMEdit->GetText());
}
- return 0;
}
IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl)
@@ -1508,7 +1506,7 @@ void FormulaDlg_Impl::RefInputDoneAfter( bool bForced )
sal_uInt16 nPrivActiv = pParaWin->GetActiveLine();
pParaWin->SetArgument( nPrivActiv, m_pEdRef->GetText() );
- ModifyHdl( pParaWin );
+ ModifyHdl( *pParaWin );
pTheRefEdit = NULL;
}
m_pParent->SetText( aTitle1 );
diff --git a/formula/source/ui/dlg/parawin.cxx b/formula/source/ui/dlg/parawin.cxx
index de55090f6528..05a0b71ef646 100644
--- a/formula/source/ui/dlg/parawin.cxx
+++ b/formula/source/ui/dlg/parawin.cxx
@@ -538,12 +538,12 @@ void ParaWin::SliderMoved()
void ParaWin::ArgumentModified()
{
- aArgModifiedLink.Call(this);
+ aArgModifiedLink.Call(*this);
}
void ParaWin::FxClick()
{
- aFxLink.Call(this);
+ aFxLink.Call(*this);
}
diff --git a/formula/source/ui/dlg/parawin.hxx b/formula/source/ui/dlg/parawin.hxx
index fc0241fc9e8a..894b7de2ec9c 100644
--- a/formula/source/ui/dlg/parawin.hxx
+++ b/formula/source/ui/dlg/parawin.hxx
@@ -45,8 +45,8 @@ class ParaWin : public TabPage
{
private:
OModuleClient m_aModuleClient;
- Link<> aFxLink;
- Link<> aArgModifiedLink;
+ Link<ParaWin&,void> aFxLink;
+ Link<ParaWin&,void> aArgModifiedLink;
::std::vector<sal_uInt16> aVisibleArgMapping;
const IFunctionDescription* pFuncDesc;
@@ -147,9 +147,8 @@ public:
sal_uInt16 GetSliderPos();
void SetSliderPos(sal_uInt16 nSliderPos);
- void SetArgModifiedHdl( const Link<>& rLink ) { aArgModifiedLink = rLink; }
-
- void SetFxHdl( const Link<>& rLink ) { aFxLink = rLink; }
+ void SetArgModifiedHdl( const Link<ParaWin&,void>& rLink ) { aArgModifiedLink = rLink; }
+ void SetFxHdl( const Link<ParaWin&,void>& rLink ) { aFxLink = rLink; }
};