summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:02:59 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:02:59 +0000
commitafb47054e29233553cf33752e90ed9e8d4ff8cad (patch)
treeaa616aecc75efc733c69d4a98437f16096435517 /accessibility
parent129e21082a5a5a964f7a8a261525524ec8ba7f12 (diff)
INTEGRATION: CWS uaa04 (1.5.2); FILE MERGED
2003/06/04 07:21:19 obr 1.5.2.3: finished transition from tabs to spaces 2003/06/02 12:49:59 obr 1.5.2.2: #109747# implement getAccessibleContext in a failsafe way, so that it can't kill the dispatch thread of the Java AccessBridge for Windows 2003/05/26 10:26:35 obr 1.5.2.1: #i14403# Now setting an AccessibleParent at transient objects
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Tree.java31
1 files changed, 8 insertions, 23 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java
index b39f359001cd..b7de9f1a0bd3 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Tree.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Tree.java
@@ -155,32 +155,13 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
return new AccessibleTreeListener();
}
- /** Returns the AccessibleContext associated with this object */
- public javax.accessibility.AccessibleContext getAccessibleContext() {
- if (accessibleContext == null) {
- try {
- unoAccessibleContext = unoAccessible.getAccessibleContext();
- unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(
- XAccessibleSelection.class, unoAccessibleContext);
- if (unoAccessibleSelection != null) {
- accessibleContext = new AccessibleTree();
- }
- } catch (java.lang.NullPointerException e) {
- } catch (com.sun.star.uno.RuntimeException e) {
- }
- }
- return accessibleContext;
+ /** Creates the AccessibleContext associated with this object */
+ public javax.accessibility.AccessibleContext createAccessibleContext() {
+ return new AccessibleTree();
}
protected class AccessibleTree extends AccessibleDescendantManager {
- /**
- * Though the class is abstract, this should be called by all sub-classes
- */
- protected AccessibleTree() {
- super();
- }
-
/** Returns an AccessibleStateSet that contains corresponding Java states to the UAA state types */
protected javax.accessibility.AccessibleStateSet getAccessibleStateSetImpl(XAccessibleStateSet unoAS) {
javax.accessibility.AccessibleStateSet states = super.getAccessibleStateSetImpl(unoAS);
@@ -290,7 +271,11 @@ public class Tree extends DescendantManager implements javax.accessibility.Acces
try {
XAccessibleContext xAccessibleContext = unoAccessible.getAccessibleContext();
if (xAccessibleContext != null) {
- accessibleContext = new AccessibleTreeItem(xAccessibleContext);
+ javax.accessibility.AccessibleContext ac = new AccessibleTreeItem(xAccessibleContext);
+ if (ac != null) {
+ ac.setAccessibleParent(Tree.this);
+ accessibleContext = ac;
+ }
}
} catch (com.sun.star.uno.RuntimeException e) {
}