diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-02-29 17:03:31 +0600 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2024-03-14 13:21:47 +0100 |
commit | b049ee456f375c0ffb276e5be43cc90d8cd30baf (patch) | |
tree | 0325a732ac3e7e500be1d2a11f6537ef8198773d /include/svl | |
parent | 479893fa6fd82a7f96df63a6b89ed24c5e0a2866 (diff) |
cool#8443 let Insert Chart dialog to undo out of order on Cancel
Change-Id: I66d749362c9fb5f2c228f0f5d2c927cc0cf3f89f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164179
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include/svl')
-rw-r--r-- | include/svl/undo.hxx | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/include/svl/undo.hxx b/include/svl/undo.hxx index a7d1e4753712..eca3f4abd4a6 100644 --- a/include/svl/undo.hxx +++ b/include/svl/undo.hxx @@ -289,8 +289,11 @@ public: /** removes a mark given by its ID. After the call, the mark ID is invalid. + + @return the index at which the mark was removed, or std::numeric_limits<size_t>::max() + if failed */ - void RemoveMark( UndoStackMark const i_mark ); + size_t RemoveMark(UndoStackMark const i_mark); /** determines whether the top action on the Undo stack has a given mark */ @@ -306,6 +309,11 @@ protected: bool UndoWithContext( SfxUndoContext& i_context ); bool RedoWithContext( SfxUndoContext& i_context ); + // Undoes a specific mark on the undo stack, and removes it from the undo/redo stack, + // but only in case when the redo stack is empty. This is a dangerous operation, because + // it undoes out of order. + void UndoMark(UndoStackMark i_mark); + void ImplClearRedo_NoLock( bool const i_currentLevel ); /** clears all undo actions on the current level, plus all undo actions on superordinate levels, |