Kaydet (Commit) 32ca4302 authored tarafından Caolán McNamara's avatar Caolán McNamara

coverity#1326136 Logically dead code

Change-Id: I17c0f7e22e63823c16ebcdc1db1e4f618aad22a1
üst 10db9232
......@@ -147,7 +147,6 @@ public class _XSheetCellCursor extends MultiMethodTest {
public void _collapseToCurrentRegion(){
boolean bResult = true;
int width = 4, height = 4;
int leftCol = -1, topRow = -1;
XSpreadsheet oSheet = oObj.getSpreadsheet();
UnoRuntime.queryInterface(
......@@ -165,37 +164,6 @@ public class _XSheetCellCursor extends MultiMethodTest {
+ " but it is " + cols + "x" + rows);
}
// if previous test was successful try more complicated case
if (bResult) {
if (leftCol != -1 && topRow != -1) {
try {
oSheet.getCellByPosition(
leftCol + width, topRow + height).setValue(1);
} catch (com.sun.star.lang.IndexOutOfBoundsException e) {
log.print("Can't get cell by position:");
e.printStackTrace(log);
bResult = false;
}
oObj.collapseToCurrentRegion() ;
// checking results
cols = UnoRuntime.queryInterface(
XColumnRowRange.class, oObj).getColumns().getCount();
rows = UnoRuntime.queryInterface(
XColumnRowRange.class, oObj).getRows().getCount();
if (cols == width + 1 && rows == height + 1) {
bResult &= true;
} else {
bResult = false;
log.println("After collapseToCurrentRegion() call [2]"
+ " region must have size " + (width+1) + "x"
+ (height + 1) + " but it is " + cols + "x" + rows );
}
}
}
tRes.tested("collapseToCurrentRegion()", bResult);
// restore original size
......
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