From 871c9e19ef5c2286e1de9321c736541d3f93ceac Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 15 Jun 2017 11:08:48 +0200 Subject: Related: tdf#108524 sw: dump follow/precede of cell frames in layout xml dump These point to the other cell frame on the previous/next page (in case the cell frame is split across multiple pages). Change-Id: Ic03cf9a194a49320d84dbdb5176fa737e5d6520d Reviewed-on: https://gerrit.libreoffice.org/38818 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit 835c1586f60e6bc03e045e8210e38876e0fe1abc) --- sw/source/core/inc/cellfrm.hxx | 1 + sw/source/core/layout/tabfrm.cxx | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index 8ddc89ffd404..ba2ae774519d 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -60,6 +60,7 @@ public: const SwCellFrame& FindStartEndOfRowSpanCell( bool bStart ) const; long GetLayoutRowSpan() const; + void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override; DECL_FIXEDMEMPOOL_NEWDEL(SwCellFrame) }; diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index 138fa1a2ff95..2230a4920e14 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -5028,6 +5028,16 @@ long SwCellFrame::GetLayoutRowSpan() const return nRet; } +void SwCellFrame::dumpAsXmlAttributes(xmlTextWriterPtr pWriter) const +{ + SwFrame::dumpAsXmlAttributes(pWriter); + if (SwCellFrame* pFollow = GetFollowCell()) + xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("follow"), "%" SAL_PRIuUINT32, pFollow->GetFrameId()); + + if (SwCellFrame* pPrevious = GetPreviousCell()) + xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("precede"), "%" SAL_PRIuUINT32, pPrevious->GetFrameId()); +} + // #i103961# void SwCellFrame::Cut() { -- cgit