| commit | 89afe2978500233dc7b58d39cc519ecb9c224e98 | [log] |
|---|---|---|
| author | Andreas Heinisch <andreas.heinisch@yahoo.de> | Wed Apr 26 19:40:34 2023 +0200 |
| committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | Thu Apr 27 11:12:52 2023 +0200 |
| tree | 42638d3c56727fe1a442052603a6ab9f931b10d3 | |
| parent | e4410284c9907c5c8938a4f54bdde22cf27bba56 [diff] |
tdf#154818 - Find bar: remember and reuse last search string If there exists no last search string in the view options and there exists a search history, preselect the last search item. Change-Id: Ic6056e02eaf6c0ee7e266e47ba961dff11e9f9da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151072 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index d43222f..1ae8a0b 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -268,9 +268,12 @@ void FindTextFieldControl::SetTextToSelected_Impl() { css::uno::Any aUserItem = aDlgOpt.GetUserItem("UserItem"); aUserItem >>= aString; // prepopulate with last search word (fdo#84256) m_xWidget->set_entry_text(aString); } else if (get_count() > 0) aString = m_xWidget->get_text(0); // prepopulate with last search word (fdo#84256) m_xWidget->set_entry_text(aString); } }