summaryrefslogtreecommitdiff
path: root/toolkit/test/accessibility/AccessibleSelectionHandler.java
diff options
context:
space:
mode:
authorAndre Fischer <af@openoffice.org>2002-10-07 13:13:51 +0000
committerAndre Fischer <af@openoffice.org>2002-10-07 13:13:51 +0000
commitc21446c21a1595914660ca7d6413803ace663046 (patch)
tree718858182d99c9cffb73daf1df28e78824b49b18 /toolkit/test/accessibility/AccessibleSelectionHandler.java
parent9482409188a07e6407e665dc875de2ca7f83e21d (diff)
Showing name of objects in selection dialog.
Diffstat (limited to 'toolkit/test/accessibility/AccessibleSelectionHandler.java')
-rw-r--r--toolkit/test/accessibility/AccessibleSelectionHandler.java37
1 files changed, 23 insertions, 14 deletions
diff --git a/toolkit/test/accessibility/AccessibleSelectionHandler.java b/toolkit/test/accessibility/AccessibleSelectionHandler.java
index 62afb2546f92..a1ba43b1e2fd 100644
--- a/toolkit/test/accessibility/AccessibleSelectionHandler.java
+++ b/toolkit/test/accessibility/AccessibleSelectionHandler.java
@@ -64,19 +64,28 @@ class AccessibleSelectionHandler
{
for( int i = 0; i < nCount; i++ )
{
- if( xSelection.isAccessibleChildSelected( i ) )
+ try
+ {
+ if( xSelection.isAccessibleChildSelected( i ) )
+ {
+ XAccessible xSelChild = xSelection.
+ getSelectedAccessibleChild(nSelected);
+ XAccessible xNChild =
+ ((AccTreeNode)aParent).
+ getContext().getAccessibleChild( i );
+ aVNode.addChild( new StringNode(
+ i + ": " +
+ xNChild.getAccessibleContext().
+ getAccessibleDescription() + " (" +
+ (xSelChild.equals(xNChild) ? "OK" : "XXX") +
+ ")", aParent ) );
+ }
+ }
+ catch (com.sun.star.lang.DisposedException e)
{
- XAccessible xSelChild = xSelection.
- getSelectedAccessibleChild(nSelected);
- XAccessible xNChild =
- ((AccTreeNode)aParent).
- getContext().getAccessibleChild( i );
aVNode.addChild( new StringNode(
- i + ": " +
- xNChild.getAccessibleContext().
- getAccessibleDescription() + " (" +
- (xSelChild.equals(xNChild) ? "OK" : "XXX") +
- ")", aParent ) );
+ i + ": caught DisposedException while creating",
+ aParent ));
}
}
aChild = aVNode;
@@ -155,9 +164,9 @@ class SelectionDialog extends JDialog
{
try
{
- aChildVector.add(
- xContext.getAccessibleChild(i).
- getAccessibleContext().getAccessibleDescription() );
+ XAccessible xChild = xContext.getAccessibleChild(i);
+ XAccessibleContext xChildContext = xChild.getAccessibleContext();
+ aChildVector.add( i + " " + xChildContext.getAccessibleName());
}
catch( IndexOutOfBoundsException e )
{