vcl/unx/gtk/gtksalframe.cxx | 7 ++++++- vcl/unx/gtk3/gtk3gtkframe.cxx | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-)
New commits: commit 598e6a024163f1510d076000788b7745625f5ed5 Author: Justin Luth <justin_l...@sil.org> Date: Wed Feb 10 13:12:35 2016 +0300 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 <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/vcl/unx/gtk/gtksalframe.cxx b/vcl/unx/gtk/gtksalframe.cxx index 476b4e9..fec69ff 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) diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx index e6ebfdf..ed0293d 100644 --- a/vcl/unx/gtk3/gtk3gtkframe.cxx +++ b/vcl/unx/gtk3/gtk3gtkframe.cxx @@ -3921,7 +3921,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)
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits