[Libreoffice-commits] core.git: sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Fri Sep 17 06:01:02 UTC 2021
sw/source/core/text/pormulti.cxx | 14 ++++++++++++++
sw/source/core/text/pormulti.hxx | 2 ++
2 files changed, 16 insertions(+)
New commits:
commit 70860345da26c5c0303e01f9d6fb93276b38aea1
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Thu Sep 16 20:09:39 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Sep 17 08:00:30 2021 +0200
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 at collabora.com>
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 468f80b2a373..70481628665c 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 c1df8b0400f2..854e7d41ce34 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
More information about the Libreoffice-commits
mailing list