diff options
author | PJ Fanning <fanningpj@apache.org> | 2020-04-29 23:37:13 +0000 |
---|---|---|
committer | PJ Fanning <fanningpj@apache.org> | 2020-04-29 23:37:13 +0000 |
commit | ce5f3df081d747feffad1c21c801a69eded30576 (patch) | |
tree | 1ef682eac2e8f79bcaa02b8e1dd5d735e658ddda | |
parent | d8e06cfa5d811b5b3d83a1f6b51bb5fb36f124e8 (diff) | |
download | poi-ce5f3df081d747feffad1c21c801a69eded30576.tar.gz poi-ce5f3df081d747feffad1c21c801a69eded30576.zip |
[github-176] Remove limit on number of rules in XSSFSheetConditionalFormatting.
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1877181 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java | 7 | ||||
-rw-r--r-- | src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java | 6 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java index f175ddd752..f88faa29eb 100644 --- a/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java +++ b/src/ooxml/testcases/org/apache/poi/xssf/usermodel/TestXSSFConditionalFormatting.java @@ -42,8 +42,6 @@ import org.junit.Test; */ public class TestXSSFConditionalFormatting extends BaseTestConditionalFormatting { - protected boolean applyLimitOf3 = false; - public TestXSSFConditionalFormatting(){ super(XSSFITestDataProvider.instance); } @@ -133,4 +131,9 @@ public class TestXSSFConditionalFormatting extends BaseTestConditionalFormatting assertEquals(extendedColor, fontFormattingBack.getFontColor()); assertEquals(extendedColor, ruleBack.getPatternFormatting().getFillBackgroundColorColor()); } + + @Override + protected boolean applyLimitOf3() { + return false; + } } diff --git a/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java b/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java index 04f922713e..646b0bb4ad 100644 --- a/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java +++ b/src/testcases/org/apache/poi/ss/usermodel/BaseTestConditionalFormatting.java @@ -46,7 +46,9 @@ public abstract class BaseTestConditionalFormatting { _testDataProvider = testDataProvider; } - protected boolean applyLimitOf3 = true; + protected boolean applyLimitOf3() { + return true; + } protected abstract void assertColour(String hexExpected, Color actual); @@ -99,7 +101,7 @@ public abstract class BaseTestConditionalFormatting { assertTrue(e.getMessage().startsWith("cfRules must not be empty")); } - if (applyLimitOf3) { + if (applyLimitOf3()) { try { sheetCF.addConditionalFormatting( new CellRangeAddress[]{CellRangeAddress.valueOf("A1:A3")}, |