diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2021-09-14 19:57:02 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2021-09-15 08:06:37 +0200 |
commit | e8298918ae4a71e1a00f5efc10d9e72bb34deac6 (patch) | |
tree | 29a6c625e1fa31f3b0a96a1c7ee85361213bad6a /sw/source | |
parent | 72079bb39b7460a6aff739043e3d7f00a572847d (diff) |
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 <vmiklos@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/text/porlay.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/text/porlay.hxx | 4 |
2 files changed, 17 insertions, 1 deletions
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() |