sw/source/core/text/porlay.cxx | 14 ++++++++++++++ sw/source/core/text/porlay.hxx | 4 +++- 2 files changed, 17 insertions(+), 1 deletion(-)
New commits: commit e8298918ae4a71e1a00f5efc10d9e72bb34deac6 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Tue Sep 14 19:57:02 2021 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Wed Sep 15 08:06:37 2021 +0200 sw layout xml dump: show SwParaPortion Towards showing details of multi-portions. Change-Id: I3afb84731ae716557279d6253347c57fada710af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122094 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 1af44ae369e3..eddab2b7ea00 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -747,6 +747,13 @@ void SwLineLayout::MaxAscentDescent( SwTwips& _orAscent, } } +void SwLineLayout::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwLineLayout")); + (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); + (void)xmlTextWriterEndElement(pWriter); +} + void SwLineLayout::ResetFlags() { m_bFormatAdj = m_bDummy = m_bEndHyph = m_bMidHyph = m_bFly @@ -2509,6 +2516,13 @@ void SwParaPortion::dumpAsXml(xmlTextWriterPtr pWriter) const { (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwParaPortion")); (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); + + SwLineLayout::dumpAsXml(pWriter); + for (const SwLineLayout* pLine = GetNext(); pLine; pLine = pLine->GetNext()) + { + pLine->dumpAsXml(pWriter); + } + (void)xmlTextWriterEndElement(pWriter); } diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index f7d775e23fed..3f2d1e478448 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -242,6 +242,8 @@ public: SwTwips& _orObjDescent, const SwLinePortion* _pDontConsiderPortion = nullptr, const bool _bNoFlyCntPorAndLinePor = false ) const; + + virtual void dumpAsXml(xmlTextWriterPtr pWriter) const; }; /// Collection of SwLineLayout instances, represents the paragraph text in Writer layout. @@ -324,7 +326,7 @@ public: const SwDropPortion *FindDropPortion() const; - void dumpAsXml(xmlTextWriterPtr pWriter) const; + void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; inline void SwParaPortion::ResetPreps()