diff options
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/inc/cellfrm.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 14 | ||||
-rw-r--r-- | sw/source/core/text/xmldump.cxx | 9 |
3 files changed, 16 insertions, 9 deletions
diff --git a/sw/source/core/inc/cellfrm.hxx b/sw/source/core/inc/cellfrm.hxx index 4fdbc707de6e..796cb1d3dfb3 100644 --- a/sw/source/core/inc/cellfrm.hxx +++ b/sw/source/core/inc/cellfrm.hxx @@ -69,6 +69,8 @@ public: std::vector<const SwCellFrame*> GetCoveredCells() const; void dumpAsXmlAttributes(xmlTextWriterPtr writer) const override; + + void dumpAsXml(xmlTextWriterPtr writer = nullptr) const override; }; #endif diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index c3ebfacb13f8..e35d5f693454 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -5900,6 +5900,20 @@ void SwCellFrame::dumpAsXmlAttributes(xmlTextWriterPtr pWriter) const (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("precede"), "%" SAL_PRIuUINT32, pPrevious->GetFrameId()); } +void SwCellFrame::dumpAsXml(xmlTextWriterPtr writer) const +{ + (void)xmlTextWriterStartElement(writer, reinterpret_cast<const xmlChar*>("cell")); + dumpAsXmlAttributes(writer); + (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "rowspan" ), "%ld", GetLayoutRowSpan() ); + + (void)xmlTextWriterStartElement(writer, BAD_CAST("infos")); + dumpInfosAsXml(writer); + (void)xmlTextWriterEndElement(writer); + dumpChildrenAsXml(writer); + + (void)xmlTextWriterEndElement(writer); +} + // #i103961# void SwCellFrame::Cut() { diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 4e1016522884..5c85d5c601fb 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -174,9 +174,6 @@ void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const switch ( GetType( ) ) { - case SwFrameType::Cell: - name = "cell"; - break; case SwFrameType::Txt: name = "txt"; break; @@ -212,12 +209,6 @@ void SwFrame::dumpAsXml( xmlTextWriterPtr writer ) const } } - if (IsCellFrame()) - { - SwCellFrame const* pCellFrame(static_cast<SwCellFrame const*>(this)); - (void)xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "rowspan" ), "%ld", pCellFrame->GetLayoutRowSpan() ); - } - (void)xmlTextWriterStartElement( writer, BAD_CAST( "infos" ) ); dumpInfosAsXml( writer ); (void)xmlTextWriterEndElement( writer ); |