diff options
author | Andre Fischer <af@openoffice.org> | 2003-06-04 11:43:39 +0000 |
---|---|---|
committer | Andre Fischer <af@openoffice.org> | 2003-06-04 11:43:39 +0000 |
commit | 6e7d7d9d59a731053ff1677b7decb5eed6a1f8c0 (patch) | |
tree | 96691e035af02f920175bfe6d0169938e3b8579d /toolkit | |
parent | INTEGRATION: CWS vcl10 (1.61.4); FILE MERGED (diff) | |
download | core-6e7d7d9d59a731053ff1677b7decb5eed6a1f8c0.tar.gz core-6e7d7d9d59a731053ff1677b7decb5eed6a1f8c0.zip |
Adaption to recent UAA changes (TextSegment,selectAllAccessibleChildren,COLLAPSED).
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/test/accessibility/AccessibleTextHandler.java | 25 | ||||
-rw-r--r-- | toolkit/test/accessibility/SelectionDialog.java | 2 | ||||
-rw-r--r-- | toolkit/test/accessibility/TopWindowListener.java | 1 | ||||
-rw-r--r-- | toolkit/test/accessibility/makefile.mk | 5 | ||||
-rw-r--r-- | toolkit/test/accessibility/ov/SelectionView.java | 2 | ||||
-rw-r--r-- | toolkit/test/accessibility/tools/NameProvider.java | 2 |
6 files changed, 22 insertions, 15 deletions
diff --git a/toolkit/test/accessibility/AccessibleTextHandler.java b/toolkit/test/accessibility/AccessibleTextHandler.java index 52b2ec53c52e..6fa083b22ea3 100644 --- a/toolkit/test/accessibility/AccessibleTextHandler.java +++ b/toolkit/test/accessibility/AccessibleTextHandler.java @@ -1,8 +1,9 @@ +import com.sun.star.accessibility.AccessibleTextType; +import com.sun.star.accessibility.TextSegment; import com.sun.star.accessibility.XAccessibleContext; import com.sun.star.accessibility.XAccessibleText; import com.sun.star.accessibility.XAccessibleEditableText; -import com.sun.star.accessibility.AccessibleTextType; import com.sun.star.awt.Rectangle; import com.sun.star.awt.Point; @@ -171,20 +172,21 @@ class AccessibleTextHandler extends NodeHandler // sWord + nStart mark the current word // make a node as soon as a new one is found; close the last // one at the end - String sWord = xText.getTextAtIndex(0, nTextType); - String sBefore = xText.getTextBeforeIndex(0, nTextType); - String sBehind = xText.getTextBehindIndex(0, nTextType); + TextSegment sWord = xText.getTextAtIndex(0, nTextType); + TextSegment sBefore = xText.getTextBeforeIndex(0, nTextType); + TextSegment sBehind = xText.getTextBehindIndex(0, nTextType); int nStart = 0; for(int i = 1; i < nLength; i++) { - String sTmp = xText.getTextAtIndex(i, nTextType); - String sTBef = xText.getTextBeforeIndex(i, nTextType); - String sTBeh = xText.getTextBehindIndex(i, nTextType); + TextSegment sTmp = xText.getTextAtIndex(i, nTextType); + TextSegment sTBef = xText.getTextBeforeIndex(i, nTextType); + TextSegment sTBeh = xText.getTextBehindIndex(i, nTextType); if( ! ( sTmp.equals( sWord ) && sTBef.equals( sBefore ) && sTBeh.equals( sBehind ) ) ) { aNode.addChild (new StringNode (textAtIndexNodeString( - nStart, i, sWord, sBefore, sBehind), aNode)); + nStart, i, + sWord.SegmentText, sBefore.SegmentText, sBehind.SegmentText), aNode)); sWord = sTmp; sBefore = sTBef; sBehind = sTBeh; @@ -194,12 +196,13 @@ class AccessibleTextHandler extends NodeHandler // don't generate more than 50 children. if (aNode.getChildCount() > 50) { - sWord = "..."; + sWord.SegmentText = "..."; break; } } aNode.addChild (new StringNode (textAtIndexNodeString( - nStart, nLength, sWord, sBefore, sBehind), aNode)); + nStart, nLength, + sWord.SegmentText, sBefore.SegmentText, sBehind.SegmentText), aNode)); } catch( IndexOutOfBoundsException e ) { @@ -323,7 +326,7 @@ class AccessibleTextHandler extends NodeHandler try { aPortion = xText.getTextAtIndex( - nIndex, AccessibleTextType.ATTRIBUTE_RUN); + nIndex, AccessibleTextType.ATTRIBUTE_RUN).SegmentText; } catch(com.sun.star.lang.IllegalArgumentException e) { diff --git a/toolkit/test/accessibility/SelectionDialog.java b/toolkit/test/accessibility/SelectionDialog.java index 732506a7e14b..a632e9f77a0c 100644 --- a/toolkit/test/accessibility/SelectionDialog.java +++ b/toolkit/test/accessibility/SelectionDialog.java @@ -147,7 +147,7 @@ class SelectionDialog extends JDialog void selectAll() { - mxSelection.selectAllAccessible(); + mxSelection.selectAllAccessibleChildren(); } void clearSelection() diff --git a/toolkit/test/accessibility/TopWindowListener.java b/toolkit/test/accessibility/TopWindowListener.java index 60ab4cd3faa6..c0aea933ece7 100644 --- a/toolkit/test/accessibility/TopWindowListener.java +++ b/toolkit/test/accessibility/TopWindowListener.java @@ -61,6 +61,7 @@ class TopWindowListener */ private void AddTopLevelNode (XAccessible xNewTopLevelObject) { + System.out.println ("adding top level window"); if (xNewTopLevelObject != null) { XAccessibleContext xContext = xNewTopLevelObject.getAccessibleContext(); diff --git a/toolkit/test/accessibility/makefile.mk b/toolkit/test/accessibility/makefile.mk index 5d0c1bc03374..973639d07849 100644 --- a/toolkit/test/accessibility/makefile.mk +++ b/toolkit/test/accessibility/makefile.mk @@ -117,9 +117,12 @@ Tools.clean .SETDIR=tools : dist: AccessibilityWorkBench.jar AccessibilityWorkBench.jar: $(JAVA_FILES:b:+".class") jawb.mf - +jar -cfm AccessibilityWorkBench.jar jawb.mf *.class + +jar -cfm AccessibilityWorkBench.jar jawb.mf *.class ov\*.class tools\*.class # Example of how to run the work bench. run: all +$(JAVA) -classpath $(CLASSPATH) AccessibilityWorkBench -p $(PORT_NUMBER) +runjar: all dist + +$(JAVA) -classpath $(CLASSPATH) -jar AccessibilityWorkBench.jar -p $(PORT_NUMBER) + diff --git a/toolkit/test/accessibility/ov/SelectionView.java b/toolkit/test/accessibility/ov/SelectionView.java index 723c2a4ea0be..a71f242420ba 100644 --- a/toolkit/test/accessibility/ov/SelectionView.java +++ b/toolkit/test/accessibility/ov/SelectionView.java @@ -179,7 +179,7 @@ class SelectionView void SelectAll() { - mxSelection.selectAllAccessible(); + mxSelection.selectAllAccessibleChildren(); } void ClearSelection() diff --git a/toolkit/test/accessibility/tools/NameProvider.java b/toolkit/test/accessibility/tools/NameProvider.java index 615c00f6dded..d9bcab802cbf 100644 --- a/toolkit/test/accessibility/tools/NameProvider.java +++ b/toolkit/test/accessibility/tools/NameProvider.java @@ -82,7 +82,7 @@ public class NameProvider maStateMap.put (new Integer (AccessibleStateType.ARMED), "ARMED"); maStateMap.put (new Integer (AccessibleStateType.BUSY), "BUSY"); maStateMap.put (new Integer (AccessibleStateType.CHECKED), "CHECKED"); - maStateMap.put (new Integer (AccessibleStateType.COLLAPSED), "COLLAPSED"); + // maStateMap.put (new Integer (AccessibleStateType.COLLAPSED), "COLLAPSED"); maStateMap.put (new Integer (AccessibleStateType.DEFUNC), "DEFUNC"); maStateMap.put (new Integer (AccessibleStateType.EDITABLE), "EDITABLE"); maStateMap.put (new Integer (AccessibleStateType.ENABLED), "ENABLED"); |