diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-28 10:50:32 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-28 13:10:29 +0100 |
commit | bf5499c600e78e6197f4852d6cbe91ba1e703dc1 (patch) | |
tree | c740ab0646727ad70d02d8f277534300856cfe2f /svl | |
parent | dc213f0f65eebff560555fbd4ed3ae168cd24499 (diff) |
jsdialog: dump Sfx_Int__Items to JSON
Change-Id: I6a1d2847251b90f86457b552e5354f5e179e1627
Reviewed-on: https://gerrit.libreoffice.org/83977
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/intitem.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/svl/source/items/intitem.cxx b/svl/source/items/intitem.cxx index f4016097637f..6bf9b2ef8300 100644 --- a/svl/source/items/intitem.cxx +++ b/svl/source/items/intitem.cxx @@ -107,6 +107,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 @@ -124,6 +131,13 @@ void SfxInt32Item::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterEndElement(pWriter); } +boost::property_tree::ptree SfxInt32Item::dumpAsJSON() const +{ + boost::property_tree::ptree aTree = SfxPoolItem::dumpAsJSON(); + aTree.put("state", GetValue()); + return aTree; +} + // class SfxUInt32Item @@ -141,6 +155,12 @@ void SfxUInt32Item::dumpAsXml(xmlTextWriterPtr pWriter) const xmlTextWriterEndElement(pWriter); } +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) |