summaryrefslogtreecommitdiff
path: root/svtools/source/control/valueset.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/control/valueset.cxx')
-rw-r--r--svtools/source/control/valueset.cxx22
1 files changed, 22 insertions, 0 deletions
diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx
index 94c3cac34afd..494583799287 100644
--- a/svtools/source/control/valueset.cxx
+++ b/svtools/source/control/valueset.cxx
@@ -1433,6 +1433,28 @@ void ValueSet::DataChanged( const DataChangedEvent& rDataChangedEvent )
}
}
+boost::property_tree::ptree ValueSet::DumpAsPropertyTree()
+{
+ boost::property_tree::ptree aTree(Control::DumpAsPropertyTree());
+ boost::property_tree::ptree aEntries;
+
+ const size_t nSize = mItemList.size();
+
+ for ( size_t nIt = 0; nIt < nSize; ++nIt )
+ {
+ boost::property_tree::ptree aEntry;
+ ValueSetItem* pItem = mItemList[nIt].get();
+ aEntry.put("id", pItem->mnId);
+ aEntry.put("text", pItem->maText);
+ aEntry.put("image", pItem->maImage.GetStock());
+ aEntries.push_back(std::make_pair("", aEntry));
+ }
+
+ aTree.put("type", "valueset");
+ aTree.add_child("entries", aEntries);
+ return aTree;
+}
+
void ValueSet::Select()
{
maSelectHdl.Call( this );