[Libreoffice-commits] core.git: svx/source

Samuel Mehrbrodt s.mehrbrodt at gmail.com
Sun Sep 21 05:50:35 PDT 2014


 svx/source/tbxctrls/tbunosearchcontrollers.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit fa857d0beb8b7f800131d9f4ef3cfa61d20d39f7
Author: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
Date:   Mon Aug 25 20:43:29 2014 +0200

    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 at arnhold.org>
    Tested-by: Thomas Arnhold <thomas at arnhold.org>
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Reviewed-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>
    Tested-by: Samuel Mehrbrodt <s.mehrbrodt at gmail.com>

diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index f21155c..6bb512c 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());


More information about the Libreoffice-commits mailing list