diff options
Diffstat (limited to 'svtools/source/uitest/uiobject.cxx')
-rw-r--r-- | svtools/source/uitest/uiobject.cxx | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/svtools/source/uitest/uiobject.cxx b/svtools/source/uitest/uiobject.cxx index 6156f4451918..0a4550ff1813 100644 --- a/svtools/source/uitest/uiobject.cxx +++ b/svtools/source/uitest/uiobject.cxx @@ -10,6 +10,7 @@ #include "uitest/uiobject.hxx" #include <svtools/treelistbox.hxx> +#include <svtools/simptabl.hxx> TreeListUIObject::TreeListUIObject(VclPtr<SvTreeListBox> xTreeList): WindowUIObject(xTreeList), @@ -140,4 +141,31 @@ OUString TreeListEntryUIObject::get_type() const return OUString("TreeListEntry"); } +SimpleTableUIObject::SimpleTableUIObject(VclPtr<SvSimpleTable> xTable): + TreeListUIObject(xTable), + mxTable(xTable) +{ +} + +StringMap SimpleTableUIObject::get_state() +{ + StringMap aMap = TreeListUIObject::get_state(); + + aMap["ColumnCount"] = OUString::number(mxTable->TabCount()); + + return aMap; +} + +OUString SimpleTableUIObject::UIObject::get_type() const +{ + return OUString("SimpleTable"); +} + +std::unique_ptr<UIObject> SimpleTableUIObject::createFromContainer(vcl::Window* pWindow) +{ + SvSimpleTableContainer* pTableContainer = dynamic_cast<SvSimpleTableContainer*>(pWindow); + assert(pTableContainer); + return std::unique_ptr<UIObject>(new SimpleTableUIObject(pTableContainer->GetTable())); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |