cui/source/dialogs/cuifmsearch.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 5239375017489c8ffff8a7bbf6870db6085764fb Author: Simon Chenery <[email protected]> AuthorDate: Sat Jun 14 09:47:48 2025 +0200 Commit: Ilmari Lauhakangas <[email protected]> CommitDate: Mon Jun 23 15:14:59 2025 +0200 tdf#145614 Convert #define MAX_HISTORY_ENTRIES to constexpr Change-Id: I9b13c77688f81c01c8a5ad51f77aaec841654efc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186489 Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <[email protected]> diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index f90d51858e94..e995e3e8fc27 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -37,8 +37,6 @@ using namespace css::uno; using namespace ::svxform; using namespace css::sdbc; -#define MAX_HISTORY_ENTRIES 50 - void FmSearchDialog::initCommon( const Reference< XResultSet >& _rxCursor ) { // init the engine @@ -273,6 +271,7 @@ IMPL_LINK_NOARG(FmSearchDialog, OnClickedSearchAgain, weld::Button&, void) m_pcmbSearchText->insert_text(0, strThisRoundText); // the remove/insert makes sure that a) the OUString does not appear twice and // that b) the last searched strings are at the beginning and limit the list length + constexpr int MAX_HISTORY_ENTRIES = 50; while (m_pcmbSearchText->get_count() > MAX_HISTORY_ENTRIES) m_pcmbSearchText->remove(m_pcmbSearchText->get_count()-1);
