summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-04-18 09:15:23 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-04-25 14:05:44 +0200
commit2bde5822604f0cd7f52e2a72899b8464ae7d2d5d (patch)
tree5553f563b27388c2ae67843288d9aea535af6417 /vcl
parent7864690ac1fc1b9d390b853da408f3520f64afda (diff)
catch exception like text_wrapper_get_caret_offset does
Change-Id: I7d681a5cd58af60005eefa9969ec975d5cfc5580 (cherry picked from commit 0d2a607a849e3f1b51092c7d96bc5529420cfab2) Reviewed-on: https://gerrit.libreoffice.org/36637 Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index 160a6f6c7ef2..031290147b45 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -90,7 +90,14 @@ atk_wrapper_focus_idle_handler (gpointer data)
wrapper_obj->mpText.set(wrapper_obj->mpContext, css::uno::UNO_QUERY);
if ( wrapper_obj->mpText.is() )
{
- gint caretPos = wrapper_obj->mpText->getCaretPosition();
+ gint caretPos = -1;
+
+ try {
+ caretPos = wrapper_obj->mpText->getCaretPosition();
+ }
+ catch(const uno::Exception&) {
+ g_warning( "Exception in getCaretPosition()" );
+ }
if ( caretPos != -1 )
{