summaryrefslogtreecommitdiff
path: root/accessibility
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2003-06-12 06:59:46 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2003-06-12 06:59:46 +0000
commit8a5025216ecd841adb5257c363e39916fc227055 (patch)
treee3025a2b0171dc4ec2b1384ab86b404c17931dd1 /accessibility
parent39775bc56d22683babfcaa3287b9d8c7ff7e54db (diff)
INTEGRATION: CWS uaa04 (1.4.2); FILE MERGED
2003/06/02 12:49:54 obr 1.4.2.1: #109747# implement getAccessibleContext in a failsafe way, so that it can't kill the dispatch thread of the Java AccessBridge for Windows
Diffstat (limited to 'accessibility')
-rw-r--r--accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java42
1 files changed, 23 insertions, 19 deletions
diff --git a/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java b/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java
index db79eb3f1a28..5c4dfb63be6a 100644
--- a/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java
+++ b/accessibility/bridge/org/openoffice/java/accessibility/DescendantManager.java
@@ -54,25 +54,27 @@
*
*
************************************************************************/
-
package org.openoffice.java.accessibility;
-import javax.accessibility.AccessibleState;
-
+import com.sun.star.accessibility.*;
import com.sun.star.uno.AnyConverter;
import com.sun.star.uno.UnoRuntime;
-import com.sun.star.accessibility.*;
+
+import javax.accessibility.AccessibleState;
+
public abstract class DescendantManager extends Component {
protected XAccessibleSelection unoAccessibleSelection = null;
protected javax.accessibility.Accessible activeDescendant = null;
protected boolean multiselectable = false;
- protected DescendantManager(XAccessible xAccessible, XAccessibleContext xAccessibleContext) {
+ protected DescendantManager(XAccessible xAccessible,
+ XAccessibleContext xAccessibleContext) {
super(xAccessible, xAccessibleContext);
}
- protected DescendantManager(XAccessible xAccessible, XAccessibleContext xAccessibleContext, boolean multiselectable) {
+ protected DescendantManager(XAccessible xAccessible,
+ XAccessibleContext xAccessibleContext, boolean multiselectable) {
super(xAccessible, xAccessibleContext);
this.multiselectable = multiselectable;
}
@@ -80,39 +82,43 @@ public abstract class DescendantManager extends Component {
/**
* Update the proxy objects appropriatly on property change events
*/
- protected class AccessibleDescendantManagerListener extends AccessibleUNOComponentListener {
-
+ protected class AccessibleDescendantManagerListener
+ extends AccessibleUNOComponentListener {
protected AccessibleDescendantManagerListener() {
- super();
+ unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(XAccessibleSelection.class,
+ unoAccessibleContext);
}
/** Called by OpenOffice process to notify property changes */
public void notifyEvent(AccessibleEventObject event) {
switch (event.EventId) {
case AccessibleEventId.SELECTION_CHANGED:
- firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY, null, null);
+ firePropertyChange(javax.accessibility.AccessibleContext.ACCESSIBLE_SELECTION_PROPERTY,
+ null, null);
+
break;
+
default:
super.notifyEvent(event);
}
}
}
- protected abstract class AccessibleDescendantManager extends AccessibleUNOComponent
+ protected abstract class AccessibleDescendantManager
+ extends AccessibleUNOComponent
implements javax.accessibility.AccessibleSelection {
-
- /**
- * Though the class is abstract, this should be called by all sub-classes
- */
protected AccessibleDescendantManager() {
- super();
+ unoAccessibleSelection = (XAccessibleSelection) UnoRuntime.queryInterface(XAccessibleSelection.class,
+ unoAccessibleContext);
}
/** Returns an AccessibleStateSet that contains corresponding Java states to the UAA state types */
- protected javax.accessibility.AccessibleStateSet getAccessibleStateSetImpl(XAccessibleStateSet unoAS) {
+ protected javax.accessibility.AccessibleStateSet getAccessibleStateSetImpl(
+ XAccessibleStateSet unoAS) {
javax.accessibility.AccessibleStateSet states = super.getAccessibleStateSetImpl(unoAS);
states.add(AccessibleExtendedState.MANAGES_DESCENDANTS);
+
if (multiselectable) {
states.add(javax.accessibility.AccessibleState.MULTISELECTABLE);
}
@@ -120,7 +126,6 @@ public abstract class DescendantManager extends Component {
return states;
}
-
/*
* AccessibleContext
*/
@@ -198,4 +203,3 @@ public abstract class DescendantManager extends Component {
}
}
}
-