diff options
author | Noel Grandin <noel@peralex.com> | 2015-10-20 15:53:36 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-10-20 16:16:45 +0200 |
commit | 516b5115df7597216f887f39add9944630cf3438 (patch) | |
tree | 6e8c36ca09e96767169636ea4e67811e9a365bb6 /dbaccess/source/ui/dlg/indexfieldscontrol.cxx | |
parent | 798d7bc09e81af112ce672a8166e29039108aef7 (diff) |
convert Link<> to typed
Change-Id: I822561725683231709343b80d7065c905226ebc1
Diffstat (limited to 'dbaccess/source/ui/dlg/indexfieldscontrol.cxx')
-rw-r--r-- | dbaccess/source/ui/dlg/indexfieldscontrol.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index 3d840723c9d4..3837febff35d 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -40,7 +40,7 @@ namespace dbaui class DbaMouseDownListBoxController : public ListBoxCellController { protected: - Link<> m_aAdditionalModifyHdl; + Link<DbaMouseDownListBoxController&,void> m_aAdditionalModifyHdl; public: explicit DbaMouseDownListBoxController(ListBoxControl* _pParent) @@ -48,21 +48,21 @@ namespace dbaui { } - void SetAdditionalModifyHdl(const Link<>& _rHdl); + void SetAdditionalModifyHdl(const Link<DbaMouseDownListBoxController&,void>& _rHdl); protected: virtual bool WantMouseEvent() const override { return true; } virtual void callModifyHdl() override; }; - void DbaMouseDownListBoxController::SetAdditionalModifyHdl(const Link<>& _rHdl) + void DbaMouseDownListBoxController::SetAdditionalModifyHdl(const Link<DbaMouseDownListBoxController&,void>& _rHdl) { m_aAdditionalModifyHdl = _rHdl; } void DbaMouseDownListBoxController::callModifyHdl() { - m_aAdditionalModifyHdl.Call(nullptr); + m_aAdditionalModifyHdl.Call(*this); ListBoxCellController::callModifyHdl(); } @@ -383,13 +383,13 @@ namespace dbaui } } - IMPL_LINK( IndexFieldsControl, OnListEntrySelected, void*, p ) + IMPL_LINK_TYPED( IndexFieldsControl, OnListEntrySelected, DbaMouseDownListBoxController&, rController, void ) { - ListBox* _pBox = static_cast<ListBox*>(p); - if (!_pBox->IsTravelSelect()) + ListBoxControl& rListBox = rController.GetListBox(); + if (!rListBox.IsTravelSelect()) m_aModifyHdl.Call(this); - if (_pBox == m_pFieldNameCell) + if (&rListBox == m_pFieldNameCell.get()) { // a field has been selected if (GetCurRow() >= GetRowCount() - 2) { // and we're in one of the last two rows @@ -417,7 +417,6 @@ namespace dbaui SaveModified(); } - return 0L; } OUString IndexFieldsControl::GetCellText(long _nRow,sal_uInt16 nColId) const { |