git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1690805 13f79535-47bb-0310-9956-ffa450edef68tags/REL_3_13_BETA1
@@ -73,6 +73,10 @@ public class ConditionType { | |||
public final byte id; | |||
public final String type; | |||
public String toString() { | |||
return id + " - " + type; | |||
} | |||
public static ConditionType forId(byte id) { | |||
return forId((int)id); |
@@ -98,4 +98,8 @@ public class XSSFConditionalFormatting implements ConditionalFormatting { | |||
public int getNumberOfRules(){ | |||
return _cf.sizeOfCfRuleArray(); | |||
} | |||
public String toString() { | |||
return _cf.toString(); | |||
} | |||
} |
@@ -33,8 +33,7 @@ public class TestXSSFConditionalFormatting extends BaseTestConditionalFormatting | |||
testRead("WithConditionalFormatting.xlsx"); | |||
} | |||
public void IGNORED_testReadOffice2007() { | |||
// TODO Bring the XSSF support up to the same level | |||
public void testReadOffice2007() { | |||
testReadOffice2007("NewStyleConditionalFormattings.xlsx"); | |||
} | |||
} |
@@ -552,7 +552,14 @@ public abstract class BaseTestConditionalFormatting extends TestCase { | |||
if (str.contains("[CF12]")) fCF12++; | |||
if (str.contains("[CFEX]")) fCFEX++; | |||
} 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); |