sw layout xml dump: show SwMultiPortion
This helped fixing tdf#144305.
Change-Id: I736f12b06a69a1c11a55487dc1a3eec976250dcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122207
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 468f80b..7048162 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -134,6 +134,20 @@ void SwMultiPortion::HandlePortion( SwPortionHandler& rPH ) const
rPH.Text( GetLen(), GetWhichPor() );
}
void SwMultiPortion::dumpAsXml(xmlTextWriterPtr pWriter) const
{
(void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwMultiPortion"));
(void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this);
(void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("symbol"), BAD_CAST(typeid(*this).name()));
for (const SwLineLayout* pLine = &GetRoot(); pLine; pLine = pLine->GetNext())
{
pLine->dumpAsXml(pWriter);
}
(void)xmlTextWriterEndElement(pWriter);
}
// sets the tabulator-flag, if there's any tabulator-portion inside.
void SwMultiPortion::ActualizeTabulator()
{
diff --git a/sw/source/core/text/pormulti.hxx b/sw/source/core/text/pormulti.hxx
index c1df8b0..854e7d4 100644
--- a/sw/source/core/text/pormulti.hxx
+++ b/sw/source/core/text/pormulti.hxx
@@ -149,6 +149,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 SwDoubleLinePortion : public SwMultiPortion