diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-13 17:29:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-09-13 22:19:36 +0200 |
commit | 1e531c31600a76e1d55e2f2e5abd351ff80bc4fd (patch) | |
tree | 88dd05ca3e40503ead4d14e395d5db42ece1a0b0 /svtools/source/brwbox/ebbcontrols.cxx | |
parent | a7084f156a75ab363d2562b485b240bd350563fc (diff) |
tdf#142415 mouse events not propogated to table control event handlers
handle this with explicit callbacks from the cell widget for those
events
Change-Id: Ie605ca4286afc0fbd321f339fb7963771a303df5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122050
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svtools/source/brwbox/ebbcontrols.cxx')
-rw-r--r-- | svtools/source/brwbox/ebbcontrols.cxx | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 32ad1e52c748..04ba4b489f08 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -32,6 +32,9 @@ namespace svt m_xWidget->connect_key_press(LINK(this, ControlBase, KeyInputHdl)); m_xWidget->connect_focus_in(LINK(this, ControlBase, FocusInHdl)); m_xWidget->connect_focus_out(LINK(this, ControlBase, FocusOutHdl)); + m_xWidget->connect_mouse_press(LINK(this, ControlBase, MousePressHdl)); + m_xWidget->connect_mouse_release(LINK(this, ControlBase, MouseReleaseHdl)); + m_xWidget->connect_mouse_move(LINK(this, ControlBase, MouseMoveHdl)); } void ComboBoxControl::dispose() @@ -119,6 +122,9 @@ namespace svt m_xWidget->connect_key_press(LINK(this, ControlBase, KeyInputHdl)); m_xWidget->connect_focus_in(LINK(this, ControlBase, FocusInHdl)); m_xWidget->connect_focus_out(LINK(this, ControlBase, FocusOutHdl)); + m_xWidget->connect_mouse_press(LINK(this, ControlBase, MousePressHdl)); + m_xWidget->connect_mouse_release(LINK(this, ControlBase, MouseReleaseHdl)); + m_xWidget->connect_mouse_move(LINK(this, ControlBase, MouseMoveHdl)); } void ListBoxControl::dispose() @@ -189,6 +195,9 @@ namespace svt m_xBox->connect_key_press(LINK(this, ControlBase, KeyInputHdl)); m_xBox->connect_focus_in(LINK(this, ControlBase, FocusInHdl)); m_xBox->connect_focus_out(LINK(this, ControlBase, FocusOutHdl)); + m_xBox->connect_mouse_press(LINK(this, ControlBase, MousePressHdl)); + m_xBox->connect_mouse_release(LINK(this, ControlBase, MouseReleaseHdl)); + m_xBox->connect_mouse_move(LINK(this, ControlBase, MouseMoveHdl)); m_xBox->connect_toggled(LINK(this, CheckBoxControl, OnToggle)); } @@ -342,6 +351,9 @@ namespace svt m_pEntry->connect_key_press(LINK(this, ControlBase, KeyInputHdl)); m_pEntry->connect_focus_in(LINK(this, ControlBase, FocusInHdl)); connect_focus_out(LINK(this, ControlBase, FocusOutHdl)); + m_pEntry->connect_mouse_press(LINK(this, ControlBase, MousePressHdl)); + m_pEntry->connect_mouse_release(LINK(this, ControlBase, MouseReleaseHdl)); + m_pEntry->connect_mouse_move(LINK(this, ControlBase, MouseMoveHdl)); } bool ControlBase::ProcessKey(const KeyEvent& rKEvt) @@ -366,6 +378,24 @@ namespace svt static_cast<BrowserDataWin*>(GetParent())->GetParent()->ChildFocusOut(); } + IMPL_LINK(ControlBase, MousePressHdl, const MouseEvent&, rEvent, bool) + { + m_aMousePressHdl.Call(rEvent); + return false; + } + + IMPL_LINK(ControlBase, MouseReleaseHdl, const MouseEvent&, rEvent, bool) + { + m_aMouseReleaseHdl.Call(rEvent); + return false; + } + + IMPL_LINK(ControlBase, MouseMoveHdl, const MouseEvent&, rEvent, bool) + { + m_aMouseMoveHdl.Call(rEvent); + return false; + } + void EditControlBase::dispose() { m_pEntry = nullptr; @@ -640,6 +670,9 @@ namespace svt m_xWidget->connect_key_press(LINK(this, ControlBase, KeyInputHdl)); m_xWidget->connect_focus_in(LINK(this, ControlBase, FocusInHdl)); m_xWidget->connect_focus_out(LINK(this, ControlBase, FocusOutHdl)); + m_xWidget->connect_mouse_press(LINK(this, ControlBase, MousePressHdl)); + m_xWidget->connect_mouse_release(LINK(this, ControlBase, MouseReleaseHdl)); + m_xWidget->connect_mouse_move(LINK(this, ControlBase, MouseMoveHdl)); // so any the natural size doesn't have an effect m_xWidget->set_size_request(1, 1); } |