From 3df98c595f1b9c4bd0705578a15252a4d194293c Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sun, 26 Mar 2017 00:21:04 +0100 Subject: uitest: add info whether a tree list box contains check boxes Change-Id: Id214928de2e74ac7ec707eaf2276e4e808b630a4 Reviewed-on: https://gerrit.libreoffice.org/35697 Tested-by: Jenkins Reviewed-by: Markus Mohrhard --- svtools/source/uitest/uiobject.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'svtools') diff --git a/svtools/source/uitest/uiobject.cxx b/svtools/source/uitest/uiobject.cxx index 94da23aa6a54..aed862b0acbe 100644 --- a/svtools/source/uitest/uiobject.cxx +++ b/svtools/source/uitest/uiobject.cxx @@ -18,6 +18,15 @@ TreeListUIObject::TreeListUIObject(VclPtr xTreeList): { } +namespace { + +bool isCheckBoxList(VclPtr xTreeList) +{ + return (xTreeList->GetTreeFlags() & SvTreeFlags::CHKBTN) == SvTreeFlags::CHKBTN; +} + +} + StringMap TreeListUIObject::get_state() { StringMap aMap = WindowUIObject::get_state(); @@ -26,6 +35,7 @@ StringMap TreeListUIObject::get_state() aMap["VisibleCount"] = OUString::number(mxTreeList->GetVisibleCount()); aMap["Children"] = OUString::number(mxTreeList->GetChildCount(nullptr)); aMap["LevelChildren"] = OUString::number(mxTreeList->GetLevelChildCount(nullptr)); + aMap["CheckBoxList"] = OUString::boolean(isCheckBoxList(mxTreeList)); return aMap; } -- cgit