sw/source/core/text/porglue.cxx | 12 ++++++++++++ sw/source/core/text/porglue.hxx | 2 ++ 2 files changed, 14 insertions(+)
New commits: commit 8963dbab857cf8a2f5ff8c75846a686f26303d72 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Dec 13 20:23:47 2021 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Dec 14 08:26:14 2021 +0100 sw layout xml dump: handle SwGluePortions E.g. tab portions. Change-Id: I6b30a379b2378f81a816011bcb8f27e2717a8876 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126746 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx index 7c09ded23a2f..e1de29a68134 100644 --- a/sw/source/core/text/porglue.cxx +++ b/sw/source/core/text/porglue.cxx @@ -128,6 +128,18 @@ void SwGluePortion::Join( SwGluePortion *pVictim ) delete pVictim; } +void SwGluePortion::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwGluePortion")); + SwLinePortion::dumpAsXml(pWriter); + + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("fix-width")); + (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::number(m_nFixWidth).getStr())); + (void)xmlTextWriterEndElement(pWriter); + + (void)xmlTextWriterEndElement(pWriter); +} + /** * We're expecting a frame-local SwRect! */ diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx index 05f72beb9fb3..9ece0e3d420b 100644 --- a/sw/source/core/text/porglue.hxx +++ b/sw/source/core/text/porglue.hxx @@ -44,6 +44,8 @@ public: virtual TextFrameIndex GetModelPositionForViewPoint(sal_uInt16 nOfst) const override; virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const override; virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) const override; + + void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; class SwFixPortion : public SwGluePortion