mirror of https://github.com/apache/poi.git
update TestXSSFSheetShiftRows
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1918978 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
750657064a
commit
d090c6b77a
|
@ -539,12 +539,17 @@ public final class TestXSSFSheetShiftRows extends BaseTestSheetShiftRows {
|
||||||
}
|
}
|
||||||
final int firstCol = 1;
|
final int firstCol = 1;
|
||||||
final int secondCol = firstCol + 1;
|
final int secondCol = firstCol + 1;
|
||||||
|
final int thirdCol = secondCol + 1;
|
||||||
sheet.addMergedRegion(new CellRangeAddress(0, 0, firstCol, secondCol));
|
sheet.addMergedRegion(new CellRangeAddress(0, 0, firstCol, secondCol));
|
||||||
sheet.addMergedRegion(new CellRangeAddress(1, 2, firstCol, firstCol));
|
sheet.addMergedRegion(new CellRangeAddress(1, 2, firstCol, firstCol));
|
||||||
sheet.addMergedRegion(new CellRangeAddress(3, 3, firstCol, secondCol));
|
sheet.addMergedRegion(new CellRangeAddress(3, 3, secondCol, thirdCol));
|
||||||
assertEquals(3, sheet.getNumMergedRegions());
|
assertEquals(3, sheet.getNumMergedRegions());
|
||||||
sheet.shiftColumns(2, 5, -1);
|
sheet.shiftColumns(2, 5, -1);
|
||||||
// assertEquals(2, sheet.getNumMergedRegions());
|
// only the 3rd merged region should remain
|
||||||
|
assertEquals(1, sheet.getNumMergedRegions());
|
||||||
|
CellRangeAddress mr = sheet.getMergedRegion(0);
|
||||||
|
CellRangeAddress expectedMR = new CellRangeAddress(3, 3, secondCol - 1, thirdCol - 1);
|
||||||
|
assertEquals(expectedMR, mr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue