sw/source/core/text/porglue.cxx |   13 +++++++++++++
 sw/source/core/text/porglue.hxx |    2 ++
 2 files changed, 15 insertions(+)

New commits:
commit 771be31ed767f0441293f24b82d55bc6a6df9ae7
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Dec 20 20:05:51 2021 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Dec 21 08:29:50 2021 +0100

    sw layout xml dump: handle SwFixPortions
    
    Shows the horizontal offset of tab portions (not only their width).
    
    Change-Id: I87a6b44b7b06bb78b4a52985032ffb5033b5ea53
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127194
    Tested-by: Jenkins
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/core/text/porglue.cxx b/sw/source/core/text/porglue.cxx
index e1de29a68134..267ac824d240 100644
--- a/sw/source/core/text/porglue.cxx
+++ b/sw/source/core/text/porglue.cxx
@@ -156,6 +156,19 @@ SwFixPortion::SwFixPortion()
     SetWhichPor( PortionType::Fix );
 }
 
+void SwFixPortion::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SwFixPortion"));
+    SwGluePortion::dumpAsXml(pWriter);
+
+    (void)xmlTextWriterStartElement(pWriter, BAD_CAST("fix"));
+    (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"),
+                                      
BAD_CAST(OString::number(m_nFix).getStr()));
+    (void)xmlTextWriterEndElement(pWriter);
+
+    (void)xmlTextWriterEndElement(pWriter);
+}
+
 SwMarginPortion::SwMarginPortion()
     :SwGluePortion( 0 )
 {
diff --git a/sw/source/core/text/porglue.hxx b/sw/source/core/text/porglue.hxx
index 9ece0e3d420b..e6924659f435 100644
--- a/sw/source/core/text/porglue.hxx
+++ b/sw/source/core/text/porglue.hxx
@@ -56,6 +56,8 @@ public:
     SwFixPortion();
     void   SetFix( const sal_uInt16 nNewFix ) { m_nFix = nNewFix; }
     sal_uInt16 GetFix() const { return m_nFix; }
+
+    void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
 class SwMarginPortion : public SwGluePortion

Reply via email to