Kaydet (Commit) b5f3ad23 authored tarafından Caolán McNamara's avatar Caolán McNamara Kaydeden (comit) Andras Timar

tdf#121855 like osx case don't search near-infinite calc grid for focus

Change-Id: Ie6bccd2781fbbdc5f4d5dc2eb6903191aafe8265
Reviewed-on: https://gerrit.libreoffice.org/64521
Tested-by: Jenkins
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
(cherry picked from commit 78c52b1a)
üst 6594e0bb
...@@ -992,7 +992,7 @@ Reference < XAccessibleContext > hitTestRunner ( css::awt::Point point, ...@@ -992,7 +992,7 @@ Reference < XAccessibleContext > hitTestRunner ( css::awt::Point point,
bool bSafeToIterate = true; bool bSafeToIterate = true;
sal_Int32 nCount = rxAccessibleContext -> getAccessibleChildCount(); 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; bSafeToIterate = false;
else { // manages descendants is an horror from the a11y standards guys. else { // manages descendants is an horror from the a11y standards guys.
Reference< XAccessibleStateSet > xStateSet; Reference< XAccessibleStateSet > xStateSet;
......
...@@ -3757,6 +3757,13 @@ uno::Reference<accessibility::XAccessibleEditableText> ...@@ -3757,6 +3757,13 @@ 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) for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i)
{ {
uno::Reference< accessibility::XAccessible > xChild = xContext->getAccessibleChild(i); uno::Reference< accessibility::XAccessible > xChild = xContext->getAccessibleChild(i);
......
...@@ -4153,6 +4153,13 @@ uno::Reference<accessibility::XAccessibleEditableText> ...@@ -4153,6 +4153,13 @@ 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) for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i)
{ {
uno::Reference< accessibility::XAccessible > xChild = xContext->getAccessibleChild(i); uno::Reference< accessibility::XAccessible > xChild = xContext->getAccessibleChild(i);
......
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