summaryrefslogtreecommitdiff
path: root/vcl/source/uitest/uno/uiobject_uno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/uitest/uno/uiobject_uno.cxx')
-rw-r--r--vcl/source/uitest/uno/uiobject_uno.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx
index 998a0d9a78b8..7c6ca8398b90 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -10,6 +10,8 @@
#include "uiobject_uno.hxx"
#include <vcl/svapp.hxx>
+#include <set>
+
UIObjectUnoObj::UIObjectUnoObj(std::unique_ptr<UIObject> pObj):
UIObjectBase(m_aMutex),
mpObj(std::move(pObj))
@@ -69,6 +71,24 @@ css::uno::Sequence<css::beans::PropertyValue> UIObjectUnoObj::getState()
return aProps;
}
+css::uno::Sequence<OUString> UIObjectUnoObj::getChildren()
+ throw (css::uno::RuntimeException, std::exception)
+{
+ if (!mpObj)
+ throw css::uno::RuntimeException();
+
+ std::set<OUString> aChildren = mpObj->get_children();
+
+ css::uno::Sequence<OUString> aRet(aChildren.size());
+ sal_Int32 i = 0;
+ for (auto itr = aChildren.begin(), itrEnd = aChildren.end(); itr != itrEnd; ++itr, ++i)
+ {
+ aRet[i] = *itr;
+ }
+
+ return aRet;
+}
+
OUString SAL_CALL UIObjectUnoObj::getType()
throw (css::uno::RuntimeException, std::exception)
{