sw/source/core/inc/frame.hxx    |    1 +
 sw/source/core/text/xmldump.cxx |   11 +++++++++++
 2 files changed, 12 insertions(+)

New commits:
commit 153176e342927b192907343559b48293790672a2
Author: Manfred Blume <manfred.bl...@cib.de>
Date:   Fri Oct 27 06:41:48 2017 +0200

    sw: add debug helper to dump topmost SwFrame
    
    Change-Id: Iad239da91a995235997c4986a755640721550abd
    Reviewed-on: https://gerrit.libreoffice.org/43925
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Thorsten Behrens <thorsten.behr...@cib.de>

diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index 379bf08f829a..f576b59b4232 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -890,6 +890,7 @@ public:
 public:
     // if writer is NULL, dumps the layout structure as XML in layout.xml
     virtual void dumpAsXml(xmlTextWriterPtr writer = nullptr) const;
+    virtual void dumpTopMostAsXml(xmlTextWriterPtr writer = nullptr) const;
     void dumpInfosAsXml(xmlTextWriterPtr writer) const;
     virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const;
     void dumpChildrenAsXml(xmlTextWriterPtr writer) const;
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 3d08e365df2d..484f52405dd3 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -227,6 +227,17 @@ namespace
     }
 }
 
+void SwFrame::dumpTopMostAsXml(xmlTextWriterPtr writer) const
+{
+    const SwFrame* pFrame = this;
+    while (pFrame->GetUpper())
+    {
+        pFrame = pFrame->GetUpper();
+    }
+
+    pFrame->dumpAsXml(writer);
+}
+
 void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const
 {
     bool bCreateWriter = ( nullptr == writer );
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to