diff options
author | Saurav Chirania <saurav.chir@gmail.com> | 2018-06-06 11:22:42 +0530 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-06-12 22:07:29 +0200 |
commit | da0e3d7a2dace5c29b7a252b744232e9a92e4f2e (patch) | |
tree | 4adbdc219a1f6ec8e3ded5cbb60c9fcf50993a04 /vcl/source/uitest | |
parent | 2927c7785d6bf6cef3f4bcc0bc3e463ac6a55b01 (diff) |
WIP: uitest: complete combobox, tabcontrol wrapper
Change-Id: I3ba1b0d1b5412c30e540cf45fe21ef946839afed
Reviewed-on: https://gerrit.libreoffice.org/55372
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'vcl/source/uitest')
-rw-r--r-- | vcl/source/uitest/uiobject.cxx | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index c7c64f8c9189..adf26cbb2ac8 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -1014,6 +1014,19 @@ OUString ComboBoxUIObject::get_name() const return OUString("ComboBoxUIObject"); } +OUString ComboBoxUIObject::get_action(VclEventId nEvent) const +{ + if (nEvent == VclEventId::ComboboxSelect) + { + sal_Int32 nPos = mxComboBox->GetSelectedEntryPos(); + return this->get_type() + " Action:SELECT Id:" + + mxComboBox->get_id() + " POS:" + OUString::number(nPos) + + " Parent:" + get_top_parent(mxComboBox)->get_id(); + } + else + return WindowUIObject::get_action(nEvent); +} + std::unique_ptr<UIObject> ComboBoxUIObject::create(vcl::Window* pWindow) { ComboBox* pComboBox = dynamic_cast<ComboBox*>(pWindow); @@ -1143,10 +1156,28 @@ void TabControlUIObject::execute(const OUString& rAction, StringMap TabControlUIObject::get_state() { StringMap aMap = WindowUIObject::get_state(); + aMap["PageCount"] = OUString::number(mxTabControl->GetPageCount()); + + sal_uInt16 nPageId = mxTabControl->GetCurPageId(); + aMap["CurrPageId"] = OUString::number(nPageId); + aMap["CurrPagePos"] = OUString::number(mxTabControl->GetPagePos(nPageId)); return aMap; } +OUString TabControlUIObject::get_action(VclEventId nEvent) const +{ + if (nEvent == VclEventId::TabpageActivate) + { + sal_Int32 nPageId = mxTabControl->GetCurPageId(); + return this->get_type() + " Action:SELECT Id:" + mxTabControl->get_id() + + " POS:" + OUString::number(mxTabControl->GetPagePos(nPageId)) + + " Parent:" + get_top_parent(mxTabControl)->get_id(); + } + else + return WindowUIObject::get_action(nEvent); +} + OUString TabControlUIObject::get_name() const { return OUString("TabControlUIObject"); |