aboutsummaryrefslogtreecommitdiffstats
path: root/poi
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-06-15 16:01:37 +0000
committerPJ Fanning <fanningpj@apache.org>2022-06-15 16:01:37 +0000
commitd075f2ae9cdfbe9ff4fd3fdaee05bf32851821f6 (patch)
treeb37d2abe79e90f78df7595b8122a18032305f93a /poi
parentc559e4549ad1816b82e9a9582467d0d03e94798b (diff)
downloadpoi-d075f2ae9cdfbe9ff4fd3fdaee05bf32851821f6.tar.gz
poi-d075f2ae9cdfbe9ff4fd3fdaee05bf32851821f6.zip
[bug-66123] support gte attribute in XSSFConditionalFormattingThreshold
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1901945 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r--poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java23
1 files changed, 12 insertions, 11 deletions
diff --git a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
index e58138c663..49f944635b 100644
--- a/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
+++ b/poi/src/test/java/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java
@@ -550,8 +550,7 @@ public abstract class BaseTestConditionalFormatting {
if (str.contains("[CFEX]")) fCFEX++;
} else {
ConditionType type = cf.getRule(cf.getNumberOfRules() - 1).getConditionType();
- if (type == ConditionType.CELL_VALUE_IS ||
- type == ConditionType.FORMULA) {
+ if (type == ConditionType.CELL_VALUE_IS || type == ConditionType.FORMULA) {
fCF++;
} else {
// TODO Properly detect Ext ones from the xml
@@ -772,15 +771,17 @@ public abstract class BaseTestConditionalFormatting {
assertColor(color, databar.getColor());
- ConditionalFormattingThreshold th;
- th = databar.getMinThreshold();
- assertEquals(RangeType.MIN, th.getRangeType());
- assertNull(th.getValue());
- assertNull(th.getFormula());
- th = databar.getMaxThreshold();
- assertEquals(RangeType.MAX, th.getRangeType());
- assertNull(th.getValue());
- assertNull(th.getFormula());
+ ConditionalFormattingThreshold th1 = databar.getMinThreshold();
+ assertEquals(RangeType.MIN, th1.getRangeType());
+ checkThreshold(th1);
+ ConditionalFormattingThreshold th2 = databar.getMaxThreshold();
+ assertEquals(RangeType.MAX, th2.getRangeType());
+ checkThreshold(th2);
+ }
+
+ protected void checkThreshold(ConditionalFormattingThreshold threshold) {
+ assertNull(threshold.getValue());
+ assertNull(threshold.getFormula());
}
private void assertIconSetPercentages(ConditionalFormatting cf, IconSet iconset, Double...vals) {