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

Herbert Dürr hdu at apache.org
Thu Jul 11 01:21:07 PDT 2013


 cui/source/dialogs/cuifmsearch.cxx |    8 ++++++++
 cui/source/inc/cuifmsearch.hxx     |    1 +
 2 files changed, 9 insertions(+)

New commits:
commit f76173b517a17615241222f623e92f0f020dd2a8
Author: Herbert Dürr <hdu at apache.org>
Date:   Wed Jul 10 12:16:11 2013 +0000

    Resolves: #i122581# reestablish focus of the Record Search dialog...
    
    to the search combobox
    
    Patch by: Tsutomu Uchino <hanya.runo at gmail.com>
    
    (cherry picked from commit 704bca1331d902281c3029aba65d57baa89d3731)
    
    Change-Id: I5d454e164d2f33cebf5b5761ef3ce7ae1025c7c6
    
    Return zero value from non-void function to prevent compiler warnings.
    
    (cherry picked from commit 7986627ca418ec7c6fcaaa91367eda7f4b9aadaf)
    
    Change-Id: I5d065ac9fc4272c28ffd418ce2043e01d41a2e14

diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx
index a386b9c..a1c3e1f 100644
--- a/cui/source/dialogs/cuifmsearch.cxx
+++ b/cui/source/dialogs/cuifmsearch.cxx
@@ -245,6 +245,7 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni
 
     m_cmbSearchText.SetModifyHdl(LINK(this, FmSearchDialog, OnSearchTextModified));
     m_cmbSearchText.EnableAutocomplete(sal_False);
+    m_cmbSearchText.SetGetFocusHdl(LINK(this, FmSearchDialog, OnFocusGrabbed));
 
     m_cbUseFormat.SetToggleHdl(LINK(this, FmSearchDialog, OnCheckBoxToggled));
     m_cbBackwards.SetToggleHdl(LINK(this, FmSearchDialog, OnCheckBoxToggled));
@@ -437,6 +438,13 @@ IMPL_LINK_NOARG(FmSearchDialog, OnSearchTextModified)
 }
 
 //------------------------------------------------------------------------
+IMPL_LINK(FmSearchDialog, OnFocusGrabbed, ComboBox*, EMPTYARG)
+{
+    m_cmbSearchText.SetSelection( Selection( SELECTION_MIN, SELECTION_MAX ) );
+    return 0;
+}
+
+//------------------------------------------------------------------------
 IMPL_LINK(FmSearchDialog, OnPositionSelected, ListBox*, pBox)
 {
     (void) pBox; // avoid warning
diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx
index 3fcfa24..61c7386 100644
--- a/cui/source/inc/cuifmsearch.hxx
+++ b/cui/source/inc/cuifmsearch.hxx
@@ -172,6 +172,7 @@ private:
     DECL_LINK( OnPositionSelected, ListBox* );
     DECL_LINK( OnFieldSelected, ListBox* );
 
+    DECL_LINK( OnFocusGrabbed, ComboBox* );
     DECL_LINK( OnCheckBoxToggled, CheckBox* );
 
     DECL_LINK( OnContextSelection, ListBox* );


More information about the Libreoffice-commits mailing list