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>
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 219036a..112eb26 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 ec44a2b..297fca5 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