From 1a8afa24ffc1ba1e606617f263e1f8833ad4d0a9 Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Mon, 9 Dec 2013 08:52:59 +0100 Subject: fdo#72413: Fix O(n^2) in inserting SearchResults' items. Thanks to moggi, who pointed to this, should be documented somewhere. Change-Id: I96ba2cca930e4b784a825987ea19e4fc9aacb6d6 (cherry picked from commit dc22a2aa1b2858394ad70806f34d1327936af7a0) --- sc/source/ui/dialogs/searchresults.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sc/source/ui/dialogs/searchresults.cxx b/sc/source/ui/dialogs/searchresults.cxx index fa89eb7f5c41..f5cc4393c193 100644 --- a/sc/source/ui/dialogs/searchresults.cxx +++ b/sc/source/ui/dialogs/searchresults.cxx @@ -41,6 +41,7 @@ SearchResults::~SearchResults() void SearchResults::Show(const ScRangeList &rMatchedRanges) { mpList->Clear(); + mpList->SetUpdateMode(false); for (size_t i = 0, n = rMatchedRanges.size(); i < n; ++i) { ScCellIterator aIter(mpDoc, *rMatchedRanges[i]); @@ -53,6 +54,7 @@ void SearchResults::Show(const ScRangeList &rMatchedRanges) mpList->InsertEntry(sAddress.replace('.', '\t') + "\t" + mpDoc->GetString(aAddress)); } } + mpList->SetUpdateMode(true); ModelessDialog::Show(); } -- cgit v1.2.3