summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-10-01 16:46:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-01 20:54:53 +0200
commit0b3ff97d7d5a1e8471e494f4141165364203c192 (patch)
tree177fd90f60e1738ebb26f95f0a0974c8e668d09d /sw
parent695c2b5cba265a58232fbda23f8284fc320ce8b6 (diff)
tdf#136728: Revert "tdf#136238 speed up deleting large cross page table"
This reverts commit da5c289a9cae5d914937f235694fd5b0cb92547f. Change-Id: Ic6a77ec2cd3b502fb4e94159a0424340850590df Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103665 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/undo/docundo.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/undo/docundo.cxx b/sw/source/core/undo/docundo.cxx
index 8f870f347d6c..6e350836fc20 100644
--- a/sw/source/core/undo/docundo.cxx
+++ b/sw/source/core/undo/docundo.cxx
@@ -537,8 +537,10 @@ void UndoManager::AddUndoAction(std::unique_ptr<SfxUndoAction> pAction, bool bTr
}
// if the undo nodes array is too large, delete some actions
- if (UNDO_ACTION_LIMIT < GetUndoNodes().Count())
- RemoveOldestUndoActions(GetUndoNodes().Count() - UNDO_ACTION_LIMIT);
+ while (UNDO_ACTION_LIMIT < GetUndoNodes().Count())
+ {
+ RemoveOldestUndoAction();
+ }
}
namespace {