[Libreoffice-commits] core.git: sw/inc sw/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Wed Oct 28 20:08:25 UTC 2020


 sw/inc/undobj.hxx               |    1 +
 sw/source/core/undo/undobj.cxx  |    5 +++++
 sw/source/core/undo/undobj1.cxx |    1 +
 3 files changed, 7 insertions(+)

New commits:
commit e8bd718d0aa4c96a8709c8c8df97d577c9e1add2
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Oct 28 17:48:06 2020 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Wed Oct 28 21:07:35 2020 +0100

    sw: add an xml dumper for SwUndoSaveSection
    
    With this, if I have an sw image in a draw+fly format combo and cut
    these, then all the 3 formats are visible in the undo xml dump.
    
    Change-Id: I2abc54ca8d4fb3b00b8da60bcb9dea5e07d20d4d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104970
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/inc/undobj.hxx b/sw/inc/undobj.hxx
index d89ff20a0b57..4eae5cddaf3f 100644
--- a/sw/inc/undobj.hxx
+++ b/sw/inc/undobj.hxx
@@ -219,6 +219,7 @@ public:
 
     const SwHistory* GetHistory() const { return m_pHistory.get(); }
           SwHistory* GetHistory()       { return m_pHistory.get(); }
+    virtual void dumpAsXml(xmlTextWriterPtr pWriter) const;
 };
 
 // This class saves the PaM as sal_uInt16's and is able to restore it
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 0ef36bd5f6e7..dcc49e905bf9 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -1308,6 +1308,11 @@ void SwUndoSaveSection::RestoreSection(
     }
 }
 
+void SwUndoSaveSection::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    SwUndoSaveContent::dumpAsXml(pWriter);
+}
+
 // save and set the RedlineData
 SwRedlineSaveData::SwRedlineSaveData(
     SwComparePosition eCmpPos,
diff --git a/sw/source/core/undo/undobj1.cxx b/sw/source/core/undo/undobj1.cxx
index 051161319a8c..7e9233759240 100644
--- a/sw/source/core/undo/undobj1.cxx
+++ b/sw/source/core/undo/undobj1.cxx
@@ -76,6 +76,7 @@ void SwUndoFlyBase::dumpAsXml(xmlTextWriterPtr pWriter) const
                                 BAD_CAST(OString::boolean(m_bDelFormat).getStr()));
 
     SwUndo::dumpAsXml(pWriter);
+    SwUndoSaveSection::dumpAsXml(pWriter);
 
     if (m_pFrameFormat)
     {


More information about the Libreoffice-commits mailing list