[Libreoffice-commits] core.git: sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Mar 11 18:29:17 UTC 2019


 sw/source/core/txtnode/txatbase.cxx |   18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

New commits:
commit 99f25bc344e931e66366e20664a23dc263fe3113
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Mar 11 16:11:03 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Mar 11 19:28:53 2019 +0100

    sw doc model xml dump: show text node's field hints
    
    Change-Id: I17927231da389ce54d2fb8ade0091c7e7033a808
    Reviewed-on: https://gerrit.libreoffice.org/69049
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/txtnode/txatbase.cxx b/sw/source/core/txtnode/txatbase.cxx
index 82015ad57df2..8497116f1d7f 100644
--- a/sw/source/core/txtnode/txatbase.cxx
+++ b/sw/source/core/txtnode/txatbase.cxx
@@ -122,6 +122,11 @@ void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
             pWhich = "meta";
             break;
         }
+    case RES_TXTATR_FIELD:
+        {
+            pWhich = "field";
+            break;
+        }
     default:
         break;
     }
@@ -129,8 +134,17 @@ void SwTextAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("which"), BAD_CAST(pWhich));
     if (oValue)
         xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(oValue->getStr()));
-    if (Which() == RES_TXTATR_AUTOFMT)
-        GetAutoFormat().dumpAsXml(pWriter);
+    switch (Which())
+    {
+        case RES_TXTATR_AUTOFMT:
+            GetAutoFormat().dumpAsXml(pWriter);
+            break;
+        case RES_TXTATR_FIELD:
+            GetFormatField().dumpAsXml(pWriter);
+            break;
+        default:
+            break;
+    }
 
     xmlTextWriterEndElement(pWriter);
 }


More information about the Libreoffice-commits mailing list