summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTsutomu Uchino <hanya@apache.org>2015-01-14 08:20:05 +0000
committerTsutomu Uchino <hanya@apache.org>2015-01-14 08:20:05 +0000
commit19654ce3a9fadebe9bf978e89cc2ac1ab5ebb80a (patch)
tree383ef0910fb29c0450f010f8261f787a64766981 /vcl
parentd8020927231297bc7faa3bab3d20ee2041eb050a (diff)
#i125991# catch IndexOutOfBoundsException to avoid fatal error happen when input method is used on Gtk environment
Notes
Notes: ignore: aoo
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/window/gtkframe.cxx28
1 files changed, 18 insertions, 10 deletions
diff --git a/vcl/unx/gtk/window/gtkframe.cxx b/vcl/unx/gtk/window/gtkframe.cxx
index 972f24b63148..afa557dc2d79 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 >();
}