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>
diff --git a/sw/source/core/inc/UndoManager.hxx b/sw/source/core/inc/UndoManager.hxx
index 2db896f..aa66acf 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