diff options
author | Noel Grandin <noel@peralex.com> | 2015-09-17 14:40:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-09-17 14:41:59 +0200 |
commit | 528d698f97ef89635ac17f01530dd40a0cc5a7d0 (patch) | |
tree | b4c096ffedf0615a4f9f9c1aaa90d71bd5ed969a /starmath | |
parent | 485dcc9104a27812284e80d93d2bfbae86261afc (diff) |
convert Link<> to typed
Change-Id: Idc8e9b0ad0032940b98357b07f3e6caf26c5c2d7
Diffstat (limited to 'starmath')
-rw-r--r-- | starmath/inc/dialog.hxx | 7 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 11 |
2 files changed, 11 insertions, 7 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index 56205230fb66..9e09118bc91e 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -324,7 +324,7 @@ public: class SmShowSymbol : public Control { - Link<> aDblClickHdlLink; + Link<SmShowSymbol&,void> aDblClickHdlLink; virtual void Paint(vcl::RenderContext& rRenderContext, const Rectangle&) SAL_OVERRIDE; virtual void ApplySettings(vcl::RenderContext& rRenderContext) SAL_OVERRIDE; @@ -340,7 +340,7 @@ public: } void SetSymbol(const SmSym *pSymbol); - void SetDblClickHdl(const Link<> &rLink) { aDblClickHdlLink = rLink; } + void SetDblClickHdl(const Link<SmShowSymbol&,void> &rLink) { aDblClickHdlLink = rLink; } }; @@ -366,10 +366,11 @@ class SmSymbolDialog : public ModalDialog DECL_LINK(SymbolSetChangeHdl, void*); DECL_LINK_TYPED(SymbolChangeHdl, SmShowSymbolSetWindow&, void); - DECL_LINK(SymbolDblClickHdl, void*); + DECL_LINK_TYPED(SymbolDblClickHdl, SmShowSymbol&, void); DECL_LINK_TYPED(SymbolDblClickHdl2, SmShowSymbolSetWindow&, void); DECL_LINK_TYPED(EditClickHdl, Button*, void); DECL_LINK_TYPED(GetClickHdl, Button*, void); + void SymbolDblClickHdl(); void FillSymbolSets(bool bDeleteText = true); const SmSym *GetSymbol() const; diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index c059a68e9420..ff8ed3a060bf 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -1409,7 +1409,7 @@ void SmShowSymbol::Paint(vcl::RenderContext& rRenderContext, const Rectangle &rR void SmShowSymbol::MouseButtonDown(const MouseEvent& rMEvt) { if (rMEvt.GetClicks() > 1) - aDblClickHdlLink.Call(this); + aDblClickHdlLink.Call(*this); else Control::MouseButtonDown (rMEvt); } @@ -1506,13 +1506,16 @@ IMPL_LINK_NOARG_TYPED(SmSymbolDialog, EditClickHdl, Button*, void) IMPL_LINK_NOARG_TYPED( SmSymbolDialog, SymbolDblClickHdl2, SmShowSymbolSetWindow&, void ) { - SymbolDblClickHdl(nullptr); + SymbolDblClickHdl(); } -IMPL_LINK_NOARG( SmSymbolDialog, SymbolDblClickHdl ) +IMPL_LINK_NOARG_TYPED( SmSymbolDialog, SymbolDblClickHdl, SmShowSymbol&, void ) +{ + SymbolDblClickHdl(); +} +void SmSymbolDialog::SymbolDblClickHdl() { GetClickHdl(m_pGetBtn); EndDialog(RET_OK); - return 0; } |