diff options
author | Herbert Dürr <hdu@apache.org> | 2013-07-10 12:16:11 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-07-11 09:20:45 +0100 |
commit | f76173b517a17615241222f623e92f0f020dd2a8 (patch) | |
tree | f2bd3063989f8c2b6a2f2113125645b705044783 /cui/source | |
parent | 5bb9b70a66d7818844abfaa297893c095e03d24c (diff) |
Resolves: #i122581# reestablish focus of the Record Search dialog...
to the search combobox
Patch by: Tsutomu Uchino <hanya.runo@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
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/dialogs/cuifmsearch.cxx | 8 | ||||
-rw-r--r-- | cui/source/inc/cuifmsearch.hxx | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index a386b9ccaf96..a1c3e1fd7b1b 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 3fcfa2464993..61c7386ae85c 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* ); |