[Libreoffice-commits] core.git: Branch 'feature/jsdialogs' - include/vcl vcl/source

Szymon Kłos (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 25 08:20:06 UTC 2019


 include/vcl/lstbox.hxx         |    2 ++
 vcl/source/control/listbox.cxx |   17 +++++++++++++++++
 2 files changed, 19 insertions(+)

New commits:
commit 2a832be08c429b467a28c95bcf7fc8990629a084
Author:     Szymon Kłos <szymon.klos at collabora.com>
AuthorDate: Wed Sep 25 10:19:10 2019 +0200
Commit:     Szymon Kłos <szymon.klos at collabora.com>
CommitDate: Wed Sep 25 10:19:10 2019 +0200

    jsdialogs: send listbox entries
    
    Change-Id: I00b2260e2ceaffbfbe415633ef5a35c7d147b44a

diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 4e6130a7dd18..9ecf470b7c6e 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -282,6 +282,8 @@ public:
     static sal_Int32 NaturalSortCompare(const OUString &rA, const OUString &rB);
 
     virtual FactoryFunction GetUITestFactory() const override;
+
+    virtual boost::property_tree::ptree DumpAsPropertyTree() override;
 };
 
 class VCL_DLLPUBLIC MultiListBox : public ListBox
diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx
index cafebbdb4cb8..375bf9def4cb 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -1437,6 +1437,23 @@ FactoryFunction ListBox::GetUITestFactory() const
     return ListBoxUIObject::create;
 }
 
+boost::property_tree::ptree ListBox::DumpAsPropertyTree()
+{
+    boost::property_tree::ptree aTree(Control::DumpAsPropertyTree());
+    boost::property_tree::ptree aEntries;
+
+    for (int i = 0; i < GetEntryCount(); ++i)
+    {
+        boost::property_tree::ptree aEntry;
+        aEntry.put("", GetEntry(i));
+        aEntries.push_back(std::make_pair("", aEntry));
+    }
+
+    aTree.add_child("entries", aEntries);
+
+    return aTree;
+}
+
 MultiListBox::MultiListBox( vcl::Window* pParent, WinBits nStyle ) :
     ListBox( WindowType::MULTILISTBOX )
 {


More information about the Libreoffice-commits mailing list