sw/inc/authfld.hxx | 2 ++ sw/source/core/fields/authfld.cxx | 23 +++++++++++++++++++++++ 2 files changed, 25 insertions(+)
New commits: commit c54667a285e803df6e097ba9b59d5bc2fb6adcf5 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Fri Feb 26 14:18:11 2021 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri Feb 26 21:27:38 2021 +0100 sw doc model xml dump: show SwAuthorityField Towards seeing the actual contents of these bibliography references. Change-Id: I9f7b623a551adf9fd3f3a5ba4e376676c891bc04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111630 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins 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", _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits