Enable CF2007 test for XLSX too
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690805 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9217c91425
commit
fbf95cdb54
@ -73,6 +73,10 @@ public class ConditionType {
|
|||||||
public final byte id;
|
public final byte id;
|
||||||
public final String type;
|
public final String type;
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return id + " - " + type;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public static ConditionType forId(byte id) {
|
public static ConditionType forId(byte id) {
|
||||||
return forId((int)id);
|
return forId((int)id);
|
||||||
|
@ -98,4 +98,8 @@ public class XSSFConditionalFormatting implements ConditionalFormatting {
|
|||||||
public int getNumberOfRules(){
|
public int getNumberOfRules(){
|
||||||
return _cf.sizeOfCfRuleArray();
|
return _cf.sizeOfCfRuleArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String toString() {
|
||||||
|
return _cf.toString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,7 @@ public class TestXSSFConditionalFormatting extends BaseTestConditionalFormatting
|
|||||||
testRead("WithConditionalFormatting.xlsx");
|
testRead("WithConditionalFormatting.xlsx");
|
||||||
}
|
}
|
||||||
|
|
||||||
public void IGNORED_testReadOffice2007() {
|
public void testReadOffice2007() {
|
||||||
// TODO Bring the XSSF support up to the same level
|
|
||||||
testReadOffice2007("NewStyleConditionalFormattings.xlsx");
|
testReadOffice2007("NewStyleConditionalFormattings.xlsx");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -552,7 +552,14 @@ public abstract class BaseTestConditionalFormatting extends TestCase {
|
|||||||
if (str.contains("[CF12]")) fCF12++;
|
if (str.contains("[CF12]")) fCF12++;
|
||||||
if (str.contains("[CFEX]")) fCFEX++;
|
if (str.contains("[CFEX]")) fCFEX++;
|
||||||
} else {
|
} else {
|
||||||
fail("TODO!");
|
ConditionType type = cf.getRule(cf.getNumberOfRules()-1).getConditionTypeType();
|
||||||
|
if (type == ConditionType.CELL_VALUE_IS ||
|
||||||
|
type == ConditionType.FORMULA) {
|
||||||
|
fCF++;
|
||||||
|
} else {
|
||||||
|
// TODO Detect Ext ones
|
||||||
|
fCF12++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
assertEquals(numCF, fCF);
|
assertEquals(numCF, fCF);
|
||||||
|
Loading…
Reference in New Issue
Block a user