[Libreoffice-commits] core.git: sc/inc sc/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Mon Sep 26 00:35:12 UTC 2016
sc/inc/attrib.hxx | 2 ++
sc/source/core/data/attrib.cxx | 14 ++++++++++++++
2 files changed, 16 insertions(+)
New commits:
commit fc742749b63e0b22161c99bd2450fcede64ff4b3
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Sun Sep 25 00:52:06 2016 +0200
tdf97667, add dumpAsXml for the conditional format data
Change-Id: I2f78be8588ed75e1e1e569af01190dad720ff442
Reviewed-on: https://gerrit.libreoffice.org/29258
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 b4dc160..8247b19 100644
--- a/sc/inc/attrib.hxx
+++ b/sc/inc/attrib.hxx
@@ -357,6 +357,8 @@ public:
void AddCondFormatData( sal_uInt32 nIndex );
void SetCondFormatData( const std::vector<sal_uInt32>& aIndex );
+ virtual void dumpAsXml(struct _xmlTextWriter* pWriter) const override;
+
private:
std::vector<sal_uInt32> maIndex;
};
diff --git a/sc/source/core/data/attrib.cxx b/sc/source/core/data/attrib.cxx
index 3b8a19c..b32024a 100644
--- a/sc/source/core/data/attrib.cxx
+++ b/sc/source/core/data/attrib.cxx
@@ -31,6 +31,8 @@
#include <editeng/editobj.hxx>
#include <editeng/flditem.hxx>
+#include <libxml/xmlwriter.h>
+
#include "attrib.hxx"
#include "global.hxx"
#include "editutil.hxx"
@@ -1078,4 +1080,16 @@ void ScCondFormatItem::SetCondFormatData( const std::vector<sal_uInt32>& rIndex
maIndex = rIndex;
}
+void ScCondFormatItem::dumpAsXml(xmlTextWriterPtr pWriter) const
+{
+ xmlTextWriterStartElement(pWriter, BAD_CAST("condFormatItem"));
+ for (const auto& nItem : maIndex)
+ {
+ std::string aStrVal = std::to_string(nItem);
+ xmlTextWriterStartElement(pWriter, BAD_CAST(aStrVal.c_str()));
+ xmlTextWriterEndElement(pWriter);
+ }
+ xmlTextWriterEndElement(pWriter);
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
More information about the Libreoffice-commits
mailing list