From 172ac0be6055dfee6b0025418df22e52919e3da0 Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Sat, 18 Jun 2016 01:06:53 +0000 Subject: bug 59170: Removed deprecated methods in POIFS, SS, HSSF, and XSSF git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1748897 13f79535-47bb-0310-9956-ffa450edef68 --- .../usermodel/XSSFConditionalFormattingRule.java | 28 +++++++--------------- 1 file changed, 8 insertions(+), 20 deletions(-) (limited to 'src/ooxml/java/org/apache') diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java index dc2e6f6298..a639f2c271 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConditionalFormattingRule.java @@ -295,36 +295,24 @@ public class XSSFConditionalFormattingRule implements ConditionalFormattingRule } } - /** - * Type of conditional formatting rule. - *

- * MUST be one of the IDs of a {@link ConditionType} - *

- * - * @return the type of condition - */ - public byte getConditionType(){ - ConditionType type = getConditionTypeType(); - if (type != null) return type.id; - return 0; - } - /** * Type of conditional formatting rule. */ - public ConditionType getConditionTypeType() { + @Override + public ConditionType getConditionType() { return typeLookup.get(_cfRule.getType()); } /** * The comparison function used when the type of conditional formatting is set to - * {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS} + * {@link ConditionType#CELL_VALUE_IS} *

* MUST be a constant from {@link org.apache.poi.ss.usermodel.ComparisonOperator} *

* * @return the conditional format operator */ + @Override public byte getComparisonOperation(){ STConditionalFormattingOperator.Enum op = _cfRule.getOperator(); if(op == null) return ComparisonOperator.NO_COMPARISON; @@ -345,13 +333,13 @@ public class XSSFConditionalFormattingRule implements ConditionalFormattingRule /** * The formula used to evaluate the first operand for the conditional formatting rule. *

- * If the condition type is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS}, + * If the condition type is {@link ConditionType#CELL_VALUE_IS}, * this field is the first operand of the comparison. - * If type is {@link ConditionalFormattingRule#CONDITION_TYPE_FORMULA}, this formula is used + * If type is {@link ConditionType#FORMULA}, this formula is used * to determine if the conditional formatting is applied. *

*

- * If comparison type is {@link ConditionalFormattingRule#CONDITION_TYPE_FORMULA} the formula MUST be a Boolean function + * If comparison type is {@link ConditionType#FORMULA} the formula MUST be a Boolean function *

* * @return the first formula @@ -362,7 +350,7 @@ public class XSSFConditionalFormattingRule implements ConditionalFormattingRule /** * The formula used to evaluate the second operand of the comparison when - * comparison type is {@link ConditionalFormattingRule#CONDITION_TYPE_CELL_VALUE_IS} and operator + * comparison type is {@link ConditionType#CELL_VALUE_IS} and operator * is either {@link org.apache.poi.ss.usermodel.ComparisonOperator#BETWEEN} or {@link org.apache.poi.ss.usermodel.ComparisonOperator#NOT_BETWEEN} * * @return the second formula -- cgit v1.2.3