summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorSaurav Chirania <saurav.chir@gmail.com>2018-07-13 01:13:11 +0530
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-07-31 00:35:42 +0200
commit7e65a0794b7c57210779bb9a6d1f2b2e49eb86e9 (patch)
treeb15fe5aa2c79b8c1f1cbba28b1be2acbde025ce0 /starmath
parent051399740e41c6495ed362e78c63e0868bcd180c (diff)
uitest logger: log more events
Logging for the following: 1) Object Selection 2) Sidebar / Deck opening 3) Parameters of UNO commands 4) Element Selection (Math) 5) Set Zoom (Impress) 6) Calc - a) Autofilter Launch b) Select Cell / Range of cells c) Switch table 7) Writer - a) Goto page b) Set Zoom Change-Id: Ifc7f603f62d10cfd1062923ded68203e574aebb6 Reviewed-on: https://gerrit.libreoffice.org/57368 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/ElementsDockingWindow.cxx22
1 files changed, 21 insertions, 1 deletions
diff --git a/starmath/source/ElementsDockingWindow.cxx b/starmath/source/ElementsDockingWindow.cxx
index f3ac0899627d..e973fb438175 100644
--- a/starmath/source/ElementsDockingWindow.cxx
+++ b/starmath/source/ElementsDockingWindow.cxx
@@ -36,6 +36,8 @@
#include <sfx2/sfxmodelfactory.hxx>
#include <vcl/help.hxx>
#include <vcl/settings.hxx>
+#include <vcl/uitest/logger.hxx>
+#include <vcl/uitest/eventdescription.hxx>
SmElement::SmElement(std::unique_ptr<SmNode>&& pNode, const OUString& aText, const OUString& aHelpText) :
mpNode(std::move(pNode)),
@@ -482,19 +484,37 @@ void SmElementsControl::MouseMove( const MouseEvent& rMouseEvent )
Control::MouseMove(rMouseEvent);
}
+namespace {
+
+void collectUIInformation(const OUString& aID)
+{
+ EventDescription aDescription;
+ aDescription.aID = aID;
+ aDescription.aParent = "element_selector";
+ aDescription.aAction = "SELECT";
+ aDescription.aKeyWord = "ElementUIObject";
+ UITestLogger::getInstance().logEvent(aDescription);
+}
+
+}
+
void SmElementsControl::MouseButtonDown(const MouseEvent& rMouseEvent)
{
GrabFocus();
if (rMouseEvent.IsLeft() && tools::Rectangle(Point(0, 0), GetOutputSizePixel()).IsInside(rMouseEvent.GetPosPixel()) && maSelectHdlLink.IsSet())
{
- for (std::unique_ptr<SmElement> & i : maElementList)
+ sal_uInt16 nElementCount = maElementList.size();
+
+ for (sal_uInt16 n = 0; n < nElementCount; n++)
{
+ std::unique_ptr<SmElement> & i = maElementList[n];
SmElement* element = i.get();
tools::Rectangle rect(element->mBoxLocation, element->mBoxSize);
if (rect.IsInside(rMouseEvent.GetPosPixel()))
{
maSelectHdlLink.Call(*element);
+ collectUIInformation(OUString::number(n));
return;
}
}