summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:02:14 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-06-12 07:02:14 +0000
commit4ca8a23679488227f93998900258a537fac1ddf5 (patch)
tree04d4ea95d75abb5289ce3549f1698c7c0f516919 /accessibility
parenteac0f58f403ab77a0b3c5af111efb56a4b02a5c4 (diff)
INTEGRATION: CWS uaa04 (1.5.12); FILE MERGED
2003/06/04 07:21:17 obr 1.5.12.3: finished transition from tabs to spaces 2003/06/02 12:49:58 obr 1.5.12.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.12.1: #i14403# Now setting an AccessibleParent at transient objects
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/Table.java45
1 files changed, 8 insertions, 37 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/Table.java b/accessibility/bridge/org/openoffice/java/accessibility/Table.java
index 6954b64a8b2a..75a653c2f0ca 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/Table.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/Table.java
@@ -85,16 +85,6 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
if (unoAccessible != null) {
// FIXME: have to handle non transient objects here ..
descendant = new TableCell(unoAccessible);
- if (Build.DEBUG) {
- try {
- if (Build.DEBUG) {
- System.err.println("[Table] retrieved active descendant event: new descendant is " +
- unoAccessible.getAccessibleContext().getAccessibleName());
- }
- } catch (java.lang.NullPointerException e) {
- System.err.println("*** ERROR *** new active descendant not accessible");
- }
- }
}
}
setActiveDescendant(descendant);
@@ -169,36 +159,13 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
return new AccessibleTableListener();
}
- /** 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);
- accessibleContext = new AccessibleTable();
- } catch (java.lang.NullPointerException e) {
- if (Build.DEBUG) {
- System.err.println("NullPointerException caught: " + e.getMessage());
- }
- } catch (com.sun.star.uno.RuntimeException e) {
- if (Build.DEBUG) {
- System.err.println("RuntimeException caught: " + e.getMessage());
- }
- }
- }
- return accessibleContext;
+ /** Creates the AccessibleContext associated with this object */
+ public javax.accessibility.AccessibleContext createAccessibleContext() {
+ return new AccessibleTable();
}
protected class AccessibleTable extends AccessibleDescendantManager {
- /**
- * Though the class is abstract, this should be called by all sub-classes
- */
- protected AccessibleTable() {
- super();
- }
-
/** Gets the role of this object */
public javax.accessibility.AccessibleRole getAccessibleRole() {
return javax.accessibility.AccessibleRole.TABLE;
@@ -282,7 +249,11 @@ public class Table extends DescendantManager implements javax.accessibility.Acce
try {
XAccessibleContext xAccessibleContext = unoAccessible.getAccessibleContext();
if (xAccessibleContext != null) {
- accessibleContext = new AccessibleTableCell(xAccessibleContext);
+ javax.accessibility.AccessibleContext ac = new AccessibleTableCell(xAccessibleContext);
+ if (ac != null) {
+ ac.setAccessibleParent(Table.this);
+ accessibleContext = ac;
+ }
}
} catch (com.sun.star.uno.RuntimeException e) {
}