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

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Apr 9 13:13:09 UTC 2017


 sc/inc/attrib.hxx              |    4 ++++
 sc/source/core/data/attrib.cxx |   22 ++++++++++++++++++++++
 2 files changed, 26 insertions(+)

New commits:
commit 6ae4e8b44f17502d59f4528f008e06d3550e310c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Sun Apr 9 03:48:22 2017 +0200

    add the merge flags to the item set dump
    
    Change-Id: I5f8b73d7f1c7904c230f43fa4e9c7f62dff89b50
    Reviewed-on: https://gerrit.libreoffice.org/36312
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/sc/inc/attrib.hxx b/sc/inc/attrib.hxx
index 414fdcdd3987..de789fb10dd7 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -76,6 +76,8 @@ public:
                 nRowMerge = rMerge.nRowMerge;
                 return *this;
             }
+
+    virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
 };
 
 class SC_DLLPUBLIC ScMergeFlagAttr: public SfxInt16Item
@@ -99,6 +101,8 @@ public:
 
     bool    HasPivotButton() const;
     bool    HasPivotPopupButton() const;
+
+    virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
 };
 
 class SC_DLLPUBLIC ScProtectionAttr: public SfxPoolItem
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 8f10dff22980..dbd9c2706ed2 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -137,6 +137,15 @@ SfxPoolItem* ScMergeAttr::Create( SvStream& rStream, sal_uInt16 /* nVer */ ) con
     return new ScMergeAttr(static_cast<SCCOL>(nCol),static_cast<SCROW>(nRow));
 }
 
+void ScMergeAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    xmlTextWriterStartElement(pWriter, BAD_CAST("ScMergeAttr"));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("col-merge"), BAD_CAST(OString::number(GetColMerge()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("row-merge"), BAD_CAST(OString::number(GetRowMerge()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("merged"), BAD_CAST(OString::boolean(IsMerged()).getStr()));
+    xmlTextWriterEndElement(pWriter);
+}
+
 /**
  * MergeFlag
  */
@@ -169,6 +178,19 @@ bool ScMergeFlagAttr::HasPivotPopupButton() const
     return bool(GetValue() & ScMF::ButtonPopup);
 }
 
+void ScMergeFlagAttr::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+    xmlTextWriterStartElement(pWriter, BAD_CAST("ScMergeFlagAttr"));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("overlapped"), BAD_CAST(OString::boolean(IsOverlapped()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("hor_overlapped"), BAD_CAST(OString::boolean(IsHorOverlapped()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("ver_overlapped"), BAD_CAST(OString::boolean(IsVerOverlapped()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("autofilter"), BAD_CAST(OString::boolean(HasAutoFilter()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("scenario"), BAD_CAST(OString::boolean(IsScenario()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("pivot-button"), BAD_CAST(OString::boolean(HasPivotButton()).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("pivot-popup-button"), BAD_CAST(OString::boolean(HasPivotPopupButton()).getStr()));
+    xmlTextWriterEndElement(pWriter);
+}
+
 /**
  * Protection
  */


More information about the Libreoffice-commits mailing list