diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-03-24 20:44:43 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-03-25 08:02:48 +0100 |
commit | 9fd5446c6f3281789ed21847f25cf56ce84dd395 (patch) | |
tree | 789f86513531f8df6dad614ff8abec9f89c383c7 /sw/source/core/text | |
parent | e8c95b796626cb9db163f5d563fa67f38a5e92b0 (diff) |
sw layout xml dump: handle hole portions
Show their blank width.
Change-Id: I8753c9ea4c861eae4618472f8ea24ea86576f251
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132089
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sw/source/core/text')
-rw-r--r-- | sw/source/core/text/portxt.cxx | 11 | ||||
-rw-r--r-- | sw/source/core/text/portxt.hxx | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 219036aa834d..112eb26328b8 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -792,6 +792,17 @@ void SwHolePortion::HandlePortion( SwPortionHandler& rPH ) const rPH.Text( GetLen(), GetWhichPor() ); } +void SwHolePortion::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwHolePortion")); + (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("blank-width"), + BAD_CAST(OString::number(m_nBlankWidth).getStr())); + + SwLinePortion::dumpAsXml(pWriter); + + (void)xmlTextWriterEndElement(pWriter); +} + void SwFieldMarkPortion::Paint( const SwTextPaintInfo & /*rInf*/) const { // These shouldn't be painted! diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx index ec44a2bafc76..297fca5e8525 100644 --- a/sw/source/core/text/portxt.hxx +++ b/sw/source/core/text/portxt.hxx @@ -73,6 +73,8 @@ public: // Accessibility: pass information about this portion to the PortionHandler virtual void HandlePortion( SwPortionHandler& rPH ) const override; + + void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; class SwFieldMarkPortion : public SwTextPortion |