Follow up fix after r644473 (bug 44739) TestHSSFConditionalFormatting had a bug and wasn't yet included in the test suite hierarchy
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@644509 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
dff9b26565
commit
1051e2853c
@ -78,8 +78,8 @@ public final class CellRange
|
||||
return _firstColumn == 0 && _lastColumn == LAST_COLUMN_INDEX;
|
||||
}
|
||||
|
||||
public CellRange(Region r) {
|
||||
this(r.getRowFrom(), r.getRowTo(), r.getColumnFrom(), r.getColumnTo());
|
||||
private static CellRange createFromRegion(Region r) {
|
||||
return new CellRange(r.getRowFrom(), r.getRowTo(), r.getColumnFrom(), r.getColumnTo());
|
||||
}
|
||||
|
||||
private static boolean isValid(int firstRow, int lastRow, int firstColumn, int lastColumn)
|
||||
@ -358,7 +358,7 @@ public final class CellRange
|
||||
CellRange[] result = new CellRange[regions.length];
|
||||
for( int i=0; i<regions.length; i++)
|
||||
{
|
||||
result[i] = new CellRange(regions[i]);
|
||||
result[i] = createFromRegion(regions[i]);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -40,6 +40,7 @@ public class AllUserModelTests {
|
||||
result.addTestSuite(TestFormulas.class);
|
||||
result.addTestSuite(TestHSSFCell.class);
|
||||
result.addTestSuite(TestHSSFClientAnchor.class);
|
||||
result.addTestSuite(TestHSSFConditionalFormatting.class);
|
||||
result.addTestSuite(TestHSSFComment.class);
|
||||
result.addTestSuite(TestHSSFDateUtil.class);
|
||||
result.addTestSuite(TestHSSFHeaderFooter.class);
|
||||
|
@ -26,7 +26,7 @@ import org.apache.poi.hssf.util.Region;
|
||||
*
|
||||
* @author Dmitriy Kumshayev
|
||||
*/
|
||||
public final class TestHSSFConfditionalFormatting extends TestCase
|
||||
public final class TestHSSFConditionalFormatting extends TestCase
|
||||
{
|
||||
public void testLastAndFirstColumns()
|
||||
{
|
||||
@ -55,7 +55,7 @@ public final class TestHSSFConfditionalFormatting extends TestCase
|
||||
short col = 1;
|
||||
Region [] regions =
|
||||
{
|
||||
new Region(0,col,-1,col)
|
||||
new Region(0,col,65535,col)
|
||||
};
|
||||
|
||||
sheet.addConditionalFormatting(regions, cfRules);
|
||||
@ -75,7 +75,7 @@ public final class TestHSSFConfditionalFormatting extends TestCase
|
||||
assertEquals(1, r.getColumnFrom());
|
||||
assertEquals(1, r.getColumnTo());
|
||||
assertEquals(0, r.getRowFrom());
|
||||
assertEquals(-1, r.getRowTo());
|
||||
assertEquals(65535, r.getRowTo());
|
||||
|
||||
assertEquals(2, cf.getNumberOfRules());
|
||||
|
Loading…
Reference in New Issue
Block a user