summaryrefslogtreecommitdiff
path: root/svtools
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-09-13 17:29:27 +0100
committerAndras Timar <andras.timar@collabora.com>2021-09-30 11:01:54 +0200
commitb9820a3d346e8d4b61452e10aa3504fb48d51ec5 (patch)
tree691cde36cf9a25628b5c52fcb61b8ecab803033c /svtools
parentb90b1ff750ac1e27e8d4570ad36e3afeb9096796 (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/+/122072 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'svtools')
-rw-r--r--svtools/source/brwbox/ebbcontrols.cxx33
1 files changed, 33 insertions, 0 deletions
diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx
index 3989f6d17c7c..e83911750ec5 100644
--- a/svtools/source/brwbox/ebbcontrols.cxx
+++ b/svtools/source/brwbox/ebbcontrols.cxx
@@ -33,6 +33,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()
@@ -120,6 +123,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()
@@ -190,6 +196,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));
}
@@ -343,6 +352,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)
@@ -367,6 +379,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;
@@ -641,6 +671,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);
}