aboutsummaryrefslogtreecommitdiffstats
path: root/src/java
diff options
context:
space:
mode:
authorDominik Stadler <centic@apache.org>2021-01-01 15:51:30 +0000
committerDominik Stadler <centic@apache.org>2021-01-01 15:51:30 +0000
commit8347bb64ac06f8aeb7711d106e663a5a2587cc0d (patch)
tree1de7fad5954afebabed950e259a36fed37897182 /src/java
parent685af351d1bfc2912584de1af4cc5eab4fe6b87c (diff)
downloadpoi-8347bb64ac06f8aeb7711d106e663a5a2587cc0d.tar.gz
poi-8347bb64ac06f8aeb7711d106e663a5a2587cc0d.zip
Apply some IDE suggestions and fix some JavaDoc
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1885012 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java')
-rw-r--r--src/java/org/apache/poi/ss/formula/BaseFormulaEvaluator.java24
-rw-r--r--src/java/org/apache/poi/ss/util/SheetUtil.java1
2 files changed, 14 insertions, 11 deletions
diff --git a/src/java/org/apache/poi/ss/formula/BaseFormulaEvaluator.java b/src/java/org/apache/poi/ss/formula/BaseFormulaEvaluator.java
index f9ec1e839d..fa9989c02b 100644
--- a/src/java/org/apache/poi/ss/formula/BaseFormulaEvaluator.java
+++ b/src/java/org/apache/poi/ss/formula/BaseFormulaEvaluator.java
@@ -70,7 +70,7 @@ public abstract class BaseFormulaEvaluator implements FormulaEvaluator, Workbook
protected EvaluationWorkbook getEvaluationWorkbook() {
return _bookEvaluator.getWorkbook();
}
-
+
/**
* Should be called whenever there are major changes (e.g. moving sheets) to input cells
* in the evaluated workbook. If performance is not critical, a single call to this method
@@ -117,7 +117,7 @@ public abstract class BaseFormulaEvaluator implements FormulaEvaluator, Workbook
throw new IllegalStateException("Bad cell type (" + cell.getCellType() + ")");
}
}
-
+
/**
* If cell contains formula, it evaluates the formula, and
* puts the formula result back into the cell, in place
@@ -188,9 +188,11 @@ public abstract class BaseFormulaEvaluator implements FormulaEvaluator, Workbook
}
/**
- * set the cell type
- * @param cell
- * @param cv
+ * Set the cell type based on the computed cell type as
+ * part of a formula evaluation.
+ *
+ * @param cell The Cell to populate
+ * @param cv The CellValue to read the result type from
*/
protected void setCellType(Cell cell, CellValue cv) {
CellType cellType = cv.getCellType();
@@ -214,15 +216,17 @@ public abstract class BaseFormulaEvaluator implements FormulaEvaluator, Workbook
/**
* Override if a different variation is needed, e.g. passing the evaluator to the cell method
- * @param cell
- * @param cellType
+ *
+ * @param cell The Cell to populate
+ * @param cellType The wanted type for this Cell
*/
protected void setCellType(Cell cell, CellType cellType) {
+ //noinspection deprecation
cell.setCellType(cellType);
}
-
+
protected abstract RichTextString createRichTextString(String str);
-
+
protected void setCellValue(Cell cell, CellValue cv) {
CellType cellType = cv.getCellType();
switch (cellType) {
@@ -246,7 +250,7 @@ public abstract class BaseFormulaEvaluator implements FormulaEvaluator, Workbook
throw new IllegalStateException("Unexpected cell value type (" + cellType + ")");
}
}
-
+
/**
* Loops over all cells in all sheets of the supplied
diff --git a/src/java/org/apache/poi/ss/util/SheetUtil.java b/src/java/org/apache/poi/ss/util/SheetUtil.java
index d26e2c2a26..06d3aa1f70 100644
--- a/src/java/org/apache/poi/ss/util/SheetUtil.java
+++ b/src/java/org/apache/poi/ss/util/SheetUtil.java
@@ -39,7 +39,6 @@ import org.apache.poi.ss.usermodel.Row;
import org.apache.poi.ss.usermodel.Sheet;
import org.apache.poi.ss.usermodel.Workbook;
import org.apache.poi.util.Internal;
-import org.apache.poi.util.Removal;
/**