summaryrefslogtreecommitdiff
path: root/vcl/source/uitest/uiobject.cxx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2020-05-24 17:33:46 +0200
committerXisco Faulí <xiscofauli@libreoffice.org>2020-05-26 10:37:48 +0200
commitde623b59a981e3d6a43b410a9216ec0acadc9ed1 (patch)
tree11147516d1237b55be5aab04b73ba0deaff7d7c8 /vcl/source/uitest/uiobject.cxx
parent2d1f1a1c849fd4f2c7f1211f8d3f03aec069bd44 (diff)
tdf#131715: uitest: add wrapper for roadmapwizard
Change-Id: I8e8999b7862ad13cb6d3328e05abe120da3ed5c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94759 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
Diffstat (limited to 'vcl/source/uitest/uiobject.cxx')
-rw-r--r--vcl/source/uitest/uiobject.cxx46
1 files changed, 46 insertions, 0 deletions
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 22496e2375a0..5fb0a5c0174e 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -27,6 +27,7 @@
#include <vcl/edit.hxx>
#include <vcl/vclmedit.hxx>
#include <vcl/uitest/logger.hxx>
+#include <uiobject-internal.hxx>
#include <comphelper/string.hxx>
#include <comphelper/lok.hxx>
@@ -1455,6 +1456,51 @@ std::unique_ptr<UIObject> TabControlUIObject::create(vcl::Window* pWindow)
return std::unique_ptr<UIObject>(new TabControlUIObject(pTabControl));
}
+RoadmapWizardUIObject::RoadmapWizardUIObject(const VclPtr<vcl::RoadmapWizard>& xRoadmapWizard):
+ WindowUIObject(xRoadmapWizard),
+ mxRoadmapWizard(xRoadmapWizard)
+{
+}
+
+RoadmapWizardUIObject::~RoadmapWizardUIObject()
+{
+}
+void RoadmapWizardUIObject::execute(const OUString& rAction,
+ const StringMap& rParameters)
+{
+ if (rAction == "SELECT")
+ {
+ if (rParameters.find("POS") != rParameters.end())
+ {
+ auto itr = rParameters.find("POS");
+ sal_uInt32 nPos = itr->second.toUInt32();
+ mxRoadmapWizard->SelectRoadmapItemByID(nPos);
+ }
+ }
+ else
+ WindowUIObject::execute(rAction, rParameters);
+}
+
+StringMap RoadmapWizardUIObject::get_state()
+{
+ StringMap aMap = WindowUIObject::get_state();
+
+ aMap["CurrentStep"] = OUString::number(mxRoadmapWizard->GetCurrentRoadmapItemID());
+
+ return aMap;
+}
+
+OUString RoadmapWizardUIObject::get_name() const
+{
+ return "RoadmapWizardUIObject";
+}
+
+std::unique_ptr<UIObject> RoadmapWizardUIObject::create(vcl::Window* pWindow)
+{
+ vcl::RoadmapWizard* pRoadmapWizard = dynamic_cast<vcl::RoadmapWizard*>(pWindow);
+ assert(pRoadmapWizard);
+ return std::unique_ptr<UIObject>(new RoadmapWizardUIObject(pRoadmapWizard));
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */