diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-09-25 10:27:38 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-10-01 17:23:23 +0200 |
commit | 44926b40089e00fc6c5e4e50ecbe53984e8265bb (patch) | |
tree | b176f49ef9287a4c7a6616e021a16c04a9a9331c /vcl | |
parent | 1d07ef46b64416943dbc89aaeccd8f8826b6f86b (diff) |
jsdialogs: send selection for listbox
Change-Id: Ie5e026da0a4ca95df8fe52a6bf7967dc93b3d869
Reviewed-on: https://gerrit.libreoffice.org/79805
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/control/listbox.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index e5bc3d53c429..d9bb1d98bfed 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -1451,6 +1451,18 @@ boost::property_tree::ptree ListBox::DumpAsPropertyTree() aTree.add_child("entries", aEntries); + boost::property_tree::ptree aSelected; + + for (int i = 0; i < GetSelectedEntryCount(); ++i) + { + boost::property_tree::ptree aEntry; + aEntry.put("", GetSelectedEntryPos(i)); + aSelected.push_back(std::make_pair("", aEntry)); + } + + aTree.put("selectedCount", GetSelectedEntryCount()); + aTree.add_child("selectedEntries", aSelected); + return aTree; } |