Kaydet (Commit) 4e02fee0 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

uitest: checking whether we have focus needs to be recursive

Change-Id: Id18a56cdf5b23433178882a953fd85954c0ccc1c
Reviewed-on: https://gerrit.libreoffice.org/61008Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Jenkins
üst b877f78f
......@@ -88,15 +88,18 @@ void UITestLogger::logCommand(const OUString& rAction, const css::uno::Sequence<
namespace {
// most likely this should be recursive
bool child_windows_have_focus(VclPtr<Control> const & xUIElement)
bool child_windows_have_focus(VclPtr<vcl::Window> const & xUIElement)
{
sal_Int32 nCount = xUIElement->GetChildCount();
for (sal_Int32 i = 0; i < nCount; ++i)
{
if (xUIElement->GetChild(i)->HasFocus())
vcl::Window* pChild = xUIElement->GetChild(i);
if (pChild->HasFocus())
{
return true;
}
if (child_windows_have_focus(VclPtr<vcl::Window>(pChild)))
return true;
}
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment