[Libreoffice-commits] core.git: vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Sep 26 21:27:29 UTC 2018


 vcl/source/uitest/logger.cxx |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit 4e02fee0022e2f05927eec69773ecb8ce519c19e
Author:     Markus Mohrhard <markus.mohrhard at googlemail.com>
AuthorDate: Wed Sep 26 17:31:31 2018 +0200
Commit:     Markus Mohrhard <markus.mohrhard at googlemail.com>
CommitDate: Wed Sep 26 23:27:08 2018 +0200

    uitest: checking whether we have focus needs to be recursive
    
    Change-Id: Id18a56cdf5b23433178882a953fd85954c0ccc1c
    Reviewed-on: https://gerrit.libreoffice.org/61008
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
    Tested-by: Jenkins

diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 82da48256cc4..432a6af86b18 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -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;
 }


More information about the Libreoffice-commits mailing list