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

Miklos Vajna vmiklos at collabora.co.uk
Wed Jan 14 00:06:25 PST 2015


 sw/inc/fmteiro.hxx                  |    1 +
 sw/source/core/docnode/nodedump.cxx |    7 ++++---
 sw/source/uibase/utlui/attrdesc.cxx |    8 ++++++++
 3 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 97260d8a011d2dba69df47433bb73a6da0317352
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Jan 14 09:05:18 2015 +0100

    Factor out SwFmtEditInReadonly::dumpAsXml() from sw core
    
    Change-Id: I0b0f5a7fca8c5cb4aefd355f79b5141ce9803a55

diff --git a/sw/inc/fmteiro.hxx b/sw/inc/fmteiro.hxx
index 4be9b7a..1d6e365 100644
--- a/sw/inc/fmteiro.hxx
+++ b/sw/inc/fmteiro.hxx
@@ -39,6 +39,7 @@ public:
                                     SfxMapUnit ePresMetric,
                                     OUString &rText,
                                     const IntlWrapper*    pIntl = 0 ) const SAL_OVERRIDE;
+    void dumpAsXml(struct _xmlTextWriter* pWriter) const;
 };
 
 inline const SwFmtEditInReadonly &SwAttrSet::GetEditInReadonly(bool bInP) const
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 4f0e834..381689d 100644
--- a/sw/source/core/docnode/nodedump.cxx
+++ b/sw/source/core/docnode/nodedump.cxx
@@ -25,6 +25,7 @@
 #include "fmtcntnt.hxx"
 #include "fmtornt.hxx"
 #include "fmtfsize.hxx"
+#include "fmteiro.hxx"
 #include "charfmt.hxx"
 #include "frmfmt.hxx"
 #include "fmtanchr.hxx"
@@ -482,6 +483,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
             case RES_PROTECT:
                 static_cast<const SvxProtectItem*>(pItem)->dumpAsXml(writer);
                 break;
+            case RES_EDIT_IN_READONLY:
+                static_cast<const SwFmtEditInReadonly*>(pItem)->dumpAsXml(writer);
+                break;
             default: bDone = false; break;
         }
         if (bDone)
@@ -496,9 +500,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
         boost::optional<OString> oValue;
         switch (pItem->Which())
         {
-            case RES_EDIT_IN_READONLY:
-                pWhich = "edit in read-only";
-                break;
             case RES_COLUMNBALANCE:
                 pWhich = "column balance";
                 break;
diff --git a/sw/source/uibase/utlui/attrdesc.cxx b/sw/source/uibase/utlui/attrdesc.cxx
index 26ca490..67479eb 100644
--- a/sw/source/uibase/utlui/attrdesc.cxx
+++ b/sw/source/uibase/utlui/attrdesc.cxx
@@ -549,6 +549,14 @@ bool SwFmtEditInReadonly::GetPresentation
     return true;
 }
 
+void SwFmtEditInReadonly::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtEditInReadonly"));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr()));
+    xmlTextWriterEndElement(pWriter);
+}
+
 bool SwFmtLayoutSplit::GetPresentation
 (
     SfxItemPresentation /*ePres*/,


More information about the Libreoffice-commits mailing list