diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-09-29 12:56:32 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2021-09-30 11:13:26 +0200 |
commit | a701a3837676cd8cf80e6b1c4a38fa5b5a9701d1 (patch) | |
tree | 38cb090db9ee6f05bc267212ff45200e6312fa3a | |
parent | 95a2e765469ed072c35cf487b0526c93993ce1c4 (diff) |
Resolves: tdf#144783 shift+RETURN not searching backwards
In gtk nothing is happening, in gen its searching forwards. Align
backends so that Activate is emitted only on a bare return in both and
then handle shift+RETURN explicitly for the search widget
Change-Id: I142002bbaf6b3aca83800a442096a4b1024fe097
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122748
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
(cherry picked from commit fdfa78e4c9f6087f38720c60373548f0a6481563)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122751
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r-- | svx/source/tbxctrls/tbunosearchcontrollers.cxx | 4 | ||||
-rw-r--r-- | vcl/source/control/edit.cxx | 4 |
2 files changed, 3 insertions, 5 deletions
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index eebb536d6c1b..4156e748456e 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -298,8 +298,8 @@ IMPL_LINK(FindTextFieldControl, KeyInputHdl, const KeyEvent&, rKeyEvent, bool) else if ( bMod1 && nCode == KEY_F ) m_xWidget->select_entry_region(0, -1); - // Execute the search when Ctrl-G or F3 pressed (in addition to ActivateHdl conditions) - else if ( (bMod1 && (KEY_G == nCode)) || (KEY_F3 == nCode) ) + // Execute the search when Ctrl-G, F3 and Shift-RETURN pressed (in addition to ActivateHdl condition which handles bare RETURN) + else if ( (bMod1 && KEY_G == nCode) || (bShift && KEY_RETURN == nCode) || (KEY_F3 == nCode) ) { ActivateFind(bShift); bRet = true; diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index f5bf3c47b427..f3fcf87ce751 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -1675,10 +1675,8 @@ bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) break; case KEY_RETURN: - if (maActivateHdl.IsSet()) - { + if (maActivateHdl.IsSet() && !rKEvt.GetKeyCode().GetModifier()) bDone = maActivateHdl.Call(*this); - } break; default: |