vcl/osx/a11ywrapper.mm        |    2 +-
 vcl/unx/gtk/gtksalframe.cxx   |    7 +++++++
 vcl/unx/gtk3/gtk3gtkframe.cxx |    7 +++++++
 3 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit cd0c794a6cfaf9c008682596d2cdae6aa57c8bbf
Author:     Caolán McNamara <[email protected]>
AuthorDate: Tue Dec 4 13:01:14 2018 +0000
Commit:     Caolán McNamara <[email protected]>
CommitDate: Tue Dec 4 20:57:58 2018 +0100

    tdf#121855 like osx case don't search near-infinite calc grid for focus
    
    Change-Id: Ie6bccd2781fbbdc5f4d5dc2eb6903191aafe8265
    Reviewed-on: https://gerrit.libreoffice.org/64520
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <[email protected]>
    Tested-by: Caolán McNamara <[email protected]>

diff --git a/vcl/osx/a11ywrapper.mm b/vcl/osx/a11ywrapper.mm
index 485212a72ded..e24b83e5e2c0 100644
--- a/vcl/osx/a11ywrapper.mm
+++ b/vcl/osx/a11ywrapper.mm
@@ -995,7 +995,7 @@ static Reference < XAccessibleContext > hitTestRunner ( 
css::awt::Point point,
             bool bSafeToIterate = true;
             sal_Int32 nCount = rxAccessibleContext -> 
getAccessibleChildCount();
 
-            if ( nCount < 0 || nCount > SAL_MAX_UINT16 /* slow enough for 
anyone */ )
+            if (nCount < 0 || nCount > SAL_MAX_UINT16 /* slow enough for 
anyone */)
                 bSafeToIterate = false;
             else { // manages descendants is an horror from the a11y standards 
guys.
                 Reference< XAccessibleStateSet > xStateSet;
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx
index 305a1c3048bf..1499af92ee70 100644
--- a/vcl/unx/gtk/gtksalframe.cxx
+++ b/vcl/unx/gtk/gtksalframe.cxx
@@ -3660,6 +3660,13 @@ static 
uno::Reference<accessibility::XAccessibleEditableText>
         }
     }
 
+    bool bSafeToIterate = true;
+    sal_Int32 nCount = xContext->getAccessibleChildCount();
+    if (nCount < 0 || nCount > SAL_MAX_UINT16 /* slow enough for anyone */)
+        bSafeToIterate = false;
+    if (!bSafeToIterate)
+        return uno::Reference< accessibility::XAccessibleEditableText >();
+
     for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i)
     {
         uno::Reference< accessibility::XAccessible > xChild = 
xContext->getAccessibleChild(i);
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 4e5271801b4d..14ec230787ce 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -4214,6 +4214,13 @@ static 
uno::Reference<accessibility::XAccessibleEditableText>
         }
     }
 
+    bool bSafeToIterate = true;
+    sal_Int32 nCount = xContext->getAccessibleChildCount();
+    if (nCount < 0 || nCount > SAL_MAX_UINT16 /* slow enough for anyone */)
+        bSafeToIterate = false;
+    if (!bSafeToIterate)
+        return uno::Reference< accessibility::XAccessibleEditableText >();
+
     for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i)
     {
         uno::Reference< accessibility::XAccessible > xChild = 
xContext->getAccessibleChild(i);
_______________________________________________
Libreoffice-commits mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to