[Libreoffice-commits] core.git: Branch 'aoo/trunk' - vcl/unx
Tsutomu Uchino
hanya at apache.org
Wed Jan 14 02:09:08 PST 2015
vcl/unx/gtk/window/gtkframe.cxx | 28 ++++++++++++++++++----------
1 file changed, 18 insertions(+), 10 deletions(-)
New commits:
commit 19654ce3a9fadebe9bf978e89cc2ac1ab5ebb80a
Author: Tsutomu Uchino <hanya at apache.org>
Date: Wed Jan 14 08:20:05 2015 +0000
#i125991# catch IndexOutOfBoundsException to avoid fatal error happen when input method is used on Gtk environment
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 972f24b..afa557d 100644
--- a/vcl/unx/gtk/window/gtkframe.cxx
+++ b/vcl/unx/gtk/window/gtkframe.cxx
@@ -3749,17 +3749,25 @@ uno::Reference<accessibility::XAccessibleEditableText>
return uno::Reference<accessibility::XAccessibleEditableText>(xContext, uno::UNO_QUERY);
}
- for (sal_Int32 i = 0; i < xContext->getAccessibleChildCount(); ++i)
+ try
{
- uno::Reference< accessibility::XAccessible > xChild = xContext->getAccessibleChild(i);
- if (!xChild.is())
- continue;
- uno::Reference< accessibility::XAccessibleContext > xChildContext = xChild->getAccessibleContext();
- if (!xChildContext.is())
- continue;
- uno::Reference< accessibility::XAccessibleEditableText > xText = FindFocus(xChildContext);
- if (xText.is())
- return xText;
+ for (sal_Int32 i = 0, n = xContext->getAccessibleChildCount(); i < n; ++i)
+ {
+ uno::Reference< accessibility::XAccessible > xChild = xContext->getAccessibleChild(i);
+ if (!xChild.is())
+ continue;
+ uno::Reference< accessibility::XAccessibleContext > xChildContext = xChild->getAccessibleContext();
+ if (!xChildContext.is())
+ continue;
+ uno::Reference< accessibility::XAccessibleEditableText > xText = FindFocus(xChildContext);
+ if (xText.is())
+ return xText;
+ }
+ }
+ catch( lang::IndexOutOfBoundsException & e )
+ {
+ OSL_TRACE( "GtkFrame FindFocus, %s", ::rtl::OUStringToOString(
+ e.Message, RTL_TEXTENCODING_UTF8 ).pData->buffer );
}
return uno::Reference< accessibility::XAccessibleEditableText >();
}
More information about the Libreoffice-commits
mailing list