sw/inc/fmtflcnt.hxx | 2 ++ sw/source/core/txtnode/atrflyin.cxx | 12 ++++++++++++ sw/source/core/txtnode/txatbase.cxx | 3 +++ 3 files changed, 17 insertions(+)
New commits: commit 7bf26fa8c848a15dde1c7c6b94edbee759a523d1 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Nov 21 14:17:55 2022 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Nov 21 16:17:01 2022 +0100 sw doc model xml dump: show the frame format of as-char images Old: <SwTextAttr ptr="0x63e5db0" symbol="12SwTextFlyCnt" start="0" dont-expand="false" whichId="58" m_pAttr="0x63e57f0" which="fly content"/> New: <SwTextAttr ptr="0x5af3d70" symbol="12SwTextFlyCnt" start="0" dont-expand="false" whichId="58" m_pAttr="0x5a44ae0" which="fly content"> <SwFormatFlyCnt ptr="0x5a44ae0" text-attr="0x5af3d70" format="0x5af3bd0"> <SfxPoolItem whichId="58" typeName="14SwFormatFlyCnt"/> </SwFormatFlyCnt> </SwTextAttr> Change-Id: Ie4f50d5ee065af920ac21a416f854ef7c7234707 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143031 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/inc/fmtflcnt.hxx b/sw/inc/fmtflcnt.hxx index 882e1b328abc..21b8bf33b6f2 100644 --- a/sw/inc/fmtflcnt.hxx +++ b/sw/inc/fmtflcnt.hxx @@ -47,6 +47,8 @@ public: void SetFlyFormat( SwFrameFormat* pNew = nullptr ) { m_pFormat = pNew; } const SwTextFlyCnt *GetTextFlyCnt() const { return m_pTextAttr; } + + void dumpAsXml(xmlTextWriterPtr pWriter) const override; }; #endif diff --git a/sw/source/core/txtnode/atrflyin.cxx b/sw/source/core/txtnode/atrflyin.cxx index 8216c96805c4..c1f3225b5d22 100644 --- a/sw/source/core/txtnode/atrflyin.cxx +++ b/sw/source/core/txtnode/atrflyin.cxx @@ -56,6 +56,18 @@ SwFormatFlyCnt* SwFormatFlyCnt::Clone( SfxItemPool* ) const return new SwFormatFlyCnt( m_pFormat ); } +void SwFormatFlyCnt::dumpAsXml(xmlTextWriterPtr pWriter) const +{ + (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatFlyCnt")); + (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); + (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("text-attr"), "%p", m_pTextAttr); + (void)xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("format"), "%p", m_pFormat); + + SfxPoolItem::dumpAsXml(pWriter); + + (void)xmlTextWriterEndElement(pWriter); +} + SwTextFlyCnt::SwTextFlyCnt( SwFormatFlyCnt& rAttr, sal_Int32 nStartPos ) : SwTextAttr( rAttr, nStartPos ) { diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx index c846084a312e..05d05ce12e1c 100644 --- a/sw/source/core/txtnode/txatbase.cxx +++ b/sw/source/core/txtnode/txatbase.cxx @@ -170,6 +170,9 @@ void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const case RES_TXTATR_CONTENTCONTROL: GetContentControl().dumpAsXml(pWriter); break; + case RES_TXTATR_FLYCNT: + GetFlyCnt().dumpAsXml(pWriter); + break; default: SAL_WARN("sw.core", "Unhandled TXTATR"); break;