diff options
Diffstat (limited to 'qadevOOo/tests/java/ifc/accessibility')
12 files changed, 166 insertions, 166 deletions
diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessible.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessible.java index f4f302114c9d..0fe7c890e378 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessible.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessible.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleAction.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleAction.java index f9ef9e52c1e6..8518931c03c2 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleAction.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleAction.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java index c5e302451c21..958d703047dd 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleComponent.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -84,7 +84,7 @@ public class _XAccessibleComponent extends MultiMethodTest { int curX = 0; //while (!oObj.containsPoint(new Point(curX, bounds.Y)) && curX < bounds.Width+bounds.X) { - while (!oObj.containsPoint(new Point(curX, 0)) && + while (!oObj.containsPoint(new Point(curX, 0)) && (curX < bounds.Width)) { curX++; } @@ -93,7 +93,7 @@ public class _XAccessibleComponent extends MultiMethodTest { //if ((bounds.X <= curX) && (curX < bounds.Width+bounds.X)) { if (curX < bounds.Width) { - log.println("Upper bound of box containsPoint point (" + curX + + log.println("Upper bound of box containsPoint point (" + curX + ",0) - OK"); } else { log.println( @@ -104,9 +104,9 @@ public class _XAccessibleComponent extends MultiMethodTest { curX = 0; //while (!oObj.containsPoint(new Point(curX, bounds.Y+bounds.Height - 1)) - while (!oObj.containsPoint(new Point(curX, bounds.Height - 1)) && + while (!oObj.containsPoint(new Point(curX, bounds.Height - 1)) && (curX < bounds.Width)) { - log.println("containsPoint returns false for (" + curX + "," + + log.println("containsPoint returns false for (" + curX + "," + bounds.Height + ")"); curX++; } @@ -115,7 +115,7 @@ public class _XAccessibleComponent extends MultiMethodTest { //if ((bounds.X <= curX) && (curX < bounds.Width+bounds.X)) { if (curX < bounds.Width) { - log.println("Lower bound of box containsPoint point (" + curX + + log.println("Lower bound of box containsPoint point (" + curX + "," + (bounds.Height - 1) + ") - OK"); } else { log.println( @@ -126,7 +126,7 @@ public class _XAccessibleComponent extends MultiMethodTest { int curY = 0; //while (!oObj.containsPoint(new Point(bounds.X, curY)) && curY < bounds.Height+bounds.Y) { - while (!oObj.containsPoint(new Point(0, curY)) && + while (!oObj.containsPoint(new Point(0, curY)) && (curY < bounds.Height)) { curY++; } @@ -135,7 +135,7 @@ public class _XAccessibleComponent extends MultiMethodTest { //if ((bounds.Y <= curY) && (curY < bounds.Height+bounds.Y)) { if (curY < bounds.Height) { - log.println("Left bound of box containsPoint point (0," + curY + + log.println("Left bound of box containsPoint point (0," + curY + ") - OK"); } else { log.println( @@ -147,7 +147,7 @@ public class _XAccessibleComponent extends MultiMethodTest { //while (!oObj.containsPoint(new Point(bounds.X+bounds.Width - 1, curY)) // && curY < bounds.Height+bounds.Y) { - while (!oObj.containsPoint(new Point(bounds.Width - 1, curY)) && + while (!oObj.containsPoint(new Point(bounds.Width - 1, curY)) && (curY < bounds.Height)) { curY++; } @@ -156,7 +156,7 @@ public class _XAccessibleComponent extends MultiMethodTest { //if ((bounds.Y <= curY) && (curY < bounds.Height + bounds.Y)) { if (curY < bounds.Height) { - log.println("Right bound of box containsPoint point (" + + log.println("Right bound of box containsPoint point (" + (bounds.Width - 1) + "," + curY + ") - OK"); } else { log.println( @@ -185,7 +185,7 @@ public class _XAccessibleComponent extends MultiMethodTest { } if (locRes) { - log.println("Outer upper and lower bounds contain no component " + + log.println("Outer upper and lower bounds contain no component " + "points - OK"); } else { result = false; @@ -211,7 +211,7 @@ public class _XAccessibleComponent extends MultiMethodTest { } if (locRes) { - log.println("Outer left and right bounds contain no component " + + log.println("Outer left and right bounds contain no component " + "points - OK"); } else { result = false; @@ -244,20 +244,20 @@ public class _XAccessibleComponent extends MultiMethodTest { continue; } - log.println("Checking child with bounds " + "(" + chBnd.X + - "," + chBnd.Y + "),(" + chBnd.Width + "," + - chBnd.Height + "): " + + log.println("Checking child with bounds " + "(" + chBnd.X + + "," + chBnd.Y + "),(" + chBnd.Width + "," + + chBnd.Height + "): " + util.AccessibilityTools.accessibleToString( children[i])); XAccessibleContext xAc = (XAccessibleContext) UnoRuntime.queryInterface( - XAccessibleContext.class, + XAccessibleContext.class, children[i]); boolean MightBeCovered = false; boolean isShowing = xAc.getAccessibleStateSet() .contains(com.sun.star.accessibility.AccessibleStateType.SHOWING); - log.println("\tStateType containsPoint SHOWING: " + + log.println("\tStateType containsPoint SHOWING: " + isShowing); if (!isShowing) { @@ -271,7 +271,7 @@ public class _XAccessibleComponent extends MultiMethodTest { int curX = chBnd.Width / 2; int curY = chBnd.Height / 2; - while (!children[i].containsPoint(new Point(curX, curY)) && + while (!children[i].containsPoint(new Point(curX, curY)) && (curX > 0) && (curY > 0)) { curX--; curY--; @@ -287,23 +287,23 @@ public class _XAccessibleComponent extends MultiMethodTest { // trying the point laying on child XAccessible xAcc = oObj.getAccessibleAtPoint( - new Point(chBnd.X + curX, + new Point(chBnd.X + curX, chBnd.Y + curY)); - + Point p = new Point(chBnd.X + curX,chBnd.X + curX); - + if (isCovered(p) && isShowing) { log.println( "Child might be covered by another and can't be reached"); MightBeCovered = true; } - + KnownBounds.add(chBnd); if (xAcc == null) { - log.println("The child not found at point (" + - (chBnd.X + curX) + "," + (chBnd.Y + curY) + + log.println("The child not found at point (" + + (chBnd.X + curX) + "," + (chBnd.Y + curY) + ") - FAILED"); if (isShowing) { @@ -313,12 +313,12 @@ public class _XAccessibleComponent extends MultiMethodTest { } } else { XAccessible xAccCh = (XAccessible) UnoRuntime.queryInterface( - XAccessible.class, + XAccessible.class, children[i]); XAccessibleContext xAccC = (XAccessibleContext) UnoRuntime.queryInterface( - XAccessibleContext.class, + XAccessibleContext.class, children[i]); - log.println("Child found at point (" + (chBnd.X + curX) + + log.println("Child found at point (" + (chBnd.X + curX) + "," + (chBnd.Y + curY) + ") - OK"); boolean res = false; @@ -353,24 +353,24 @@ public class _XAccessibleComponent extends MultiMethodTest { log.print("is hidden behind the found Child "); log.println(xAcc.getAccessibleContext() .getAccessibleName() + " - OK"); - } else { + } else { log.println( "The children found is not the same"); log.println("Expected: " + expName); log.println("Description: " + expDesc); - log.println("Found: " + + log.println("Found: " + xAcc.getAccessibleContext() .getAccessibleName()); - log.println("Description: " + + log.println("Description: " + xAcc.getAccessibleContext() .getAccessibleDescription()); if (MightBeCovered) { log.println("... Child is covered by another - OK"); - } else { + } else { log.println("... FAILED"); result = false; } - + } } } @@ -381,26 +381,26 @@ public class _XAccessibleComponent extends MultiMethodTest { new Point(chBnd.X - 1, chBnd.Y - 1)); if (xAcc == null) { - log.println("No children found at point (" + - (chBnd.X - 1) + "," + (chBnd.Y - 1) + + log.println("No children found at point (" + + (chBnd.X - 1) + "," + (chBnd.Y - 1) + ") - OK"); result &= true; } else { XAccessible xAccCh = (XAccessible) UnoRuntime.queryInterface( - XAccessible.class, + XAccessible.class, children[i]); boolean res = util.AccessibilityTools.equals(xAccCh, xAcc); if (res) { - log.println("The same child found outside " + - "its bounds at (" + (chBnd.X - 1) + "," + + log.println("The same child found outside " + + "its bounds at (" + (chBnd.X - 1) + "," + (chBnd.Y - 1) + ") - FAILED"); result = false; } } } } else { - log.println("There are no children supporting " + + log.println("There are no children supporting " + "XAccessibleComponent"); } @@ -419,9 +419,9 @@ public class _XAccessibleComponent extends MultiMethodTest { bounds = oObj.getBounds(); result &= ((bounds != null) && (bounds.X >= 0) && (bounds.Y >= 0) && (bounds.Width > 0) && (bounds.Height > 0)); - log.println("Bounds = " + - ((bounds != null) - ? ("(" + bounds.X + "," + bounds.Y + "),(" + + log.println("Bounds = " + + ((bounds != null) + ? ("(" + bounds.X + "," + bounds.Y + "),(" + bounds.Width + "," + bounds.Height + ")") : "null")); tRes.tested("getBounds()", result); @@ -474,7 +474,7 @@ public class _XAccessibleComponent extends MultiMethodTest { if (parent != null) { Point parLoc = parent.getLocationOnScreen(); - log.println("Parent location is (" + parLoc.X + "," + parLoc.Y + + log.println("Parent location is (" + parLoc.X + "," + parLoc.Y + ")"); result &= ((parLoc.X + bounds.X) == loc.X); @@ -550,7 +550,7 @@ public class _XAccessibleComponent extends MultiMethodTest { XAccessible child = xAccCon.getAccessibleChild(i); XAccessibleContext xAccConCh = child.getAccessibleContext(); XAccessibleComponent xChAccComp = (XAccessibleComponent) UnoRuntime.queryInterface( - XAccessibleComponent.class, + XAccessibleComponent.class, xAccConCh); if (xChAccComp != null) { @@ -592,7 +592,7 @@ public class _XAccessibleComponent extends MultiMethodTest { XAccessibleContext xAccConPar = xAccPar.getAccessibleContext(); XAccessibleComponent parent = (XAccessibleComponent) UnoRuntime.queryInterface( - XAccessibleComponent.class, + XAccessibleComponent.class, xAccConPar); if (parent == null) { @@ -631,9 +631,9 @@ public class _XAccessibleComponent extends MultiMethodTest { disposeEnvironment(); } } - + private boolean isCovered(Point p) { - int elements = KnownBounds.size(); + int elements = KnownBounds.size(); boolean Covered = false; for (int k=0;k<elements;k++) { Rectangle known = (Rectangle) KnownBounds.get(k); @@ -641,11 +641,11 @@ public class _XAccessibleComponent extends MultiMethodTest { Covered &= (known.Y < p.Y); Covered &= (p.Y < known.Y+known.Height); Covered &= (p.X < known.X+known.Width); - + if (Covered) { break; } - } + } return Covered; } }
\ No newline at end of file diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java index 47b24a337f2c..a71e8da71b44 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleContext.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -93,7 +93,7 @@ public class _XAccessibleContext extends MultiMethodTest { requiredMethod("getAccessibleChildCount()"); log.println("testing 'getAccessibleChild()'..."); - + boolean bOK = true; int counter = childCount; @@ -106,72 +106,72 @@ public class _XAccessibleContext extends MultiMethodTest { XAccessible ch = oObj.getAccessibleChild(i); XAccessibleContext chAC = ch.getAccessibleContext(); - log.println("## Child " + i + ": " + + log.println("## Child " + i + ": " + chAC.getAccessibleDescription()); if (!AccessibilityTools.equals(chAC.getAccessibleParent() - .getAccessibleContext(), + .getAccessibleContext(), oObj)) { - log.println("The parent of child and component " + + log.println("The parent of child and component " + "itself differ."); log.println("\tRole:"); - log.println("Getting: " + + log.println("Getting: " + chAC.getAccessibleParent() .getAccessibleContext() .getAccessibleRole()); log.println("Expected: " + oObj.getAccessibleRole()); log.println("\tImplementationName:"); - log.println("Getting: " + + log.println("Getting: " + util.utils.getImplName( chAC.getAccessibleParent() .getAccessibleContext())); log.println("Expected: " + util.utils.getImplName(oObj)); log.println("\tAccessibleDescription:"); - log.println("Getting(Description): " + + log.println("Getting(Description): " + chAC.getAccessibleParent() .getAccessibleContext() .getAccessibleDescription()); - log.println("Expected(Description): " + + log.println("Expected(Description): " + oObj.getAccessibleDescription()); log.println("\tAccessibleName:"); - log.println("Getting(Name): " + + log.println("Getting(Name): " + chAC.getAccessibleParent() .getAccessibleContext() .getAccessibleName()); - log.println("Expected(Name): " + + log.println("Expected(Name): " + oObj.getAccessibleName()); log.println("\tChildCount:"); - log.println("Getting: " + + log.println("Getting: " + chAC.getAccessibleParent() .getAccessibleContext() .getAccessibleChildCount()); - log.println("Expected: " + + log.println("Expected: " + oObj.getAccessibleChildCount()); log.println("\tParentName:"); - log.println("Getting (Name): " + + log.println("Getting (Name): " + chAC.getAccessibleParent() .getAccessibleContext() .getAccessibleParent() .getAccessibleContext() .getAccessibleName()); - log.println("Expected(Name): " + + log.println("Expected(Name): " + oObj.getAccessibleParent() .getAccessibleContext() .getAccessibleName()); - + log.println("##"); bOK = false; } else { log.println("Role: " + chAC.getAccessibleRole()); log.println("Name: " + chAC.getAccessibleName()); - log.println("IndexInParent: " + + log.println("IndexInParent: " + chAC.getAccessibleIndexInParent()); - log.println("ImplementationName: " + + log.println("ImplementationName: " + util.utils.getImplName(chAC)); } } catch (com.sun.star.lang.IndexOutOfBoundsException e) { @@ -222,7 +222,7 @@ public class _XAccessibleContext extends MultiMethodTest { } else { bOK &= AccessibilityTools.equals(parentAC.getAccessibleChild( idx) - .getAccessibleContext(), + .getAccessibleContext(), oObj); } @@ -230,7 +230,7 @@ public class _XAccessibleContext extends MultiMethodTest { log.println("Expected: " + util.utils.getImplName(oObj)); if (parentAC.getAccessibleChild(idx) != null) { - log.println("Getting: " + + log.println("Getting: " + util.utils.getImplName( parentAC.getAccessibleChild(idx) .getAccessibleContext())); @@ -326,12 +326,12 @@ public class _XAccessibleContext extends MultiMethodTest { e.printStackTrace(log); } - tRes.tested("getLocale()", + tRes.tested("getLocale()", (loc != null) && (loc.Language.length() > 0)); } - protected boolean checkStates(String[] expectedStateNames, - short[] expectedStates, + protected boolean checkStates(String[] expectedStateNames, + short[] expectedStates, XAccessibleStateSet set) { boolean works = true; @@ -339,11 +339,11 @@ public class _XAccessibleContext extends MultiMethodTest { boolean contains = set.contains(expectedStates[k]); if (contains) { - log.println("Set contains " + expectedStateNames[k] + + log.println("Set contains " + expectedStateNames[k] + " ... OK"); works &= true; } else { - log.println("Set doesn't contain " + expectedStateNames[k] + + log.println("Set doesn't contain " + expectedStateNames[k] + " ... FAILED"); works &= false; } diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEditableText.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEditableText.java index eac528b41121..2d3162adbc2f 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEditableText.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEditableText.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEventBroadcaster.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEventBroadcaster.java index c1cb7302efce..cee6b4c36369 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEventBroadcaster.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleEventBroadcaster.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -81,11 +81,11 @@ public class _XAccessibleEventBroadcaster extends MultiMethodTest { if (old instanceof com.sun.star.accessibility.XAccessible) { System.out.println("Old: "+((XAccessible)old).getAccessibleContext().getAccessibleName()); } - + Object nev=ev.NewValue; if (nev instanceof com.sun.star.accessibility.XAccessible) { System.out.println("New: "+((XAccessible)nev).getAccessibleContext().getAccessibleName()); - } + } notifiedEvent = ev; } @@ -109,7 +109,7 @@ public class _XAccessibleEventBroadcaster extends MultiMethodTest { } EventProducer prod = null ; - EvListener list = new EvListener(); + EvListener list = new EvListener(); /** * Adds two listeners and fires event by mean of object relation. <p> @@ -117,19 +117,19 @@ public class _XAccessibleEventBroadcaster extends MultiMethodTest { */ public void _addEventListener() { log.println("adding listener"); - oObj.addEventListener(list); + oObj.addEventListener(list); boolean isTransient = chkTransient(tEnv.getTestObject()); log.println("fire event"); prod.fireEvent() ; - try { + try { Thread.sleep(3000); } catch (InterruptedException ex) { - } - + } + boolean works = true; - + if (list.notifiedEvent == null) { if (!isTransient) { log.println("listener wasn't called"); @@ -137,12 +137,12 @@ public class _XAccessibleEventBroadcaster extends MultiMethodTest { } else { log.println("Object is Transient, listener isn't expected to be called"); } - oObj.removeEventListener(list); + oObj.removeEventListener(list); } - + if (EventMsg != null) { log.println(EventMsg); - tRes.tested("addEventListener()", Status.skipped(true) ); + tRes.tested("addEventListener()", Status.skipped(true) ); return; } @@ -163,7 +163,7 @@ public class _XAccessibleEventBroadcaster extends MultiMethodTest { public void _removeEventListener() { requiredMethod("addEventListener()"); - list.notifiedEvent = null; + list.notifiedEvent = null; log.println("remove listener"); oObj.removeEventListener(list); @@ -183,11 +183,11 @@ public class _XAccessibleEventBroadcaster extends MultiMethodTest { tRes.tested("removeEventListener()", list.notifiedEvent == null); - } - + } + protected static boolean chkTransient(Object Testcase) { boolean ret = false; - XAccessibleContext accCon = (XAccessibleContext) + XAccessibleContext accCon = (XAccessibleContext) UnoRuntime.queryInterface(XAccessibleContext.class,Testcase); if (accCon.getAccessibleStateSet().contains( com.sun.star.accessibility.AccessibleStateType.TRANSIENT)){ @@ -196,17 +196,17 @@ public class _XAccessibleEventBroadcaster extends MultiMethodTest { throw new lib.StatusException(lib.Status.failed("Parent doesn't manage descendents")); } ret=true; - } + } return ret; - } - + } + /** * Forces environment recreation. */ protected void after() { if (destroy) disposeEnvironment(); } - - + + } diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleExtendedComponent.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleExtendedComponent.java index 422cfa96e334..a0bc677a42c9 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleExtendedComponent.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleExtendedComponent.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleImage.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleImage.java index 7a4dfafff615..cc9b1dc3fc85 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleImage.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleImage.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleSelection.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleSelection.java index e575e332845b..199cc62a7f27 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleSelection.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleSelection.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -221,7 +221,7 @@ public class _XAccessibleSelection extends MultiMethodTest { oObj.selectAccessibleChild(k); shortWait(); isSelected = oObj.isAccessibleChildSelected(k); - log.println("isAccessibleChildSelected - " + + log.println("isAccessibleChildSelected - " + isSelected); res &= isSelected; } else { @@ -258,7 +258,7 @@ public class _XAccessibleSelection extends MultiMethodTest { if ((childCount > 0) && !OneAlwaysSelected) { try { - log.print("isAccessibleChildSelected(" + (childCount - 1) + + log.print("isAccessibleChildSelected(" + (childCount - 1) + ")? "); boolean isSel = oObj.isAccessibleChildSelected(childCount - 1); @@ -305,7 +305,7 @@ public class _XAccessibleSelection extends MultiMethodTest { log.println(isSelected); res = isSelected; - log.print("isAccessibleChildSelected(" + (childCount - 1) + + log.print("isAccessibleChildSelected(" + (childCount - 1) + ")? "); isSelected = oObj.isAccessibleChildSelected(childCount - 1); log.println(isSelected); @@ -350,11 +350,11 @@ public class _XAccessibleSelection extends MultiMethodTest { oObj.selectAccessibleChild(i); long curtime = System.currentTimeMillis(); long checktime = System.currentTimeMillis(); - + while (!oObj.isAccessibleChildSelected(i) && (checktime-curtime<5000)) { checktime = System.currentTimeMillis(); } - + log.println("OK"); } } @@ -367,9 +367,9 @@ public class _XAccessibleSelection extends MultiMethodTest { int sCount = chkSelectable(tEnv.getTestObject()); log.println("Found " + sCount + " selectable Childs"); - + int selectedCount = oObj.getSelectedAccessibleChildCount(); - log.println("After selecting all accessible " + selectedCount + + log.println("After selecting all accessible " + selectedCount + " are selected"); boolean res = true; @@ -443,7 +443,7 @@ public class _XAccessibleSelection extends MultiMethodTest { if (isSelectable(tEnv.getTestObject(), k)) { oObj.selectAccessibleChild(k); shortWait(); - log.println("selected child count: " + + log.println("selected child count: " + oObj.getSelectedAccessibleChildCount()); XAccessible selChild = oObj.getSelectedAccessibleChild(0); res &= (selChild != null); @@ -521,7 +521,7 @@ public class _XAccessibleSelection extends MultiMethodTest { } int newSelCount = oObj.getSelectedAccessibleChildCount(); - log.println("getSelectedAccessibleChildCount():" + + log.println("getSelectedAccessibleChildCount():" + newSelCount); if (OneAlwaysSelected && (selCount == 1)) { @@ -579,7 +579,7 @@ public class _XAccessibleSelection extends MultiMethodTest { //selecting menuitems or the separator will lead to closing the menu if ((accCon.getAccessibleChild(index).getAccessibleContext() - .getAccessibleRole() == AccessibleRole.MENU_ITEM) || + .getAccessibleRole() == AccessibleRole.MENU_ITEM) || (accCon.getAccessibleChild(index).getAccessibleContext() .getAccessibleRole() == AccessibleRole.SEPARATOR)) { res = false; diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleTable.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleTable.java index fa851bb79ea2..4a1ec00e11e8 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleTable.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleTable.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java index c72c25590396..60afee689fd8 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleText.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -117,7 +117,7 @@ public class _XAccessibleText extends MultiMethodTest { if (component == null) { component = (XAccessibleComponent) UnoRuntime.queryInterface( - XAccessibleComponent.class, + XAccessibleComponent.class, tEnv.getTestObject()); } @@ -260,7 +260,7 @@ public class _XAccessibleText extends MultiMethodTest { res &= isEqCh; if (!isEqCh) { - log.println("At the position " + i + + log.println("At the position " + i + "was expected character: " + text.charAt(i)); log.println("but was returned: " + ch); @@ -316,7 +316,7 @@ public class _XAccessibleText extends MultiMethodTest { try { log.println("getCharacterAttributes(chCount-1)"); - PropertyValue[] props = oObj.getCharacterAttributes(chCount - 1, + PropertyValue[] props = oObj.getCharacterAttributes(chCount - 1, attr); res &= (props != null); } catch (com.sun.star.lang.IndexOutOfBoundsException e) { @@ -379,7 +379,7 @@ public class _XAccessibleText extends MultiMethodTest { try { for (int i = 0; i < lastIndex; i++) { log.println("getCharacterBounds(" + i + ")"); - chBounds = oObj.getCharacterBounds(i); + chBounds = oObj.getCharacterBounds(i); boolean localres = true; localres = chBounds.X >= 0; @@ -390,13 +390,13 @@ public class _XAccessibleText extends MultiMethodTest { localres &= ((chBounds.Y + chBounds.Height) > 0); if (!localres) { - log.println("Text at this place: "+oObj.getCharacter(i)); + log.println("Text at this place: "+oObj.getCharacter(i)); log.println("Character bounds outside component"); - log.println("Character rect: " + chBounds.X + ", " + - chBounds.Y + ", " + chBounds.Width + ", " + + log.println("Character rect: " + chBounds.X + ", " + + chBounds.Y + ", " + chBounds.Width + ", " + chBounds.Height); - log.println("Component rect: " + bounds.X + ", " + - bounds.Y + ", " + bounds.Width + ", " + + log.println("Component rect: " + bounds.X + ", " + + bounds.Y + ", " + bounds.Width + ", " + bounds.Height); res &= localres; } @@ -435,7 +435,7 @@ public class _XAccessibleText extends MultiMethodTest { * </ul> */ public void _getIndexAtPoint() { - //requiredMethod("getCharacterBounds()"); + //requiredMethod("getCharacterBounds()"); boolean res = true; log.print("getIndexAtPoint(-1, -1):"); @@ -471,13 +471,13 @@ public class _XAccessibleText extends MultiMethodTest { int y = aRect.Y + (aRect.Height / 2); Point aPoint = new Point(x, y); int nIndex = oObj.getIndexAtPoint(aPoint); - + x = aRect.X; y = aRect.Y + (aRect.Height / 2); aPoint = new Point(x, y); - int left = oObj.getIndexAtPoint(aPoint); - - + int left = oObj.getIndexAtPoint(aPoint); + + int[] previous = (int[]) tEnv.getObjRelation("PreviousUsed"); @@ -492,12 +492,12 @@ public class _XAccessibleText extends MultiMethodTest { if (nIndex != i) { // for some letters the center of the rectangle isn't recognised // in this case we are happy if the left border of the rectangle - // returns the correct value. + // returns the correct value. if (left !=i) { - log.println("## Method didn't work for Point (" + x + "," + y + + log.println("## Method didn't work for Point (" + x + "," + y + ")"); log.println("Expected Index " + i); - log.println("Gained Index: " + nIndex); + log.println("Gained Index: " + nIndex); log.println("Left Border: "+left); log.println("CharacterAtIndex: " + text); res &= false; @@ -748,7 +748,7 @@ public class _XAccessibleText extends MultiMethodTest { boolean res = true; boolean locRes = true; - + String txtRange = ""; try { @@ -761,7 +761,7 @@ public class _XAccessibleText extends MultiMethodTest { res &= locRes; if (!locRes) { - log.println("Was expected: " + + log.println("Was expected: " + text.substring(1, chCount - 2)); } } @@ -774,7 +774,7 @@ public class _XAccessibleText extends MultiMethodTest { res &= locRes; if (!locRes) { - log.println("Was expected: " + + log.println("Was expected: " + text.substring(0, chCount - 1)); } @@ -853,7 +853,7 @@ public class _XAccessibleText extends MultiMethodTest { try { log.print("getTextAtIndex(-1, AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextAtIndex(-1, + txt = oObj.getTextAtIndex(-1, AccessibleTextType.PARAGRAPH); log.println("Exception was expected"); res &= false; @@ -866,10 +866,10 @@ public class _XAccessibleText extends MultiMethodTest { } try { - log.print("getTextAtIndex(chCount+1," + + log.print("getTextAtIndex(chCount+1," + " AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextAtIndex(chCount + 1, + txt = oObj.getTextAtIndex(chCount + 1, AccessibleTextType.PARAGRAPH); log.println("Exception was expected"); res &= false; @@ -882,14 +882,14 @@ public class _XAccessibleText extends MultiMethodTest { } try { - log.print("getTextAtIndex(chCount," + + log.print("getTextAtIndex(chCount," + " AccessibleTextType.WORD):"); txt = oObj.getTextAtIndex(chCount, AccessibleTextType.WORD); log.println("'" + txt.SegmentText + "'"); res &= compareLength(0,txt.SegmentText); if (!tEnv.getTestCase().getObjectName().equals("SmGraphicAccessible")) { - log.print("getTextAtIndex(1," + + log.print("getTextAtIndex(1," + " AccessibleTextType.PARAGRAPH):"); txt = oObj.getTextAtIndex(1, AccessibleTextType.PARAGRAPH); log.println("'" + txt.SegmentText + "'"); @@ -927,7 +927,7 @@ public class _XAccessibleText extends MultiMethodTest { try { log.print("getTextBeforeIndex(-1, AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextBeforeIndex(-1, + txt = oObj.getTextBeforeIndex(-1, AccessibleTextType.PARAGRAPH); log.println("Exception was expected"); res &= false; @@ -940,10 +940,10 @@ public class _XAccessibleText extends MultiMethodTest { } try { - log.print("getTextBeforeIndex(chCount+1, " + + log.print("getTextBeforeIndex(chCount+1, " + "AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextBeforeIndex(chCount + 1, + txt = oObj.getTextBeforeIndex(chCount + 1, AccessibleTextType.PARAGRAPH); log.println("Exception was expected"); res &= false; @@ -957,31 +957,31 @@ public class _XAccessibleText extends MultiMethodTest { try { if (!tEnv.getTestCase().getObjectName().equals("SmGraphicAccessible")) { - log.print("getTextBeforeIndex(chCount," + + log.print("getTextBeforeIndex(chCount," + " AccessibleTextType.WORD):"); - txt = oObj.getTextBeforeIndex(chCount, + txt = oObj.getTextBeforeIndex(chCount, AccessibleTextType.WORD); log.println("'" + txt.SegmentText + "'"); res &= compareLength(chCount, txt.SegmentText); } - log.print("getTextBeforeIndex(1," + + log.print("getTextBeforeIndex(1," + " AccessibleTextType.PARAGRAPH):"); txt = oObj.getTextBeforeIndex(1, AccessibleTextType.PARAGRAPH); log.println("'" + txt.SegmentText + "'"); res &= compareLength(0, txt.SegmentText); - log.print("getTextBeforeIndex(chCount-1," + + log.print("getTextBeforeIndex(chCount-1," + " AccessibleTextType.CHARACTER):"); - txt = oObj.getTextBeforeIndex(chCount - 1, + txt = oObj.getTextBeforeIndex(chCount - 1, AccessibleTextType.CHARACTER); log.println("'" + txt.SegmentText + "'"); - res &= compareStrings(text.substring(chCount - 2, chCount - 1), + res &= compareStrings(text.substring(chCount - 2, chCount - 1), txt.SegmentText); if (chCount > 2) { - log.print("getTextBeforeIndex(2," + + log.print("getTextBeforeIndex(2," + " AccessibleTextType.CHARACTER):"); txt = oObj.getTextBeforeIndex(2, AccessibleTextType.CHARACTER); log.println("'" + txt.SegmentText + "'"); @@ -1019,7 +1019,7 @@ public class _XAccessibleText extends MultiMethodTest { try { log.print("getTextBehindIndex(-1, AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextBehindIndex(-1, + txt = oObj.getTextBehindIndex(-1, AccessibleTextType.PARAGRAPH); log.println("Exception was expected"); res &= false; @@ -1032,10 +1032,10 @@ public class _XAccessibleText extends MultiMethodTest { } try { - log.print("getTextBehindIndex(chCount+1, " + + log.print("getTextBehindIndex(chCount+1, " + "AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextBehindIndex(chCount + 1, + txt = oObj.getTextBehindIndex(chCount + 1, AccessibleTextType.PARAGRAPH); log.println("Exception was expected"); res &= false; @@ -1048,31 +1048,31 @@ public class _XAccessibleText extends MultiMethodTest { } try { - log.print("getTextBehindIndex(chCount," + + log.print("getTextBehindIndex(chCount," + " AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextBehindIndex(chCount, + txt = oObj.getTextBehindIndex(chCount, AccessibleTextType.PARAGRAPH); log.println("'" + txt.SegmentText + "'"); res &= (txt.SegmentText.length() == 0); - log.print("getTextBehindIndex(chCount-1," + + log.print("getTextBehindIndex(chCount-1," + " AccessibleTextType.PARAGRAPH):"); - txt = oObj.getTextBehindIndex(chCount - 1, + txt = oObj.getTextBehindIndex(chCount - 1, AccessibleTextType.PARAGRAPH); log.println("'" + txt.SegmentText + "'"); res &= (txt.SegmentText.length() == 0); - log.print("getTextBehindIndex(1," + + log.print("getTextBehindIndex(1," + " AccessibleTextType.CHARACTER):"); txt = oObj.getTextBehindIndex(1, AccessibleTextType.CHARACTER); log.println("'" + txt.SegmentText + "'"); res &= txt.SegmentText.equals(text.substring(2, 3)); if (chCount > 2) { - log.print("getTextBehindIndex(chCount-2," + + log.print("getTextBehindIndex(chCount-2," + " AccessibleTextType.CHARACTER):"); - txt = oObj.getTextBehindIndex(chCount - 2, + txt = oObj.getTextBehindIndex(chCount - 2, AccessibleTextType.CHARACTER); log.println("'" + txt.SegmentText + "'"); res &= txt.SegmentText.equals(text.substring(chCount - 1, chCount)); diff --git a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java index 201d5675ff0c..4364d709870b 100644 --- a/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java +++ b/qadevOOo/tests/java/ifc/accessibility/_XAccessibleValue.java @@ -1,7 +1,7 @@ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * + * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite @@ -134,7 +134,7 @@ public class _XAccessibleValue extends MultiMethodTest { boolean partResult=true; String noMax = "com.sun.star.comp.toolkit.AccessibleScrollBar"; String implName = util.utils.getImplName(oObj); - + if (tEnv.getObjRelation("ValueNotPersitent")!=null) { log.println("Excluded since it works like AccessibleAction"); tRes.tested("setCurrentValue()",Status.skipped(true)); @@ -151,12 +151,12 @@ public class _XAccessibleValue extends MultiMethodTest { Object setVal = getObjectValue(newVal, val.getClass()); result &= oObj.setCurrentValue(setVal); - + if (!result) { log.println("The value can't be set"); throw new StatusException(Status.skipped(true)); } - + double resVal = getDoubleValue(oObj.getCurrentValue()); log.println("Res value is " + resVal); @@ -174,8 +174,8 @@ public class _XAccessibleValue extends MultiMethodTest { log.println("Setting to "+ getObjectValue(maxVal, val.getClass())); resVal = getDoubleValue(oObj.getCurrentValue()); log.println("Result max value is " + resVal); - partResult = Math.abs(maxVal - resVal) < 0.00001; - + partResult = Math.abs(maxVal - resVal) < 0.00001; + if (implName.equals(noMax)) { log.println("If one sets the maximum value of a scroll bar with XScrollBar::setMaximum(),"+ "then XScrollBar::getValue() returns the maximum value minus the visible size of"+ @@ -183,14 +183,14 @@ public class _XAccessibleValue extends MultiMethodTest { //using abitrary Value, since we can't determine the resulting value partResult = resVal > 10; } - + result &=partResult; log.println("\t works: "+partResult); log.println("Checking truncating of min/max values"); oObj.setCurrentValue(getObjectValue(minVal - 1, val.getClass())); log.println("Setting to "+ getObjectValue(minVal -1 , val.getClass())); - resVal = getDoubleValue(oObj.getCurrentValue()); + resVal = getDoubleValue(oObj.getCurrentValue()); log.println("Result min value is " + resVal); result &= Math.abs(minVal - resVal) < 0.00001; log.println("\t works: "+(Math.abs(minVal - resVal) < 0.00001)); @@ -207,7 +207,7 @@ public class _XAccessibleValue extends MultiMethodTest { //using abitrary Value, since we can't determine the resulting value partResult = resVal > 10; } - + result &=partResult; log.println("\t works: "+partResult); } else { |