[Libreoffice-commits] core.git: include/vcl vcl/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Tue Mar 21 21:31:08 UTC 2017
include/vcl/uitest/uiobject.hxx | 2 ++
vcl/source/uitest/uiobject.cxx | 11 +++++++++++
2 files changed, 13 insertions(+)
New commits:
commit caf208166c01519f090ee88b1ddff809ed199007
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Mar 21 19:40:00 2017 +0100
uitest: better support for listbox logging
Change-Id: Ibd2625ba40cafdb07a2fcb5b2cfdd0e5f9e72b94
Reviewed-on: https://gerrit.libreoffice.org/35516
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/include/vcl/uitest/uiobject.hxx b/include/vcl/uitest/uiobject.hxx
index 4641b999722c..2edec77ae109 100644
--- a/include/vcl/uitest/uiobject.hxx
+++ b/include/vcl/uitest/uiobject.hxx
@@ -272,6 +272,8 @@ public:
static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
+ virtual OUString get_action(VclEventId nEvent) const override;
+
protected:
virtual OUString get_name() const override;
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index f89ba6d0238b..561688861481 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -814,6 +814,17 @@ OUString ListBoxUIObject::get_name() const
return OUString("ListBoxUIObject");
}
+OUString ListBoxUIObject::get_action(VclEventId nEvent) const
+{
+ if (nEvent == VclEventId::ListboxSelect)
+ {
+ sal_Int32 nPos = mxListBox->GetSelectEntryPos();
+ return "Action on element: " + mxListBox->get_id() + " with action : SELECT and content {\"POS\": \"" + OUString::number(nPos) + "\"}";
+ }
+ else
+ return WindowUIObject::get_action(nEvent);
+}
+
std::unique_ptr<UIObject> ListBoxUIObject::create(vcl::Window* pWindow)
{
ListBox* pListBox = dynamic_cast<ListBox*>(pWindow);
More information about the Libreoffice-commits
mailing list