diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-17 09:44:15 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-17 12:22:48 +0200 |
commit | 74801037c1e30a7edea97a177c2caedb7fb43b12 (patch) | |
tree | 04385d7382fb63cc6b615d52879bda5532b86b8b | |
parent | 918db85cd3d1cf171b91dbebf68171619aad69ae (diff) |
convert Link<> to typed
Change-Id: I0521aad1bc63c75242ae07feccebe24dbc754d6b
-rw-r--r-- | formula/source/ui/dlg/formula.cxx | 23 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcpage.cxx | 4 | ||||
-rw-r--r-- | formula/source/ui/dlg/funcpage.hxx | 17 |
3 files changed, 20 insertions, 24 deletions
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index 15dc84f5beb9..eb1b6a7171e5 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -124,12 +124,12 @@ 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_TYPED( FormulaCursorHdl, EditBox&, void); + DECL_LINK_TYPED( FormulaCursorHdl, EditBox&, void ); DECL_LINK_TYPED( BtnHdl, Button*, void ); - DECL_LINK(DblClkHdl, void *); - DECL_LINK(FuncSelHdl, void *); + DECL_LINK_TYPED( DblClkHdl, FuncPage&, void ); + DECL_LINK_TYPED( FuncSelHdl, FuncPage&, void ); DECL_LINK(StructSelHdl, void *); public: mutable uno::Reference< sheet::XFormulaOpCodeMapper> m_xOpCodeMapper; @@ -855,7 +855,7 @@ void FormulaDlg_Impl::FillListboxes() pFuncPage->SetCategory( pData->GetCatSel() ); pFuncPage->SetFunction( pData->GetFuncSel() ); } - FuncSelHdl(NULL); + FuncSelHdl(*pFuncPage); m_pHelper->setDispatcherLock( true );// Activate Modal-Mode @@ -972,7 +972,7 @@ void FormulaDlg_Impl::ClearAllParas() pParaWin->ClearAll(); m_pWndResult->SetText(OUString()); m_pFtFuncName->SetText(OUString()); - FuncSelHdl(NULL); + FuncSelHdl(*pFuncPage); if (pFuncPage->IsVisible()) { @@ -1052,7 +1052,7 @@ IMPL_LINK_TYPED( FormulaDlg_Impl, BtnHdl, Button*, pBtn, void ) EditNextFunc( true ); else { - DblClkHdl(pFuncPage); //new + DblClkHdl(*pFuncPage); //new m_pBtnForward->Enable(false); //new } } @@ -1076,7 +1076,7 @@ IMPL_LINK_TYPED( FormulaDlg_Impl, BtnHdl, Button*, pBtn, void ) // Handler for Listboxes -IMPL_LINK_NOARG(FormulaDlg_Impl, DblClkHdl) +IMPL_LINK_NOARG_TYPED(FormulaDlg_Impl, DblClkHdl, FuncPage&, void) { sal_Int32 nFunc = pFuncPage->GetFunction(); @@ -1104,8 +1104,6 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, DblClkHdl) pParaWin->SetEdFocus(0); m_pBtnForward->Enable(false); //@New - - return 0; } @@ -1538,7 +1536,7 @@ void FormulaDlg_Impl::Update(const OUString& _sExp) { CalcStruct(_sExp); FillDialog(); - FuncSelHdl(NULL); + FuncSelHdl(*pFuncPage); } void FormulaDlg_Impl::SetMeText(const OUString& _sText) { @@ -1597,7 +1595,7 @@ IMPL_LINK_NOARG_TYPED(FormulaDlg_Impl, MatrixHdl, Button*, void) bUserMatrixFlag=true; } -IMPL_LINK_NOARG(FormulaDlg_Impl, FuncSelHdl) +IMPL_LINK_NOARG_TYPED(FormulaDlg_Impl, FuncSelHdl, FuncPage&, void) { if ( (pFuncPage->GetFunctionEntryCount() > 0) && (pFuncPage->GetFunction() != LISTBOX_ENTRY_NOTFOUND) ) @@ -1622,7 +1620,6 @@ IMPL_LINK_NOARG(FormulaDlg_Impl, FuncSelHdl) m_pFtFuncName->SetText( OUString() ); m_pFtFuncDesc->SetText( OUString() ); } - return 0; } void FormulaDlg_Impl::UpdateParaWin(const Selection& _rSelection, const OUString& _sRefStr) diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx index 045eef2e78b0..7a254045b3b6 100644 --- a/formula/source/ui/dlg/funcpage.cxx +++ b/formula/source/ui/dlg/funcpage.cxx @@ -170,7 +170,7 @@ IMPL_LINK( FuncPage, SelHdl, ListBox*, pLb ) if ( !sHelpId.isEmpty() ) m_pLbFunction->SetHelpId(sHelpId); } - aSelectionLink.Call(this); + aSelectionLink.Call(*this); } else { @@ -182,7 +182,7 @@ IMPL_LINK( FuncPage, SelHdl, ListBox*, pLb ) IMPL_LINK_NOARG_TYPED(FuncPage, DblClkHdl, ListBox&, void) { - aDoubleClickLink.Call(this); + aDoubleClickLink.Call(*this); } void FuncPage::SetCategory(sal_Int32 nCat) diff --git a/formula/source/ui/dlg/funcpage.hxx b/formula/source/ui/dlg/funcpage.hxx index 98ad3d39cab5..7ef74fad608d 100644 --- a/formula/source/ui/dlg/funcpage.hxx +++ b/formula/source/ui/dlg/funcpage.hxx @@ -60,13 +60,12 @@ typedef const IFunctionDescription* TFunctionDesc; class FuncPage : public TabPage { private: - OModuleClient m_aModuleClient; - Link<> aDoubleClickLink; - Link<> aSelectionLink; - VclPtr<ListBox> m_pLbCategory; - VclPtr<FormulaListBox> m_pLbFunction; - const IFunctionManager* - m_pFunctionManager; + OModuleClient m_aModuleClient; + Link<FuncPage&,void> aDoubleClickLink; + Link<FuncPage&,void> aSelectionLink; + VclPtr<ListBox> m_pLbCategory; + VclPtr<FormulaListBox> m_pLbFunction; + const IFunctionManager* m_pFunctionManager; ::std::vector< TFunctionDesc > aLRUList; OString m_aHelpId; @@ -99,9 +98,9 @@ public: const IFunctionDescription* GetFuncDesc( sal_Int32 nPos ) const; OUString GetSelFunctionName() const; - void SetDoubleClickHdl( const Link<>& rLink ) { aDoubleClickLink = rLink; } + void SetDoubleClickHdl( const Link<FuncPage&,void>& rLink ) { aDoubleClickLink = rLink; } - void SetSelectHdl( const Link<>& rLink ) { aSelectionLink = rLink; } + void SetSelectHdl( const Link<FuncPage&,void>& rLink ) { aSelectionLink = rLink; } }; |