[Libreoffice-commits] core.git: vcl/source

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 1 15:24:13 UTC 2019


 vcl/source/control/listbox.cxx |   12 ++++++++++++
 1 file changed, 12 insertions(+)

New commits:
commit 44926b40089e00fc6c5e4e50ecbe53984e8265bb
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Sep 25 10:27:38 2019 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Tue Oct 1 17:23:23 2019 +0200

    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 at collabora.com>

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;
 }
 


More information about the Libreoffice-commits mailing list