summaryrefslogtreecommitdiff
path: root/vcl/source/uitest
diff options
context:
space:
mode:
authorSaurav Chirania <saurav.chir@gmail.com>2018-07-04 13:55:50 +0530
committerSaurav Chirania <saurav.chir@gmail.com>2018-07-06 19:44:40 +0200
commit09e8815066c133b6a53fd5bc2f3d3ab8ad6e4248 (patch)
tree17763596ab313bcc75bfc2b37f177ad228aceb62 /vcl/source/uitest
parent8801cf6fbe3959cb1485a06fb86a41cc05b28ac6 (diff)
uitest logger: log the events calling CallEventListeners()
Some events directly call CallEventListeners() instead of calling ImplCallEventListenersAndHandler. This patch thus moves logAction to CallEventListeners() Further, this patch adds logging for EditSelectionChanged which is broadcasted using CallEventListeners(). Change-Id: Ib15367688cdbcdb542f6139d270d8d463f214fde Reviewed-on: https://gerrit.libreoffice.org/56952 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'vcl/source/uitest')
-rw-r--r--vcl/source/uitest/uiobject.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index b098205470eb..5b72f2ab1945 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -684,6 +684,23 @@ StringMap EditUIObject::get_state()
return aMap;
}
+OUString EditUIObject::get_action(VclEventId nEvent) const
+{
+ if (nEvent == VclEventId::EditSelectionChanged)
+ {
+ const Selection& rSelection = mxEdit->GetSelection();
+ long nMin = rSelection.Min();
+ long nMax = rSelection.Max();
+ return this->get_type() + " Action:SELECT Id:" +
+ mxEdit->get_id() +
+ " Parent:" + get_top_parent(mxEdit)->get_id() +
+ " {\"FROM\": \"" + OUString::number(nMin) + "\", \"TO\": \"" +
+ OUString::number(nMax) + "\"}";
+ }
+ else
+ return WindowUIObject::get_action(nEvent);
+}
+
OUString EditUIObject::get_name() const
{
return OUString("EditUIObject");