summaryrefslogtreecommitdiff
path: root/svl
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 /svl
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 'svl')
-rw-r--r--svl/source/undo/undo.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/svl/source/undo/undo.cxx b/svl/source/undo/undo.cxx
index 46c785557416..b678fba83948 100644
--- a/svl/source/undo/undo.cxx
+++ b/svl/source/undo/undo.cxx
@@ -1123,22 +1123,18 @@ bool SfxUndoManager::HasTopUndoActionMark( UndoStackMark const i_mark )
}
-void SfxUndoManager::RemoveOldestUndoActions(sal_Int32 nNumToDelete)
+void SfxUndoManager::RemoveOldestUndoAction()
{
UndoManagerGuard aGuard( *m_xData );
- if ( ImplIsInListAction_Lock() && ( m_xData->pUndoArray->nCurUndoAction == 1 ) )
+ if ( IsInListAction() && ( m_xData->pUndoArray->nCurUndoAction == 1 ) )
{
assert(!"SfxUndoManager::RemoveOldestUndoActions: cannot remove a not-yet-closed list action!");
return;
}
- while (nNumToDelete>0 && !m_xData->pUndoArray->maUndoActions.empty())
- {
- aGuard.markForDeletion( m_xData->pUndoArray->Remove( 0 ) );
- --m_xData->pUndoArray->nCurUndoAction;
- --nNumToDelete;
- }
+ aGuard.markForDeletion( m_xData->pUndoArray->Remove( 0 ) );
+ --m_xData->pUndoArray->nCurUndoAction;
ImplCheckEmptyActions();
}