sw/source/core/text/porfld.cxx  |    5 +++++
 sw/source/core/text/xmldump.cxx |    5 +++++
 2 files changed, 10 insertions(+)

New commits:
commit de235fe13a2e5a4db043f44e6d5636e308f2b979
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Dec 19 14:10:18 2022 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Dec 19 18:32:09 2022 +0000

    sw layout xml dump: show numbering portion weight
    
    Similar to font size & font color.
    
    Change-Id: I0987c50235dc317dd4b778a5b9946a0415558eeb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144502
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 5b266b3308e6..a13781baadf4 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -481,6 +481,11 @@ void SwFieldPortion::dumpAsXml(xmlTextWriterPtr pWriter, 
const OUString& rText,
         (void)xmlTextWriterWriteFormatAttribute(pWriter, 
BAD_CAST("font-color"), "%08" SAL_PRIxUINT32, sal_uInt32(m_pFont->GetColor()));
         (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("font-height"), 
BAD_CAST(OString::number(m_pFont->GetSize(m_pFont->GetActual()).Height()).getStr()));
         (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("font-width"), 
BAD_CAST(OString::number(m_pFont->GetSize(m_pFont->GetActual()).Width()).getStr()));
+        {
+            std::stringstream ss;
+            ss << m_pFont->GetWeight();
+            (void)xmlTextWriterWriteAttribute(pWriter, 
BAD_CAST("font-weight"), BAD_CAST(ss.str().c_str()));
+        }
     }
 
     (void)xmlTextWriterEndElement(pWriter);
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 569cbf1c2143..9e87d12c81d5 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -509,6 +509,11 @@ void SwFont::dumpAsXml(xmlTextWriterPtr writer) const
     (void)xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("ptr"), "%p", 
this);
     // do not use Color::AsRGBHexString() as that omits the transparency
     (void)xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("color"), "%08" 
SAL_PRIxUINT32, sal_uInt32(GetColor()));
+    {
+        std::stringstream ss;
+        ss << GetWeight();
+        (void)xmlTextWriterWriteAttribute(writer, BAD_CAST("weight"), 
BAD_CAST(ss.str().c_str()));
+    }
     (void)xmlTextWriterEndElement(writer);
 }
 

Reply via email to