summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-09-25 10:19:10 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2019-09-30 09:46:06 +0200
commit7836d56a007030deb8cf1872f753a94bfeaaeb06 (patch)
tree22ae0fdac0820bda0081045e2ba32a6c74727df8
parenta6cd3f07572266e7cf25e16b611afded66297ec9 (diff)
jsdialogs: send listbox entries
Change-Id: I00b2260e2ceaffbfbe415633ef5a35c7d147b44a Reviewed-on: https://gerrit.libreoffice.org/79696 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--include/vcl/lstbox.hxx2
-rw-r--r--vcl/source/control/listbox.cxx17
2 files changed, 19 insertions, 0 deletions
diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx
index 115645b17ab8..f16c267b3607 100644
--- a/include/vcl/lstbox.hxx
+++ b/include/vcl/lstbox.hxx
@@ -277,6 +277,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 f3d9526e09d6..88f0a64c44d4 100644
--- a/vcl/source/control/listbox.cxx
+++ b/vcl/source/control/listbox.cxx
@@ -1445,6 +1445,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 )
{