aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2020-07-15 22:49:32 +0000
committerPJ Fanning <fanningpj@apache.org>2020-07-15 22:49:32 +0000
commit8900e397a485df8eff92337bb504eec3592b2366 (patch)
tree1f44abe46a23f9e189c8f3e6cff9d87efc28c1d0
parentcdf5f3d1feb99d8b877c808a6f78e6f70a4febcc (diff)
downloadpoi-8900e397a485df8eff92337bb504eec3592b2366.tar.gz
poi-8900e397a485df8eff92337bb504eec3592b2366.zip
remove some deprecated code
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1879911 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java23
-rw-r--r--src/java/org/apache/poi/ss/formula/EvaluationCell.java16
-rw-r--r--src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java26
-rw-r--r--src/ooxml/java/org/apache/poi/ooxml/POIXMLDocument.java1
-rw-r--r--src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java25
-rw-r--r--src/ooxml/java/org/apache/poi/ooxml/extractor/ExtractorFactory.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSharedStringsTable.java33
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationCell.java48
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java24
9 files changed, 16 insertions, 181 deletions
diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
index c46ff73aab..4b90599e43 100644
--- a/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
+++ b/src/java/org/apache/poi/hssf/usermodel/HSSFEvaluationCell.java
@@ -21,7 +21,6 @@ import org.apache.poi.ss.formula.EvaluationCell;
import org.apache.poi.ss.formula.EvaluationSheet;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.util.CellRangeAddress;
-import org.apache.poi.util.Removal;
/**
* HSSF wrapper for a cell under evaluation
@@ -59,16 +58,6 @@ final class HSSFEvaluationCell implements EvaluationCell {
public CellType getCellType() {
return _cell.getCellType();
}
- /**
- * @since POI 3.15 beta 3
- * @deprecated POI 3.15 beta 3.
- */
- @Deprecated
- @Removal(version = "4.2")
- @Override
- public CellType getCellTypeEnum() {
- return getCellType();
- }
@Override
public int getColumnIndex() {
return _cell.getColumnIndex();
@@ -110,16 +99,4 @@ final class HSSFEvaluationCell implements EvaluationCell {
*/
@Override
public CellType getCachedFormulaResultType() { return _cell.getCachedFormulaResultType(); }
-
- /**
- * @since POI 3.15 beta 3
- * @deprecated POI 3.15 beta 3.
- * Will be deleted when we make the CellType enum transition. See bug 59791.
- */
- @Deprecated
- @Removal(version = "4.2")
- @Override
- public CellType getCachedFormulaResultTypeEnum() {
- return getCachedFormulaResultType();
- }
}
diff --git a/src/java/org/apache/poi/ss/formula/EvaluationCell.java b/src/java/org/apache/poi/ss/formula/EvaluationCell.java
index 41563517c3..ae983d11d8 100644
--- a/src/java/org/apache/poi/ss/formula/EvaluationCell.java
+++ b/src/java/org/apache/poi/ss/formula/EvaluationCell.java
@@ -19,7 +19,6 @@ package org.apache.poi.ss.formula;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.util.CellRangeAddress;
-import org.apache.poi.util.Removal;
/**
* Abstracts a cell for the purpose of formula evaluation. This interface represents both formula
@@ -40,13 +39,6 @@ public interface EvaluationCell {
int getRowIndex();
int getColumnIndex();
CellType getCellType();
- /**
- * @since POI 3.15 beta 3
- * @deprecated POI 3.15 beta 3.
- */
- @Deprecated
- @Removal(version = "4.2")
- CellType getCellTypeEnum();
double getNumericCellValue();
String getStringCellValue();
@@ -59,12 +51,4 @@ public interface EvaluationCell {
* @return cell type of cached formula result
*/
CellType getCachedFormulaResultType();
- /**
- * @since POI 3.15 beta 3
- * @deprecated POI 3.15 beta 3.
- * Will be deleted when we make the CellType enum transition. See bug 59791.
- */
- @Deprecated
- @Removal(version = "4.2")
- CellType getCachedFormulaResultTypeEnum();
}
diff --git a/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java b/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java
index 21897a98bf..7a25291325 100644
--- a/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java
+++ b/src/java/org/apache/poi/ss/formula/eval/forked/ForkedEvaluationCell.java
@@ -28,8 +28,6 @@ import org.apache.poi.ss.formula.eval.ValueEval;
import org.apache.poi.ss.usermodel.Cell;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.util.CellRangeAddress;
-import org.apache.poi.util.Removal;
-
/**
* Represents a cell being used for forked evaluation that has had a value set different from the
@@ -110,17 +108,6 @@ final class ForkedEvaluationCell implements EvaluationCell {
public CellType getCellType() {
return _cellType;
}
- /**
- * @since POI 3.15 beta 3
- * @deprecated POI 3.15 beta 3.
- * Will be deleted when we make the CellType enum transition. See bug 59791.
- */
- @Deprecated
- @Removal(version = "4.2")
- @Override
- public CellType getCellTypeEnum() {
- return getCellType();
- }
@Override
public boolean getBooleanCellValue() {
checkCellType(CellType.BOOLEAN);
@@ -170,17 +157,4 @@ final class ForkedEvaluationCell implements EvaluationCell {
public CellType getCachedFormulaResultType() {
return _masterCell.getCachedFormulaResultType();
}
-
- /**
- * @since POI 3.15 beta 3
- * @deprecated POI 3.15 beta 3.
- * Will be deleted when we make the CellType enum transition. See bug 59791.
- */
- @Deprecated
- @Removal(version = "4.2")
- @Override
- public CellType getCachedFormulaResultTypeEnum() {
- return getCachedFormulaResultType();
- }
-
}
diff --git a/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocument.java b/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocument.java
index 095435c514..75895b7edb 100644
--- a/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocument.java
+++ b/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocument.java
@@ -34,7 +34,6 @@ import org.apache.poi.openxml4j.opc.PackageAccess;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.openxml4j.opc.PackageRelationshipCollection;
-import org.apache.poi.util.Removal;
import org.apache.xmlbeans.impl.common.SystemCache;
/**
diff --git a/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java b/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
index 7d3bcc40a9..9346942e6c 100644
--- a/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
+++ b/src/ooxml/java/org/apache/poi/ooxml/POIXMLDocumentPart.java
@@ -40,7 +40,6 @@ import org.apache.poi.util.IOUtils;
import org.apache.poi.util.Internal;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
-import org.apache.poi.util.Removal;
import org.apache.poi.xddf.usermodel.chart.XDDFChart;
import org.apache.poi.xssf.usermodel.XSSFRelation;
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
@@ -65,18 +64,6 @@ public class POIXMLDocumentPart {
* to check whether embedded part is already committed
*
* @return return true if embedded part is committed
- * @deprecated use @link{#isCommitted()}
- */
- @Removal(version = "5.0.0")
- @Deprecated
- public boolean isCommited() {
- return isCommitted();
- }
-
- /**
- * to check whether embedded part is already committed
- *
- * @return return true if embedded part is committed
* @since 4.1.2
*/
public boolean isCommitted() {
@@ -87,18 +74,6 @@ public class POIXMLDocumentPart {
* setter method to set embedded part is committed
*
* @param isCommitted boolean value
- * @deprecated use @link{#setCommitted(isCommitted)}
- */
- @Removal(version = "5.0.0")
- @Deprecated
- public void setCommited(boolean isCommitted) {
- this.isCommitted = isCommitted;
- }
-
- /**
- * setter method to set embedded part is committed
- *
- * @param isCommitted boolean value
*/
public void setCommitted(boolean isCommitted) {
this.isCommitted = isCommitted;
diff --git a/src/ooxml/java/org/apache/poi/ooxml/extractor/ExtractorFactory.java b/src/ooxml/java/org/apache/poi/ooxml/extractor/ExtractorFactory.java
index 68df553f99..212404bcb4 100644
--- a/src/ooxml/java/org/apache/poi/ooxml/extractor/ExtractorFactory.java
+++ b/src/ooxml/java/org/apache/poi/ooxml/extractor/ExtractorFactory.java
@@ -50,7 +50,6 @@ import org.apache.poi.util.IOUtils;
import org.apache.poi.util.NotImplemented;
import org.apache.poi.util.POILogFactory;
import org.apache.poi.util.POILogger;
-import org.apache.poi.util.Removal;
import org.apache.poi.xdgf.extractor.XDGFVisioExtractor;
import org.apache.poi.xslf.extractor.XSLFPowerPointExtractor;
import org.apache.poi.xslf.usermodel.XMLSlideShow;
diff --git a/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSharedStringsTable.java b/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSharedStringsTable.java
index 03a1238fc4..e68d8d48df 100644
--- a/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSharedStringsTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSharedStringsTable.java
@@ -27,9 +27,7 @@ import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.ss.usermodel.RichTextString;
import org.apache.poi.util.Internal;
import org.apache.poi.util.LittleEndian;
-import org.apache.poi.util.Removal;
import org.apache.poi.xssf.model.SharedStrings;
-import org.apache.poi.xssf.usermodel.XSSFRichTextString;
import org.xml.sax.SAXException;
/**
@@ -86,38 +84,9 @@ public class XSSFBSharedStringsTable implements SharedStrings {
reader.parse();
}
- /**
- * Return all the strings.
- * Formatting is ignored.
- *
- * @return a list with all the shared strings.
- * @deprecated use <code>getItemAt</code> instead
- */
- @Removal(version = "4.2")
- @Deprecated
- public List<String> getItems() {
- List<String> ret = new ArrayList<>(strings.size());
- ret.addAll(strings);
- return ret;
- }
-
- /**
- * Return the string at a given index.
- * Formatting is ignored.
- *
- * @param idx index of item to return.
- * @return the item at the specified position in this Shared String table.
- * @deprecated use <code>getItemAt</code> instead
- */
- @Removal(version = "4.2")
- @Deprecated
- public String getEntryAt(int idx) {
- return strings.get(idx);
- }
-
@Override
public RichTextString getItemAt(int idx) {
- return new XSSFRichTextString(getEntryAt(idx));
+ return getItemAt(idx);
}
/**
diff --git a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationCell.java b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationCell.java
index 4faf8c2507..aaafa87609 100644
--- a/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationCell.java
+++ b/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFEvaluationCell.java
@@ -21,8 +21,6 @@ import org.apache.poi.ss.formula.EvaluationCell;
import org.apache.poi.ss.formula.EvaluationSheet;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.util.CellRangeAddress;
-import org.apache.poi.util.Internal;
-import org.apache.poi.util.Removal;
/**
* SXSSF wrapper for a cell under evaluation
@@ -50,10 +48,12 @@ final class SXSSFEvaluationCell implements EvaluationCell {
public SXSSFCell getSXSSFCell() {
return _cell;
}
+
@Override
public boolean getBooleanCellValue() {
return _cell.getBooleanCellValue();
}
+
/**
* @return cell type
*/
@@ -61,52 +61,46 @@ final class SXSSFEvaluationCell implements EvaluationCell {
public CellType getCellType() {
return _cell.getCellType();
}
- /**
- * @since POI 3.15 beta 3
- * @deprecated use <code>getCellType</code> instead
- * Will be deleted when we make the CellType enum transition. See bug 59791.
- */
- @Deprecated
- @Removal(version = "4.2")
- @Internal(since="POI 3.15 beta 3")
- @Override
- public CellType getCellTypeEnum() {
- return _cell.getCellType();
- }
+
@Override
public int getColumnIndex() {
return _cell.getColumnIndex();
}
+
@Override
public int getErrorCellValue() {
return _cell.getErrorCellValue();
}
+
@Override
public double getNumericCellValue() {
return _cell.getNumericCellValue();
}
+
@Override
public int getRowIndex() {
return _cell.getRowIndex();
}
+
@Override
public EvaluationSheet getSheet() {
return _evalSheet;
}
+
@Override
public String getStringCellValue() {
return _cell.getRichStringCellValue().getString();
}
@Override
- public CellRangeAddress getArrayFormulaRange() {
- return _cell.getArrayFormulaRange();
- }
+ public CellRangeAddress getArrayFormulaRange() {
+ return _cell.getArrayFormulaRange();
+ }
- @Override
- public boolean isPartOfArrayFormulaGroup() {
- return _cell.isPartOfArrayFormulaGroup();
- }
+ @Override
+ public boolean isPartOfArrayFormulaGroup() {
+ return _cell.isPartOfArrayFormulaGroup();
+ }
/**
* @return cell type of cached formula result
@@ -115,16 +109,4 @@ final class SXSSFEvaluationCell implements EvaluationCell {
public CellType getCachedFormulaResultType() {
return _cell.getCachedFormulaResultType();
}
- /**
- * @since POI 3.15 beta 3
- * @deprecated POI 3.15 beta 3.
- * Will be deleted when we make the CellType enum transition. See bug 59791.
- */
- @Deprecated
- @Removal(version = "4.2")
- @Internal(since="POI 3.15 beta 3")
- @Override
- public CellType getCachedFormulaResultTypeEnum() {
- return getCachedFormulaResultType();
- }
}
diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java
index 249f55d956..221154b331 100644
--- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java
+++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFEvaluationCell.java
@@ -21,8 +21,6 @@ import org.apache.poi.ss.formula.EvaluationCell;
import org.apache.poi.ss.formula.EvaluationSheet;
import org.apache.poi.ss.usermodel.CellType;
import org.apache.poi.ss.util.CellRangeAddress;
-import org.apache.poi.util.Internal;
-import org.apache.poi.util.Removal;
/**
* XSSF wrapper for a cell under evaluation
@@ -62,16 +60,6 @@ final class XSSFEvaluationCell implements EvaluationCell {
public CellType getCellType() {
return _cell.getCellType();
}
- /**
- * @since POI 3.15 beta 3
- * @deprecated use <code>getCellType</code> instead
- */
- @Deprecated
- @Removal(version = "4.2")
- @Override
- public CellType getCellTypeEnum() {
- return getCellType();
- }
@Override
public int getColumnIndex() {
return _cell.getColumnIndex();
@@ -114,16 +102,4 @@ final class XSSFEvaluationCell implements EvaluationCell {
public CellType getCachedFormulaResultType() {
return _cell.getCachedFormulaResultType();
}
- /**
- * @since POI 3.15 beta 3
- * @deprecated use <code>getCachedFormulaResultType</code> instead
- * Will be deleted when we make the CellType enum transition. See bug 59791.
- */
- @Deprecated
- @Removal(version = "4.2")
- @Internal(since="POI 3.15 beta 3")
- @Override
- public CellType getCachedFormulaResultTypeEnum() {
- return getCachedFormulaResultType();
- }
}