[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Jun 15 10:29:10 UTC 2017


 sw/source/core/inc/cellfrm.hxx   |    1 +
 sw/source/core/layout/tabfrm.cxx |   10 ++++++++++
 2 files changed, 11 insertions(+)

New commits:
commit 835c1586f60e6bc03e045e8210e38876e0fe1abc
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jun 15 11:08:48 2017 +0200

    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 <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx
index b70c54b54ede..541bbb872600 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 1de4d238e270..be7d97b0c35d 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -5100,6 +5100,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()
 {


More information about the Libreoffice-commits mailing list