diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-17 09:34:41 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-17 12:22:47 +0200 |
commit | a08471fe1d36bce2d9d09a131c1f392baf70b46a (patch) | |
tree | 14f08168c34aba4056403b387e6e45d958ddc9db /formula | |
parent | 061934621664c61dd04de2e48935a7fcfe00e552 (diff) |
convert Link<> to typed
Change-Id: I70fab365886ef1c6ed755ec86ebd7952ca613ea7
Diffstat (limited to 'formula')
-rw-r--r-- | formula/source/ui/dlg/ControlHelper.hxx | 8 | ||||
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 11 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcutl.cxx | 2 |
3 files changed, 10 insertions, 11 deletions
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx index e78a289b869d..4905f7ae7acf 100644 --- a/formula/source/ui/dlg/ControlHelper.hxx +++ b/formula/source/ui/dlg/ControlHelper.hxx @@ -30,9 +30,9 @@ class EditBox : public Control private: VclPtr<MultiLineEdit> pMEdit; - Link<> aSelChangedLink; - Selection aOldSel; - bool bMouseFlag; + Link<EditBox&,void> aSelChangedLink; + Selection aOldSel; + bool bMouseFlag; DECL_LINK_TYPED(ChangedHdl, void *, void); @@ -52,7 +52,7 @@ public: MultiLineEdit* GetEdit() {return pMEdit;} - void SetSelChangedHdl( const Link<>& rLink ) { aSelChangedLink = rLink; } + void SetSelChangedHdl( const Link<EditBox&,void>& rLink ) { aSelChangedLink = rLink; } void UpdateOldSel(); }; diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index a115918843a0..15dc84f5beb9 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -124,9 +124,9 @@ public: DECL_LINK( ModifyHdl, ParaWin* ); DECL_LINK( FxHdl, ParaWin* ); - DECL_LINK_TYPED(MatrixHdl, Button*, void); + DECL_LINK_TYPED( MatrixHdl, Button*, void); DECL_LINK(FormulaHdl, void *); - DECL_LINK(FormulaCursorHdl, void *); + DECL_LINK_TYPED( FormulaCursorHdl, EditBox&, void); DECL_LINK_TYPED( BtnHdl, Button*, void ); DECL_LINK(DblClkHdl, void *); DECL_LINK(FuncSelHdl, void *); @@ -1354,10 +1354,10 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaHdl) return 0; } -IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl) +IMPL_LINK_NOARG_TYPED(FormulaDlg_Impl, FormulaCursorHdl, EditBox&, void) { FormEditData* pData = m_pHelper->getFormEditData(); - if (!pData) return 0; + if (!pData) return; sal_Int32 nFStart = pData->GetFStart(); bEditFlag=true; @@ -1419,7 +1419,6 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FormulaCursorHdl) m_pHelper->setSelection(aSel.Min(), aSel.Max()); bEditFlag=false; - return 0; } void FormulaDlg_Impl::UpdateSelection() @@ -1527,7 +1526,7 @@ void FormulaDlg_Impl::Update() const OUString sExpression = pMEdit->GetText(); aOldFormula.clear(); UpdateTokenArray(sExpression); - FormulaCursorHdl(m_pMEFormula); + FormulaCursorHdl(*m_pMEFormula); CalcStruct(sExpression); if(pData->GetMode() == FORMULA_FORMDLG_FORMULA) m_pTabCtrl->SetCurPageId(TP_FUNCTION); diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index f35b81856978..a88e3694aba6 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -378,7 +378,7 @@ void EditBox::dispose() // When the selection is changed this function will be called void EditBox::SelectionChanged() { - aSelChangedLink.Call(this); + aSelChangedLink.Call(*this); } // When the size is changed, MultiLineEdit must be adapted.. |