summaryrefslogtreecommitdiff
path: root/sw/source/core/inc
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-06-23 12:12:19 +0200
committerMiklos Vajna <vmiklos@collabora.com>2020-06-23 14:10:21 +0200
commit10129e2dfc582915d999e24deed34f7303a6f02e (patch)
tree9c552750f5ce489fdb3245deaab0a3a0892cac7d /sw/source/core/inc
parent84881e32317765e7752d57fceac8d979dd801b8c (diff)
sw doc model xml dump: improve undo-redo coverage:
- show the undo manager's node array - show SwUndoDelete - show SwUndoSaveContent - show SwHistory - show SwHistoryHint - show SwHistoryTextFlyCnt - show SwUndoFlyBase - show SwHistorySetFormat - show SwUndoInserts When an action + undo pair goes wrong, it's easier to see the state of the undo stack after the action this way, then decide if the undo stack is already bad, or the problem is with the undo implementation. Change-Id: Ic509a233dce3c47db9697982eb7ea423f4706129 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96930 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/inc')
-rw-r--r--sw/source/core/inc/UndoDelete.hxx2
-rw-r--r--sw/source/core/inc/UndoManager.hxx1
-rw-r--r--sw/source/core/inc/rolbck.hxx6
3 files changed, 9 insertions, 0 deletions
diff --git a/sw/source/core/inc/UndoDelete.hxx b/sw/source/core/inc/UndoDelete.hxx
index ce38a4d99e03..6e38201f3443 100644
--- a/sw/source/core/inc/UndoDelete.hxx
+++ b/sw/source/core/inc/UndoDelete.hxx
@@ -27,6 +27,7 @@
class SwRedlineSaveDatas;
class SwTextNode;
+typedef struct _xmlTextWriter* xmlTextWriterPtr;
namespace sfx2 {
class MetadatableUndo;
@@ -101,6 +102,7 @@ public:
bool IsDelFullPara() const { return m_bDelFullPara; }
void DisableMakeFrames() { m_bDisableMakeFrames = true; };
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
#endif // INCLUDED_SW_SOURCE_CORE_INC_UNDODELETE_HXX
diff --git a/sw/source/core/inc/UndoManager.hxx b/sw/source/core/inc/UndoManager.hxx
index fda9c734a7e6..4113d54d8f52 100644
--- a/sw/source/core/inc/UndoManager.hxx
+++ b/sw/source/core/inc/UndoManager.hxx
@@ -86,6 +86,7 @@ public:
bool bTryMerg = false) override;
virtual bool Undo() override;
virtual bool Redo() override;
+ void dumpAsXml(xmlTextWriterPtr pWriter) const;
SwUndo * RemoveLastUndo();
SwUndo * GetLastUndo();
diff --git a/sw/source/core/inc/rolbck.hxx b/sw/source/core/inc/rolbck.hxx
index 1882a68d1d0e..96a8eb58b7d9 100644
--- a/sw/source/core/inc/rolbck.hxx
+++ b/sw/source/core/inc/rolbck.hxx
@@ -54,6 +54,7 @@ class SwFormatChain;
class SwNode;
class SwCharFormat;
enum class SwFieldIds : sal_uInt16;
+typedef struct _xmlTextWriter* xmlTextWriterPtr;
enum HISTORY_HINT {
HSTRY_SETFMTHNT,
@@ -85,6 +86,7 @@ public:
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) = 0;
HISTORY_HINT Which() const { return m_eWhichId; }
virtual OUString GetDescription() const;
+ virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
};
class SwHistorySetFormat : public SwHistoryHint
@@ -98,6 +100,7 @@ public:
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override;
virtual OUString GetDescription() const override;
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
class SwHistoryResetFormat : public SwHistoryHint
@@ -234,6 +237,7 @@ public:
virtual void SetInDoc( SwDoc* pDoc, bool bTmpSet ) override;
SwUndoDelLayFormat* GetUDelLFormat() { return m_pUndo.get(); }
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
class SwHistoryBookmark : public SwHistoryHint
@@ -400,6 +404,8 @@ public:
const bool bCopyFields );
void CopyFormatAttr( const SfxItemSet& rSet, sal_uLong nNodeIdx );
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const;
};
class SwRegHistory : public SwClient