diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-15 15:26:50 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-15 15:47:13 +0200 |
commit | 74d686bc59cd70e7ad89f7845199eb751aa7145d (patch) | |
tree | 29ce62f941b417f37802d89984fd6e570eba929c /dbaccess | |
parent | 6212c467156e2bd4580a9f8145124223d3135ea4 (diff) |
simplify the CellController modify Link<> handling
in preparation for some more "make Link<> typed" work
Change-Id: Ifdf58cc697c7172102bf9e4cc63f869c522517e6
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 29 |
1 files changed, 4 insertions, 25 deletions
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index 26004ae68ba8..b59938c439d5 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -40,7 +40,6 @@ namespace dbaui class DbaMouseDownListBoxController : public ListBoxCellController { protected: - Link<> m_aOriginalModifyHdl; Link<> m_aAdditionalModifyHdl; public: @@ -53,38 +52,18 @@ namespace dbaui protected: virtual bool WantMouseEvent() const override { return true; } - virtual void SetModifyHdl(const Link<>& _rHdl) override; - - private: - void implCheckLinks(); - DECL_LINK( OnMultiplexModify, void* ); + virtual void callModifyHdl() override; }; void DbaMouseDownListBoxController::SetAdditionalModifyHdl(const Link<>& _rHdl) { m_aAdditionalModifyHdl = _rHdl; - implCheckLinks(); } - void DbaMouseDownListBoxController::SetModifyHdl(const Link<>& _rHdl) + void DbaMouseDownListBoxController::callModifyHdl() { - m_aOriginalModifyHdl = _rHdl; - implCheckLinks(); - } - - IMPL_LINK( DbaMouseDownListBoxController, OnMultiplexModify, void*, _pArg ) - { - m_aAdditionalModifyHdl.Call(_pArg); - m_aOriginalModifyHdl.Call(_pArg); - return 0L; - } - - void DbaMouseDownListBoxController::implCheckLinks() - { - if (m_aAdditionalModifyHdl.IsSet() || m_aOriginalModifyHdl.IsSet()) - ListBoxCellController::SetModifyHdl(LINK(this, DbaMouseDownListBoxController, OnMultiplexModify)); - else - ListBoxCellController::SetModifyHdl(Link<>()); + m_aAdditionalModifyHdl.Call(nullptr); + ListBoxCellController::callModifyHdl(); } // IndexFieldsControl |