Kaydet (Commit) a5ef59d4 authored tarafından Noel Grandin's avatar Noel Grandin

cid#1326132 Logically dead code

Change-Id: I4bab8a3fd8532865086d664062ce45ebdf4373f0
üst 11f40bfa
...@@ -209,7 +209,12 @@ public class _XAccessibleComponent extends MultiMethodTest { ...@@ -209,7 +209,12 @@ public class _XAccessibleComponent extends MultiMethodTest {
boolean result = true; boolean result = true;
XAccessibleComponent[] children = getChildrenComponents(); XAccessibleComponent[] children = getChildrenComponents();
if (children.length > 0) { if (children.length == 0) {
log.println("There are no children supporting XAccessibleComponent");
tRes.tested("getAccessibleAtPoint()", result);
return;
}
for (int i = 0; i < children.length; i++) { for (int i = 0; i < children.length; i++) {
Rectangle chBnd = children[i].getBounds(); Rectangle chBnd = children[i].getBounds();
...@@ -235,7 +240,6 @@ public class _XAccessibleComponent extends MultiMethodTest { ...@@ -235,7 +240,6 @@ public class _XAccessibleComponent extends MultiMethodTest {
if (!isShowing) { if (!isShowing) {
log.println("Child is invisible - OK"); log.println("Child is invisible - OK");
continue; continue;
} }
...@@ -250,7 +254,7 @@ public class _XAccessibleComponent extends MultiMethodTest { ...@@ -250,7 +254,7 @@ public class _XAccessibleComponent extends MultiMethodTest {
curY--; curY--;
} }
if ((curX == chBnd.Width) && isShowing) { if (curX == chBnd.Width) {
log.println("Couldn't find a point with containsPoint"); log.println("Couldn't find a point with containsPoint");
continue; continue;
...@@ -264,7 +268,7 @@ public class _XAccessibleComponent extends MultiMethodTest { ...@@ -264,7 +268,7 @@ public class _XAccessibleComponent extends MultiMethodTest {
Point p = new Point(chBnd.X + curX,chBnd.X + curX); Point p = new Point(chBnd.X + curX,chBnd.X + curX);
if (isCovered(p) && isShowing) { if (isCovered(p)) {
log.println( log.println(
"Child might be covered by another and can't be reached"); "Child might be covered by another and can't be reached");
MightBeCovered = true; MightBeCovered = true;
...@@ -277,11 +281,7 @@ public class _XAccessibleComponent extends MultiMethodTest { ...@@ -277,11 +281,7 @@ public class _XAccessibleComponent extends MultiMethodTest {
(chBnd.X + curX) + "," + (chBnd.Y + curY) + (chBnd.X + curX) + "," + (chBnd.Y + curY) +
") - FAILED"); ") - FAILED");
if (isShowing) {
result = false; result = false;
} else {
result &= true;
}
} else { } else {
XAccessible xAccCh = UnoRuntime.queryInterface( XAccessible xAccCh = UnoRuntime.queryInterface(
XAccessible.class, XAccessible.class,
...@@ -370,10 +370,6 @@ public class _XAccessibleComponent extends MultiMethodTest { ...@@ -370,10 +370,6 @@ public class _XAccessibleComponent extends MultiMethodTest {
} }
} }
} }
} else {
log.println("There are no children supporting " +
"XAccessibleComponent");
}
tRes.tested("getAccessibleAtPoint()", result); tRes.tested("getAccessibleAtPoint()", result);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment