diff options
author | Justin Luth <justin_luth@sil.org> | 2016-02-10 13:12:35 +0300 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-03-09 16:49:52 +0000 |
commit | 598e6a024163f1510d076000788b7745625f5ed5 (patch) | |
tree | af87c16d460e518fa46b21d66ee9d0fd06c2865a /vcl/unx/gtk | |
parent | cfa109827302faa7ed1247105236fe786dc53ce7 (diff) |
tdf#96685 - ensure FindFocus a11y context is valid EditableText
signalIMDelete and Retrieve Surrounding Text search for the accessible
context that has the focus. When a context with the FOCUSED state was
found it was automatically returned, assuming that the reference was valid.
In Draw tables, especially when using the arrow keys to move between
cells, that often was not true. So, instead of returning a broken
reference, keep searching through the children until a valid
AccessibleEditableText item that is marked as FOCUSED is found.
Change-Id: I71e3e9bfda56d1dfbdbd93945882560a39e40714
Reviewed-on: https://gerrit.libreoffice.org/22263
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/unx/gtk')
-rw-r--r-- | vcl/unx/gtk/gtksalframe.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 476b4e997e38..fec69ff9ec5e 100644 --- a/vcl/unx/gtk/gtksalframe.cxx +++ b/vcl/unx/gtk/gtksalframe.cxx @@ -3842,7 +3842,12 @@ uno::Reference<accessibility::XAccessibleEditableText> if (xState.is()) { if (xState->contains(accessibility::AccessibleStateType::FOCUSED)) - return uno::Reference<accessibility::XAccessibleEditableText>(xContext, uno::UNO_QUERY); + { + uno::Reference< accessibility::XAccessibleEditableText > xText = + uno::Reference<accessibility::XAccessibleEditableText>(xContext, uno::UNO_QUERY); + if (xText.is()) + return xText; + } } for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i) |