summaryrefslogtreecommitdiff
path: root/vcl/source/uitest
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-04-10 07:02:23 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2016-06-18 17:01:58 +0200
commit540a6554956bbee62b5f669d672d64e03a9d888c (patch)
treec0781d483843de3e60b28379d52a9c47331bd525 /vcl/source/uitest
parentbdcb8d2197cfb98b7d96d4c7d1dd840cebc02dfd (diff)
uitest: an enum is a bad idea for the type
Change-Id: I1efd59b2f664f0aa9be733466fa7c1057e92ef27
Diffstat (limited to 'vcl/source/uitest')
-rw-r--r--vcl/source/uitest/uiobject.cxx53
1 files changed, 4 insertions, 49 deletions
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index e61a1d0739aa..214f69105321 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -44,9 +44,9 @@ void UIObject::execute(const OUString& /*rAction*/,
throw std::exception();
}
-UIObjectType UIObject::get_type() const
+OUString UIObject::get_type() const
{
- return UIObjectType::UNKNOWN;
+ return OUString("Generic UIObject");
}
std::unique_ptr<UIObject> UIObject::get_child(const OUString&)
@@ -212,9 +212,9 @@ void WindowUIObject::execute(const OUString& rAction,
}
}
-UIObjectType WindowUIObject::get_type() const
+OUString WindowUIObject::get_type() const
{
- return UIObjectType::WINDOW;
+ return get_name();
}
namespace {
@@ -308,11 +308,6 @@ StringMap ButtonUIObject::get_state()
return aMap;
}
-UIObjectType ButtonUIObject::get_type() const
-{
- return UIObjectType::BUTTON;
-}
-
void ButtonUIObject::execute(const OUString& rAction,
const StringMap& rParameters)
{
@@ -357,11 +352,6 @@ OUString DialogUIObject::get_name() const
return OUString("DialogUIObject");
}
-UIObjectType DialogUIObject::get_type() const
-{
- return UIObjectType::DIALOG;
-}
-
std::unique_ptr<UIObject> DialogUIObject::create(vcl::Window* pWindow)
{
Dialog* pDialog = dynamic_cast<Dialog*>(pWindow);
@@ -430,11 +420,6 @@ StringMap EditUIObject::get_state()
return aMap;
}
-UIObjectType EditUIObject::get_type() const
-{
- return UIObjectType::EDIT;
-}
-
OUString EditUIObject::get_name() const
{
return OUString("EditUIObject");
@@ -475,11 +460,6 @@ StringMap CheckBoxUIObject::get_state()
return aMap;
}
-UIObjectType CheckBoxUIObject::get_type() const
-{
- return UIObjectType::CHECKBOX;
-}
-
OUString CheckBoxUIObject::get_name() const
{
return OUString("CheckBoxUIObject");
@@ -518,11 +498,6 @@ StringMap TabPageUIObject::get_state()
return aMap;
}
-UIObjectType TabPageUIObject::get_type() const
-{
- return UIObjectType::TABPAGE;
-}
-
OUString TabPageUIObject::get_name() const
{
return OUString("TabPageUIObject");
@@ -575,11 +550,6 @@ StringMap ListBoxUIObject::get_state()
return aMap;
}
-UIObjectType ListBoxUIObject::get_type() const
-{
- return UIObjectType::LISTBOX;
-}
-
OUString ListBoxUIObject::get_name() const
{
return OUString("ListBoxUIObject");
@@ -625,11 +595,6 @@ StringMap ComboBoxUIObject::get_state()
return aMap;
}
-UIObjectType ComboBoxUIObject::get_type() const
-{
- return UIObjectType::COMBOBOX;
-}
-
OUString ComboBoxUIObject::get_name() const
{
return OUString("ComboBoxUIObject");
@@ -675,11 +640,6 @@ StringMap SpinUIObject::get_state()
return aMap;
}
-UIObjectType SpinUIObject::get_type() const
-{
- return UIObjectType::SPINBUTTON;
-}
-
OUString SpinUIObject::get_name() const
{
return OUString("SpinUIObject");
@@ -715,11 +675,6 @@ StringMap SpinFieldUIObject::get_state()
return aMap;
}
-UIObjectType SpinFieldUIObject::get_type() const
-{
- return UIObjectType::SPINFIELD;
-}
-
OUString SpinFieldUIObject::get_name() const
{
return OUString("SpinFieldUIObject");