diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-09 08:52:59 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2013-12-09 09:24:35 +0100 |
commit | 1a8afa24ffc1ba1e606617f263e1f8833ad4d0a9 (patch) | |
tree | e6caf6e56f3b6399987dac6cb1d7ea34d40d9a77 | |
parent | 476af21852660edf10442794e712a2433fa3bad4 (diff) |
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)
-rw-r--r-- | sc/source/ui/dialogs/searchresults.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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(); } |