summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2022-06-27 20:36:01 +0200
committerMiklos Vajna <vmiklos@collabora.com>2022-06-28 08:10:04 +0200
commit23f76e2fed8d77c888a5595d96520ec958cccda8 (patch)
tree891a84cc0eb00fc9552369312b06e6ed0257cdae
parentFix typos (diff)
downloadcore-23f76e2fed8d77c888a5595d96520ec958cccda8.tar.gz
core-23f76e2fed8d77c888a5595d96520ec958cccda8.zip
sw: document UndoManager
Expand on why we store SwNodes in the undo manager if they are not part of a document. Change-Id: Ibfb03c7bbffcf2e4fe90ec62e0523a6afe8250b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136514 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/source/core/inc/UndoManager.hxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/source/core/inc/UndoManager.hxx b/sw/source/core/inc/UndoManager.hxx
index 2db896f36db9..aa66acf3ad2d 100644
--- a/sw/source/core/inc/UndoManager.hxx
+++ b/sw/source/core/inc/UndoManager.hxx
@@ -33,6 +33,11 @@ class SwView;
namespace sw {
+/**
+ * Stores the undo/redo information, implementing the IDocumentUndoRedo interface.
+ * It contains a stack of SwUndo actions, each of which represents one user-visible
+ * undo / redo step.
+ */
class SW_DLLPUBLIC UndoManager final
: public IDocumentUndoRedo
, public SdrUndoManager
@@ -109,7 +114,7 @@ private:
IDocumentRedlineAccess & m_rRedlineAccess;
IDocumentState & m_rState;
- /// Undo nodes array: content not currently in document
+ /// Undo nodes array: content not currently in document, but required for undo/redo.
std::shared_ptr<SwNodes> m_xUndoNodes;
bool m_bGroupUndo : 1; // TRUE: Undo grouping enabled