summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-11-28 10:50:32 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-11-28 13:10:27 +0100
commit84692f8d10ecb35e31f19613507626d7818f7a44 (patch)
tree1e8a9e870c5f716a649540844ec473d3fbc07914 /svl
parent00b473531b65aa5c10ea84aaedd05a35e6e50b25 (diff)
jsdialog: dump Sfx_Int__Items to JSON
Change-Id: I6a1d2847251b90f86457b552e5354f5e179e1627 Reviewed-on: https://gerrit.libreoffice.org/83975 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/items/intitem.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx
index 7a80264d3039..afa9923265ea 100644
--- a/svl/source/items/intitem.cxx
+++ b/svl/source/items/intitem.cxx
@@ -137,6 +137,13 @@ void SfxUInt16Item::dumpAsXml(xmlTextWriterPtr pWriter) const
xmlTextWriterEndElement(pWriter);
}
+boost::property_tree::ptree SfxUInt16Item::dumpAsJSON() const
+{
+ boost::property_tree::ptree aTree = SfxPoolItem::dumpAsJSON();
+ aTree.put("state", GetValue());
+ return aTree;
+}
+
// class SfxInt32Item
@@ -146,6 +153,13 @@ SfxPoolItem* SfxInt32Item::CreateDefault()
return new SfxInt32Item();
};
+boost::property_tree::ptree SfxInt32Item::dumpAsJSON() const
+{
+ boost::property_tree::ptree aTree = SfxPoolItem::dumpAsJSON();
+ aTree.put("state", GetValue());
+ return aTree;
+}
+
// class SfxUInt32Item
@@ -155,6 +169,12 @@ SfxPoolItem* SfxUInt32Item::CreateDefault()
return new SfxUInt32Item();
};
+boost::property_tree::ptree SfxUInt32Item::dumpAsJSON() const
+{
+ boost::property_tree::ptree aTree = SfxPoolItem::dumpAsJSON();
+ aTree.put("state", GetValue());
+ return aTree;
+}
SfxMetricItem::SfxMetricItem(sal_uInt16 which, sal_uInt32 nValue):
SfxInt32Item(which, nValue)