sc/source/ui/dialogs/searchresults.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
New commits: commit 4d5b3e99911acb3085dba5d66627b5737c885d85 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Wed Jan 15 11:05:22 2025 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Wed Jan 15 14:49:54 2025 +0100 tdf#164717: count all found cells in the dialog The number of list entries is already limited in ListWrapper::Insert; but it needs to count all the items to give a sensible output. Change-Id: I04bd4437977c88144c929af4b45fef119e8b2a97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180268 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index 3f37e26458fd..96821b58573d 100644 --- a/sc/source/ui/dialogs/searchresults.cxx +++ b/sc/source/ui/dialogs/searchresults.cxx @@ -102,14 +102,9 @@ void SearchResultsDlg::FillResults( ScDocument& rDoc, const ScRangeList &rMatche std::vector<OUString> aTabNames = rDoc.GetAllTableNames(); SCTAB nTabCount = aTabNames.size(); - // tdf#92160 - too many results blow the widget's mind - size_t nMatchMax = rMatchedRanges.size(); - if (nMatchMax > ListWrapper::mnMaximum) - nMatchMax = ListWrapper::mnMaximum; - if (bCellNotes || bEmptyCells) { - for (size_t i = 0, n = nMatchMax; i < n; ++i) + for (size_t i = 0, n = rMatchedRanges.size(); i < n; ++i) { ScRange const & rRange( rMatchedRanges[i] ); // Bear in mind that mostly the range is one address position @@ -144,7 +139,7 @@ void SearchResultsDlg::FillResults( ScDocument& rDoc, const ScRangeList &rMatche } else { - for (size_t i = 0, n = nMatchMax; i < n; ++i) + for (size_t i = 0, n = rMatchedRanges.size(); i < n; ++i) { ScCellIterator aIter(rDoc, rMatchedRanges[i]); for (bool bHas = aIter.first(); bHas; bHas = aIter.next())