[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sc/source
LuboÅ¡ LuÅák (via logerrit)
logerrit at kemper.freedesktop.org
Wed Feb 24 08:47:10 UTC 2021
sc/source/core/data/column3.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit cbfc211c50daef5b9b477d0731d48982898d40b7
Author: Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue Feb 23 13:54:10 2021 +0100
Commit: Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Wed Feb 24 09:46:35 2021 +0100
delete from mdds in reverse order (tdf#139820)
This is a more elegant solution from Noel, compared to my previous
commit. Deleting in reverse order means the underlying std::vector
used by mdds does not have possible to-be-deleted items to move
around that forward order would have.
Change-Id: I31f0774e302308bcb70595cb899c977ee5966c7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111395
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak at collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli at libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111438
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index f1a621a985b5..69213b7fedbc 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -979,7 +979,8 @@ void ScColumn::DeleteCells(
aFunc.getSpans().getSpans(aSpans);
// Delete the cells for real.
- std::for_each(aSpans.begin(), aSpans.end(), EmptyCells(rBlockPos, *this));
+ // tdf#139820: Deleting in reverse order is more efficient.
+ std::for_each(aSpans.rbegin(), aSpans.rend(), EmptyCells(rBlockPos, *this));
CellStorageModified();
aFunc.getSpans().swap(rDeleted);
More information about the Libreoffice-commits
mailing list