sw/source/core/txtnode/chrfmt.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit 2b7beea2872fd0b2c9bd1d838a0a82dafd546036
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Fri Jul 12 08:18:59 2024 +0200
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri Jul 12 09:26:06 2024 +0200

    sw doc model xml dump: show parent of char styles
    
    Similar to how SwTextFormatColl::dumpAsXml() does it for paragraphs.
    
    Change-Id: I23dd3da9ce60d5e11f93cec75c54254ada4e9244
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170392
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/txtnode/chrfmt.cxx 
b/sw/source/core/txtnode/chrfmt.cxx
index e22b6bab0421..78735a353716 100644
--- a/sw/source/core/txtnode/chrfmt.cxx
+++ b/sw/source/core/txtnode/chrfmt.cxx
@@ -30,6 +30,11 @@ void SwCharFormat::dumpAsXml(xmlTextWriterPtr pWriter) const
     (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("name"),
                                       BAD_CAST(GetName().toUtf8().getStr()));
 
+    if (SwFormat* pDerivedFrom = DerivedFrom())
+    {
+        (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("derived-from"),
+                                          
BAD_CAST(pDerivedFrom->GetName().toUtf8().getStr()));
+    }
     if (mpLinkedParaFormat)
     {
         (void)xmlTextWriterWriteAttribute(

Reply via email to