summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/svl/intitem.hxx3
-rw-r--r--svl/source/items/intitem.cxx20
2 files changed, 23 insertions, 0 deletions
diff --git a/include/svl/intitem.hxx b/include/svl/intitem.hxx
index 8ecf53fadb08..c43add2013d7 100644
--- a/include/svl/intitem.hxx
+++ b/include/svl/intitem.hxx
@@ -90,6 +90,7 @@ public:
{ return new SfxUInt16Item(*this); }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+ virtual boost::property_tree::ptree dumpAsJSON() const override;
};
@@ -105,6 +106,7 @@ public:
{ return new SfxInt32Item(*this); }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+ virtual boost::property_tree::ptree dumpAsJSON() const override;
};
@@ -120,6 +122,7 @@ public:
{ return new SfxUInt32Item(*this); }
void dumpAsXml(xmlTextWriterPtr pWriter) const override;
+ virtual boost::property_tree::ptree dumpAsJSON() const override;
};
#endif // INCLUDED_SVL_INTITEM_HXX
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)