"," + chBnd.Y + "),(" + chBnd.Width + "," +
chBnd.Height + "): " +
util.AccessibilityTools.accessibleToString(
children[i]));
XAccessibleContext xAc = (XAccessibleContext) UnoRuntime.queryInterface(
XAccessibleContext.class,
children[i]);
boolean MightBeCovered = false;
boolean isShowing = xAc.getAccessibleStateSet()
.contains(com.sun.star.accessibility.AccessibleStateType.SHOWING);
log.println("\tStateType containsPoint SHOWING: " +
isShowing);
if (!isShowing) {
log.println("Child is invisible - OK");
continue;
}
log.println("finding the point which lies on the component");
int curX = chBnd.Width / 2;
int curY = chBnd.Height / 2;
while (!children[i].containsPoint(new Point(curX, curY)) &&
(curX > 0) && (curY > 0)) {
curX--;
curY--;
}
;
if ((curX == chBnd.Width) && isShowing) {
log.println("Couldn't find a point with containsPoint");
continue;
}
// trying the point laying on child
XAccessible xAcc = oObj.getAccessibleAtPoint(
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) +
") - FAILED");
if (isShowing) {
result = false;
} else {
result &= true;
}
} else {
XAccessible xAccCh = (XAccessible) UnoRuntime.queryInterface(
XAccessible.class,
children[i]);
XAccessibleContext xAccC = (XAccessibleContext) UnoRuntime.queryInterface(
XAccessibleContext.class,
children[i]);
log.println("Child found at point (" + (chBnd.X + curX) +
"," + (chBnd.Y + curY) + ") - OK");
boolean res = false;
int expIndex;
String expName;
String expDesc;
if (xAccCh != null) {
res = util.AccessibilityTools.equals(xAccCh, xAcc);
expIndex = xAccCh.getAccessibleContext()
.getAccessibleIndexInParent();
expName = xAccCh.getAccessibleContext()
.getAccessibleName();
expDesc = xAccCh.getAccessibleContext()
.getAccessibleDescription();
} else {
res = xAccC.getAccessibleName()
.equals(xAcc.getAccessibleContext()
.getAccessibleName());
expIndex = xAccC.getAccessibleIndexInParent();
expName = xAccC.getAccessibleName();
expDesc = xAccC.getAccessibleDescription();
}
if (!res) {
int gotIndex = xAcc.getAccessibleContext()
.getAccessibleIndexInParent();