summaryrefslogtreecommitdiff
path: root/vcl/unx/gtk/a11y
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2014-06-23 07:55:44 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-06-23 09:56:57 +0100
commit5232d01ee5afea97b80da39b082012ee4c1a1409 (patch)
treee00c2222932f804b955bc045d1e185f0abcb6e4c /vcl/unx/gtk/a11y
parent94b2fe9b00c28e12bbd98ade8c5a31179c290da0 (diff)
Resolves: #i124970# fix DocumentFocusListener::notifyEvent's...
handling of IndexOutOfBoundsException the DocumentFocusListener::notifyEvent() throw list only allows a RuntimeException to propagate. The methods called in notifyEvent() allow IndexOutOfBoundsException though, so it must be handled in all cases to prevent C++ from invoking its unexpected() abort mechanisms. Ceterum censeo, non-empty throw lists should be removed altogether... (cherry picked from commit 4da0e442f0fd4838e93e7316c24cfeef9289207d) Conflicts: vcl/osx/documentfocuslistener.cxx vcl/unx/gtk/a11y/atkutil.cxx Change-Id: Ie0b783832314ee5ec376a0c3c2cd67e4a70e218b
Diffstat (limited to 'vcl/unx/gtk/a11y')
-rw-r--r--vcl/unx/gtk/a11y/atkutil.cxx40
1 files changed, 21 insertions, 19 deletions
diff --git a/vcl/unx/gtk/a11y/atkutil.cxx b/vcl/unx/gtk/a11y/atkutil.cxx
index f662bbdc7bdd..96990c910f5c 100644
--- a/vcl/unx/gtk/a11y/atkutil.cxx
+++ b/vcl/unx/gtk/a11y/atkutil.cxx
@@ -204,10 +204,10 @@ void DocumentFocusListener::disposing( const lang::EventObject& aEvent )
void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObject& aEvent )
throw( uno::RuntimeException, std::exception )
{
- switch( aEvent.EventId )
- {
- case accessibility::AccessibleEventId::STATE_CHANGED:
- try
+ try {
+ switch( aEvent.EventId )
+ {
+ case accessibility::AccessibleEventId::STATE_CHANGED:
{
sal_Int16 nState = accessibility::AccessibleStateType::INVALID;
aEvent.NewValue >>= nState;
@@ -215,28 +215,30 @@ void DocumentFocusListener::notifyEvent( const accessibility::AccessibleEventObj
if( accessibility::AccessibleStateType::FOCUSED == nState )
atk_wrapper_focus_tracker_notify_when_idle( getAccessible(aEvent) );
}
- catch (const lang::IndexOutOfBoundsException&)
- {
- g_warning("Focused object has invalid index in parent");
- }
break;
- case accessibility::AccessibleEventId::CHILD:
- {
- uno::Reference< accessibility::XAccessible > xChild;
- if( (aEvent.OldValue >>= xChild) && xChild.is() )
- detachRecursive(xChild);
+ case accessibility::AccessibleEventId::CHILD:
+ {
+ uno::Reference< accessibility::XAccessible > xChild;
+ if( (aEvent.OldValue >>= xChild) && xChild.is() )
+ detachRecursive(xChild);
- if( (aEvent.NewValue >>= xChild) && xChild.is() )
- attachRecursive(xChild);
- }
+ if( (aEvent.NewValue >>= xChild) && xChild.is() )
+ attachRecursive(xChild);
+ }
break;
- case accessibility::AccessibleEventId::INVALIDATE_ALL_CHILDREN:
+ case accessibility::AccessibleEventId::INVALIDATE_ALL_CHILDREN:
g_warning( "Invalidate all children called\n" );
break;
- default:
- break;
+
+ default:
+ break;
+ }
+ }
+ catch( const lang::IndexOutOfBoundsException& e )
+ {
+ g_warning("Focused object has invalid index in parent");
}
}