summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/authfld.hxx2
-rw-r--r--sw/source/core/fields/authfld.cxx23
2 files changed, 25 insertions, 0 deletions
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 6436a17bb5f0..55c095596845 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -183,6 +183,8 @@ public:
/// Returns the line matching the source's default row in the ToX.
OUString GetAuthority(const SwTextAttr* pTextAttr, const SwRootFrame* pLayout) const;
+
+ void dumpAsXml(xmlTextWriterPtr pWriter) const override;
};
inline OUString const & SwAuthEntry::GetAuthorField(ToxAuthorityField ePos) const
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index 4728e48fd60b..8399ca3dc681 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -18,6 +18,9 @@
*/
#include <memory>
+
+#include <libxml/xmlwriter.h>
+
#include <comphelper/string.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/any.hxx>
@@ -602,6 +605,26 @@ OUString SwAuthorityField::GetAuthority(const SwTextAttr* pTextAttr,
return aText;
}
+void SwAuthorityField::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("SwAuthorityField"));
+ SwField::dumpAsXml(pWriter);
+
+ xmlTextWriterStartElement(pWriter, BAD_CAST("m_xAuthEntry"));
+ xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", m_xAuthEntry.get());
+ xmlTextWriterEndElement(pWriter);
+ xmlTextWriterStartElement(pWriter, BAD_CAST("m_nTempSequencePos"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"),
+ BAD_CAST(OString::number(m_nTempSequencePos).getStr()));
+ xmlTextWriterEndElement(pWriter);
+ xmlTextWriterStartElement(pWriter, BAD_CAST("m_nTempSequencePosRLHidden"));
+ xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"),
+ BAD_CAST(OString::number(m_nTempSequencePosRLHidden).getStr()));
+ xmlTextWriterEndElement(pWriter);
+
+ xmlTextWriterEndElement(pWriter);
+}
+
const char* const aFieldNames[] =
{
"Identifier",