diff options
author | Samuel Mehrbrodt <s.mehrbrodt@gmail.com> | 2014-08-25 20:43:29 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <s.mehrbrodt@gmail.com> | 2014-09-21 12:50:02 +0000 |
commit | fa857d0beb8b7f800131d9f4ef3cfa61d20d39f7 (patch) | |
tree | 4621597513943c6f1b41d3cff173a62e026c2f25 /svx | |
parent | 44a432e9073b3d39b1bdd34b65cfd91d5541f324 (diff) |
fdo#82502 Ctrl-F should select the text in the search bar, not close it
Change-Id: Ica9851e66e8d8f32b8e353c0b2e541c7ce7d45e3
Reviewed-on: https://gerrit.libreoffice.org/11110
Reviewed-by: Thomas Arnhold <thomas@arnhold.org>
Tested-by: Thomas Arnhold <thomas@arnhold.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Tested-by: Samuel Mehrbrodt <s.mehrbrodt@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbunosearchcontrollers.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index f21155cf14e5..6bb512c0aedd 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -197,7 +197,8 @@ bool FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) bool bMod1 = pKeyEvent->GetKeyCode().IsMod1(); sal_uInt16 nCode = pKeyEvent->GetKeyCode().GetCode(); - if ( KEY_ESCAPE == nCode || (bMod1 && (KEY_F == nCode)) ) + // Close the search bar on Escape + if ( KEY_ESCAPE == nCode ) { nRet = true; GrabFocusToDocument(); @@ -217,7 +218,11 @@ bool FindTextFieldControl::PreNotify( NotifyEvent& rNEvt ) } } } + // Select text in the search box when Ctrl-F pressed + if ( bMod1 && nCode == KEY_F ) + SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) ); + // Execute the search when Enter, Ctrl-G or F3 pressed if ( KEY_RETURN == nCode || (bMod1 && (KEY_G == nCode)) || (KEY_F3 == nCode) ) { Remember_Impl(GetText()); |