summaryrefslogtreecommitdiff
path: root/accessibility/bridge/source
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:03:45 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:03:45 +0000
commitd01b7b910b5b40ef180fc96660b7607acaafd8bf (patch)
tree5e49b0b891026b3821d92fb791012ca20ad4f806 /accessibility/bridge/source
parent695613119ae98ab2cd5056487a849c63f89544c1 (diff)
INTEGRATION: CWS uaa04 (1.2.2); FILE MERGED
2003/06/03 15:19:29 obr 1.2.2.1: #109948# catch possible RuntimeExceptions
Diffstat (limited to 'accessibility/bridge/source')
-rw-r--r--accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx38
1 files changed, 24 insertions, 14 deletions
diff --git a/accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx b/accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx
index db634b3d9117..67759cdcc1af 100644
--- a/accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx
+++ b/accessibility/bridge/source/java/WindowsAccessBridgeAdapter.cxx
@@ -275,30 +275,40 @@ void handleWindowEvent(Window * pWindow, bool bShow)
if ( pParentWindow )
{
- // The parent window of a combo box floating window should have the role COMBO_BOX
- Reference< XAccessible > xParentAccessible(pParentWindow->GetAccessible());
- if ( xParentAccessible.is() )
+ try
{
- Reference< XAccessibleContext > xParentAC(xParentAccessible->getAccessibleContext());
- if ( xParentAC.is() && (AccessibleRole::COMBO_BOX == xParentAC->getAccessibleRole()) )
+ // The parent window of a combo box floating window should have the role COMBO_BOX
+ Reference< XAccessible > xParentAccessible(pParentWindow->GetAccessible());
+ if ( xParentAccessible.is() )
{
- // O.k. - this is a combo box floating window corresponding to the child of role LIST of the parent.
- // Let's not rely on a specific child order, just search for the child with the role LIST
- sal_Int32 nCount = xParentAC->getAccessibleChildCount();
- for ( sal_Int32 n = 0; (n < nCount) && !xAccessible.is(); n++)
+ Reference< XAccessibleContext > xParentAC(xParentAccessible->getAccessibleContext());
+ if ( xParentAC.is() && (AccessibleRole::COMBO_BOX == xParentAC->getAccessibleRole()) )
{
- Reference< XAccessible > xChild = xParentAC->getAccessibleChild(n);
- if ( xChild.is() )
+ // O.k. - this is a combo box floating window corresponding to the child of role LIST of the parent.
+ // Let's not rely on a specific child order, just search for the child with the role LIST
+ sal_Int32 nCount = xParentAC->getAccessibleChildCount();
+ for ( sal_Int32 n = 0; (n < nCount) && !xAccessible.is(); n++)
{
- Reference< XAccessibleContext > xChildAC = xChild->getAccessibleContext();
- if ( xChildAC.is() && (AccessibleRole::LIST == xChildAC->getAccessibleRole()) )
+ Reference< XAccessible > xChild = xParentAC->getAccessibleChild(n);
+ if ( xChild.is() )
{
- xAccessible = xChild;
+ Reference< XAccessibleContext > xChildAC = xChild->getAccessibleContext();
+ if ( xChildAC.is() && (AccessibleRole::LIST == xChildAC->getAccessibleRole()) )
+ {
+ xAccessible = xChild;
+ }
}
}
}
}
}
+ catch (::com::sun::star::uno::RuntimeException e)
+ {
+ // Ignore show events that throw DisposedExceptions in getAccessibleContext(),
+ // but keep revoking these windows in hide(s).
+ if (bShow)
+ return;
+ }
}
// We have to rely on the fact that Window::GetAccessible()->getAccessibleContext() returns a valid XAccessibleContext