sw/source/core/docnode/node.cxx |   10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

New commits:
commit 1599fd7398c17276bec06e51ba144d1e694e6657
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Fri Feb 16 08:19:58 2024 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri Feb 16 09:21:04 2024 +0100

    sw doc model xml dump: show the frame format of the table boxes
    
    Ideal would be to show the entire table box, we used to show
    pBox->GetFrameFormat()->GetAttrSet(). Improve this to at least show
    pBox->GetFrameFormat(), which exposes the name of the table box format,
    which should help debugging.
    
    Change-Id: Ifd024e6c0720ab20d0f89b50f0d1472cd5762a40
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163473
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx
index 8338fd001f52..0acdc1db91c3 100644
--- a/sw/source/core/docnode/node.cxx
+++ b/sw/source/core/docnode/node.cxx
@@ -1040,11 +1040,13 @@ void SwStartNode::dumpAsXml(xmlTextWriterPtr pWriter) 
const
     if (GetStartNodeType() == SwTableBoxStartNode)
     {
         if (SwTableBox* pBox = GetTableBox())
+        {
+            (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwTableBox"));
+            (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), 
"%p", pBox);
             (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("rowspan"), 
BAD_CAST(OString::number(pBox->getRowSpan()).getStr()));
-        (void)xmlTextWriterStartElement(pWriter, BAD_CAST("attrset"));
-        if (SwTableBox* pBox = GetTableBox())
-            pBox->GetFrameFormat()->GetAttrSet().dumpAsXml(pWriter);
-        (void)xmlTextWriterEndElement(pWriter);
+            pBox->GetFrameFormat()->dumpAsXml(pWriter);
+            (void)xmlTextWriterEndElement(pWriter);
+        }
     }
 
     // (void)xmlTextWriterEndElement(pWriter); - it is a start node, so don't 
end, will make xml better nested

Reply via email to