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

Miklos Vajna vmiklos at collabora.co.uk
Thu Jan 15 00:05:55 PST 2015


 sw/inc/fmtclbl.hxx                  |    1 +
 sw/source/core/docnode/nodedump.cxx |    7 ++++---
 sw/source/core/layout/atrfrm.cxx    |    8 ++++++++
 3 files changed, 13 insertions(+), 3 deletions(-)

New commits:
commit 107bae41a8b78e6da563c20aa4e9a62050c74f19
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jan 15 09:04:44 2015 +0100

    Factor out SwFmtNoBalancedColumns::dumpAsXml() from docnode
    
    Change-Id: I22f500cb6b62ac4ed7158bc68fa76f84173bc86d

diff --git a/sw/inc/fmtclbl.hxx b/sw/inc/fmtclbl.hxx
index f6eb91e..ffdf309 100644
--- a/sw/inc/fmtclbl.hxx
+++ b/sw/inc/fmtclbl.hxx
@@ -33,6 +33,7 @@ public:
 
     /// "pure virtual methods" of SfxPoolItem
     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = 0 ) const SAL_OVERRIDE;
+    void dumpAsXml(struct _xmlTextWriter* pWriter) const;
 };
 
 inline const SwFmtNoBalancedColumns &SwAttrSet::GetBalancedColumns(bool bInP) const
diff --git a/sw/source/core/docnode/nodedump.cxx b/sw/source/core/docnode/nodedump.cxx
index 381689d..55490ee 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 "fmtclbl.hxx"
 #include "fmteiro.hxx"
 #include "charfmt.hxx"
 #include "frmfmt.hxx"
@@ -486,6 +487,9 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
             case RES_EDIT_IN_READONLY:
                 static_cast<const SwFmtEditInReadonly*>(pItem)->dumpAsXml(writer);
                 break;
+            case RES_COLUMNBALANCE:
+                static_cast<const SwFmtNoBalancedColumns*>(pItem)->dumpAsXml(writer);
+                break;
             default: bDone = false; break;
         }
         if (bDone)
@@ -500,9 +504,6 @@ void lcl_dumpSfxItemSet(WriterHelper& writer, const SfxItemSet* pSet)
         boost::optional<OString> oValue;
         switch (pItem->Which())
         {
-            case RES_COLUMNBALANCE:
-                pWhich = "column balance";
-                break;
             case RES_LR_SPACE:
                 pWhich = "left-right space";
                 break;
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index ec3c294..b7c7d6e 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -1912,6 +1912,14 @@ SfxPoolItem* SwFmtNoBalancedColumns::Clone( SfxItemPool* ) const
     return new SwFmtNoBalancedColumns( GetValue() );
 }
 
+void SwFmtNoBalancedColumns::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    xmlTextWriterStartElement(pWriter, BAD_CAST("swFmtNoBalancedColumns"));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OString::boolean(GetValue()).getStr()));
+    xmlTextWriterEndElement(pWriter);
+}
+
 // class SwFmtFtnEndAtTxtEnd
 
 sal_uInt16 SwFmtFtnEndAtTxtEnd::GetValueCount() const


More information about the Libreoffice-commits mailing list