diff options
author | Javen O'Neal <onealj@apache.org> | 2016-06-18 01:06:53 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2016-06-18 01:06:53 +0000 |
commit | 172ac0be6055dfee6b0025418df22e52919e3da0 (patch) | |
tree | 1659fd7d119df596e34e7e80dc065bb01565d603 /src/java/org/apache/poi | |
parent | 6073548987b30f7f07ac59d3d9f8c5c26b6c68a4 (diff) | |
download | poi-172ac0be6055dfee6b0025418df22e52919e3da0.tar.gz poi-172ac0be6055dfee6b0025418df22e52919e3da0.zip |
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
Diffstat (limited to 'src/java/org/apache/poi')
28 files changed, 45 insertions, 536 deletions
diff --git a/src/java/org/apache/poi/hssf/record/CFRuleBase.java b/src/java/org/apache/poi/hssf/record/CFRuleBase.java index e3a91e9f58..3554039af2 100644 --- a/src/java/org/apache/poi/hssf/record/CFRuleBase.java +++ b/src/java/org/apache/poi/hssf/record/CFRuleBase.java @@ -40,6 +40,7 @@ import org.apache.poi.util.POILogger; * for their rules.</p> */ public abstract class CFRuleBase extends StandardRecord implements Cloneable { + // FIXME: Merge with org.apache.poi.ss.usermodel.ComparisonOperator and rewrite as an enum public static final class ComparisonOperator { public static final byte NO_COMPARISON = 0; public static final byte BETWEEN = 1; diff --git a/src/java/org/apache/poi/hssf/record/DrawingRecord.java b/src/java/org/apache/poi/hssf/record/DrawingRecord.java index 453a7bc753..c55cafa44b 100644 --- a/src/java/org/apache/poi/hssf/record/DrawingRecord.java +++ b/src/java/org/apache/poi/hssf/record/DrawingRecord.java @@ -37,6 +37,9 @@ public final class DrawingRecord extends StandardRecord implements Cloneable { recordData = in.readRemainder(); } + /** + * @deprecated POI 3.9 + */ @Deprecated public void processContinueRecord(byte[] record) { //don't merge continue record with the drawing record, it must be serialized separately @@ -55,11 +58,6 @@ public final class DrawingRecord extends StandardRecord implements Cloneable { return sid; } - @Deprecated - public byte[] getData() { - return recordData; - } - public byte[] getRecordData(){ return recordData; } diff --git a/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java b/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java index 18aacc5cf0..beee8bca6d 100644 --- a/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java +++ b/src/java/org/apache/poi/hssf/record/ExternSheetRecord.java @@ -162,14 +162,6 @@ public class ExternSheetRecord extends StandardRecord { return _list.get(i); } - /** - * @deprecated Was prevously used for removing sheets, which we now do differently - */ - @Deprecated - public void adjustIndex(int extRefIndex, int offset) { - getRef(extRefIndex).adjustIndex(offset); - } - public void removeSheet(int sheetIdx) { int nItems = _list.size(); for (int i = 0; i < nItems; i++) { diff --git a/src/java/org/apache/poi/hssf/record/FilePassRecord.java b/src/java/org/apache/poi/hssf/record/FilePassRecord.java index 413b865041..7c8ae948f9 100644 --- a/src/java/org/apache/poi/hssf/record/FilePassRecord.java +++ b/src/java/org/apache/poi/hssf/record/FilePassRecord.java @@ -251,54 +251,6 @@ public final class FilePassRecord extends StandardRecord implements Cloneable { } return rc4; } - - /** - * @deprecated use getRc4KeyData().getSalt() - * @return the rc4 salt - */ - public byte[] getDocId() { - return checkRc4().getSalt(); - } - - /** - * @deprecated use getRc4KeyData().setSalt() - * @param docId the new rc4 salt - */ - public void setDocId(byte[] docId) { - checkRc4().setSalt(docId); - } - - /** - * @deprecated use getRc4KeyData().getEncryptedVerifier() - * @return the rc4 encrypted verifier - */ - public byte[] getSaltData() { - return checkRc4().getEncryptedVerifier(); - } - - /** - * @deprecated use getRc4KeyData().setEncryptedVerifier() - * @param saltData the new rc4 encrypted verifier - */ - public void setSaltData(byte[] saltData) { - getRc4KeyData().setEncryptedVerifier(saltData); - } - - /** - * @deprecated use getRc4KeyData().getEncryptedVerifierHash() - * @return the rc4 encrypted verifier hash - */ - public byte[] getSaltHash() { - return getRc4KeyData().getEncryptedVerifierHash(); - } - - /** - * @deprecated use getRc4KeyData().setEncryptedVerifierHash() - * @param saltHash the new rc4 encrypted verifier - */ - public void setSaltHash(byte[] saltHash) { - getRc4KeyData().setEncryptedVerifierHash(saltHash); - } public short getSid() { return sid; diff --git a/src/java/org/apache/poi/hssf/record/PaneRecord.java b/src/java/org/apache/poi/hssf/record/PaneRecord.java index ea7d967adc..5bff223b22 100644 --- a/src/java/org/apache/poi/hssf/record/PaneRecord.java +++ b/src/java/org/apache/poi/hssf/record/PaneRecord.java @@ -34,9 +34,6 @@ public final class PaneRecord extends StandardRecord { public final static short ACTIVE_PANE_LOWER_RIGHT = 0; public final static short ACTIVE_PANE_UPPER_RIGHT = 1; public final static short ACTIVE_PANE_LOWER_LEFT = 2; - // TODO - remove obsolete field (it was deprecated May-2008 v3.1) - /** @deprecated use ACTIVE_PANE_UPPER_LEFT */ - public final static short ACTIVE_PANE_UPER_LEFT = 3; public final static short ACTIVE_PANE_UPPER_LEFT = 3; diff --git a/src/java/org/apache/poi/hssf/record/PasswordRecord.java b/src/java/org/apache/poi/hssf/record/PasswordRecord.java index dc7a4c3950..3277cdcb86 100644 --- a/src/java/org/apache/poi/hssf/record/PasswordRecord.java +++ b/src/java/org/apache/poi/hssf/record/PasswordRecord.java @@ -39,15 +39,6 @@ public final class PasswordRecord extends StandardRecord { } /** - * Return the password hash - * - * @deprecated use {@link CryptoFunctions#createXorVerifier1(String)} - */ - public static short hashPassword(String password) { - return (short)CryptoFunctions.createXorVerifier1(password); - } - - /** * set the password * * @param password representing the password diff --git a/src/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java b/src/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java index 263bdeeee3..3f6a9c4691 100644 --- a/src/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java +++ b/src/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java @@ -29,8 +29,6 @@ import org.apache.poi.hssf.record.crypto.Biff8EncryptionKey; import org.apache.poi.hssf.record.crypto.Biff8RC4Key; import org.apache.poi.hssf.record.crypto.Biff8XORKey; import org.apache.poi.poifs.crypt.Decryptor; -import org.apache.poi.util.POILogFactory; -import org.apache.poi.util.POILogger; /** * A stream based way to get at complete records, with diff --git a/src/java/org/apache/poi/hssf/record/RecordInputStream.java b/src/java/org/apache/poi/hssf/record/RecordInputStream.java index 126092bd48..2b66bd80a3 100644 --- a/src/java/org/apache/poi/hssf/record/RecordInputStream.java +++ b/src/java/org/apache/poi/hssf/record/RecordInputStream.java @@ -415,7 +415,7 @@ public final class RecordInputStream implements LittleEndianInput { /** Reads all byte data for the current record, including any * that overlaps into any following continue records. * - * @deprecated Best to write a input stream that wraps this one where there is + * @deprecated POI 2.0 Best to write a input stream that wraps this one where there is * special sub record that may overlap continue records. */ public byte[] readAllContinuedRemainder() { diff --git a/src/java/org/apache/poi/hssf/record/UnicodeString.java b/src/java/org/apache/poi/hssf/record/UnicodeString.java deleted file mode 100644 index a8c23dfd9b..0000000000 --- a/src/java/org/apache/poi/hssf/record/UnicodeString.java +++ /dev/null @@ -1,35 +0,0 @@ -/* ==================================================================== - Licensed to the Apache Software Foundation (ASF) under one or more - contributor license agreements. See the NOTICE file distributed with - this work for additional information regarding copyright ownership. - The ASF licenses this file to You under the Apache License, Version 2.0 - (the "License"); you may not use this file except in compliance with - the License. You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -==================================================================== */ - -package org.apache.poi.hssf.record; -/** - * @deprecated Use {@link org.apache.poi.hssf.record.common.UnicodeString} instead - */ -public final class UnicodeString extends org.apache.poi.hssf.record.common.UnicodeString { - /** - * @deprecated Use {@link org.apache.poi.hssf.record.common.UnicodeString} instead - */ - public UnicodeString(RecordInputStream in) { - super(in); - } - /** - * @deprecated Use {@link org.apache.poi.hssf.record.common.UnicodeString} instead - */ - public UnicodeString(String str) { - super(str); - } -} diff --git a/src/java/org/apache/poi/hssf/record/WindowOneRecord.java b/src/java/org/apache/poi/hssf/record/WindowOneRecord.java index ffed2164e1..e2b9e2c4d3 100644 --- a/src/java/org/apache/poi/hssf/record/WindowOneRecord.java +++ b/src/java/org/apache/poi/hssf/record/WindowOneRecord.java @@ -182,14 +182,6 @@ public final class WindowOneRecord extends StandardRecord { public void setActiveSheetIndex(int index) { field_6_active_sheet = index; } - /** - * deprecated May 2008 - * @deprecated - Misleading name - use setActiveSheetIndex() - */ - public void setSelectedTab(short s) - { - setActiveSheetIndex(s); - } /** * Sets the first visible sheet in the worksheet tab-bar. This method does <b>not</b> @@ -201,14 +193,6 @@ public final class WindowOneRecord extends StandardRecord { } /** - * deprecated May 2008 - * @deprecated - Misleading name - use setFirstVisibleTab() - */ - public void setDisplayedTab(short t) { - setFirstVisibleTab(t); - } - - /** * set the number of selected tabs * @param n number of tabs */ @@ -340,14 +324,6 @@ public final class WindowOneRecord extends StandardRecord { public int getActiveSheetIndex() { return field_6_active_sheet; } - /** - * deprecated May 2008 - * @deprecated - Misleading name - use getActiveSheetIndex() - */ - public short getSelectedTab() - { - return (short) getActiveSheetIndex(); - } /** * @return the first visible sheet in the worksheet tab-bar. @@ -356,14 +332,6 @@ public final class WindowOneRecord extends StandardRecord { public int getFirstVisibleTab() { return field_7_first_visible_tab; } - /** - * deprecated May 2008 - * @deprecated - Misleading name - use getFirstVisibleTab() - */ - public short getDisplayedTab() - { - return (short) getFirstVisibleTab(); - } /** * get the number of selected tabs diff --git a/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java b/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java index a56f9bd522..d7f0ec4774 100644 --- a/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java +++ b/src/java/org/apache/poi/hssf/record/WindowTwoRecord.java @@ -198,13 +198,7 @@ public final class WindowTwoRecord extends StandardRecord { public void setActive(boolean p) { field_1_options = active.setShortBoolean(field_1_options, p); } - /** - * deprecated May 2008 - * @deprecated use setActive() - */ - public void setPaged(boolean p) { - setActive(p); - } + /** * was the sheet saved in page break view * @param p pagebreaksaved or not @@ -396,13 +390,6 @@ public final class WindowTwoRecord extends StandardRecord { public boolean isActive() { return active.isSet(field_1_options); } - /** - * deprecated May 2008 - * @deprecated use isActive() - */ - public boolean getPaged() { - return isActive(); - } /** * was the sheet saved in page break view diff --git a/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java b/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java index 68b3e9e482..0319af64e4 100644 --- a/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java +++ b/src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java @@ -442,14 +442,6 @@ public final class RowRecordsAggregate extends RecordAggregate { return _valuesAgg.iterator(); } - /** - * @deprecated use {@link #getCellValueIterator()} instead - */ - public CellValueRecordInterface[] getValueRecords() { - //noinspection deprecation - return _valuesAgg.getValueRecords(); - } - public IndexRecord createIndexRecord(int indexRecordOffset, int sizeOfInitialSheetRecords) { IndexRecord result = new IndexRecord(); result.setFirstRow(_firstrow); diff --git a/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java b/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java index 14415ae9b2..5713d75e5d 100644 --- a/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java +++ b/src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java @@ -359,33 +359,6 @@ public final class ValueRecordsAggregate implements Iterable<CellValueRecordInte return new ValueIterator(); } - /** - * Gets all the cell records contained in this aggregate. - * Note {@link BlankRecord}s appear separate (not in {@link MulBlankRecord}s). - * @deprecated use {@link #iterator()} instead - */ - @Deprecated - public CellValueRecordInterface[] getValueRecords() { - List<CellValueRecordInterface> temp = new ArrayList<CellValueRecordInterface>(); - - for (int rowIx = 0; rowIx < records.length; rowIx++) { - CellValueRecordInterface[] rowCells = records[rowIx]; - if (rowCells == null) { - continue; - } - for (int colIx = 0; colIx < rowCells.length; colIx++) { - CellValueRecordInterface cell = rowCells[colIx]; - if (cell != null) { - temp.add(cell); - } - } - } - - CellValueRecordInterface[] result = new CellValueRecordInterface[temp.size()]; - temp.toArray(result); - return result; - } - public Object clone() { throw new RuntimeException("clone() should not be called. ValueRecordsAggregate should be copied via Sheet.cloneSheet()"); } diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java index bf317b01dc..08825ce358 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFCell.java @@ -99,7 +99,7 @@ public class HSSFCell implements Cell { * @param row - the row of this cell * @param col - the column for this cell * - * @see org.apache.poi.hssf.usermodel.HSSFRow#createCell(short) + * @see org.apache.poi.hssf.usermodel.HSSFRow#createCell(int) */ protected HSSFCell(HSSFWorkbook book, HSSFSheet sheet, int row, short col) { @@ -145,7 +145,7 @@ public class HSSFCell implements Cell { * @param type - CELL_TYPE_NUMERIC, CELL_TYPE_STRING, CELL_TYPE_FORMULA, CELL_TYPE_BLANK, * CELL_TYPE_BOOLEAN, CELL_TYPE_ERROR * Type of cell - * @see org.apache.poi.hssf.usermodel.HSSFRow#createCell(short,int) + * @see org.apache.poi.hssf.usermodel.HSSFRow#createCell(int,int) */ protected HSSFCell(HSSFWorkbook book, HSSFSheet sheet, int row, short col, int type) diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormattingRule.java b/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormattingRule.java index f27675f714..b52ea9102e 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormattingRule.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFConditionalFormattingRule.java @@ -230,19 +230,16 @@ public final class HSSFConditionalFormattingRule implements ConditionalFormattin /** * @return - the conditiontype for the cfrule */ - public byte getConditionType() { - return cfRuleRecord.getConditionType(); - } - /** - * @return - the conditiontype for the cfrule - */ - public ConditionType getConditionTypeType() { - return ConditionType.forId(getConditionType()); + @Override + public ConditionType getConditionType() { + byte code = cfRuleRecord.getConditionType(); + return ConditionType.forId(code); } /** * @return - the comparisionoperatation for the cfrule */ + @Override public byte getComparisonOperation() { return cfRuleRecord.getComparisonOperation(); } diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java b/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java index 52b10f899b..06afe82961 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFFormulaEvaluator.java @@ -48,17 +48,6 @@ public class HSSFFormulaEvaluator implements FormulaEvaluator, WorkbookEvaluator private WorkbookEvaluator _bookEvaluator; private HSSFWorkbook _book; - /** - * @deprecated (Sep 2008) HSSFSheet parameter is ignored - */ - @Deprecated - public HSSFFormulaEvaluator(HSSFSheet sheet, HSSFWorkbook workbook) { - this(workbook); -// if (false) { -// sheet.toString(); // suppress unused parameter compiler warning -// } - this._book = workbook; - } public HSSFFormulaEvaluator(HSSFWorkbook workbook) { this(workbook, null); this._book = workbook; diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFName.java b/src/java/org/apache/poi/hssf/usermodel/HSSFName.java index dc20afd1fa..13818f5b29 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFName.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFName.java @@ -162,24 +162,6 @@ public final class HSSFName implements Name { } } - /** - * Returns the formula that the name is defined to refer to. - * - * @deprecated (Nov 2008) Misleading name. Use {@link #getRefersToFormula()} instead. - */ - public String getReference() { - return getRefersToFormula(); - } - - /** - * Sets the formula that the name is defined to refer to. - * - * @deprecated (Nov 2008) Misleading name. Use {@link #setRefersToFormula(String)} instead. - */ - public void setReference(String ref){ - setRefersToFormula(ref); - } - public void setRefersToFormula(String formulaText) { Ptg[] ptgs = HSSFFormulaParser.parse(formulaText, _book, FormulaType.NAMEDRANGE, getSheetIndex()); _definedNameRec.setNameDefinition(ptgs); diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java b/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java index 7bf6721b19..c3354d6aa4 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFRow.java @@ -96,18 +96,6 @@ public final class HSSFRow implements Row, Comparable<HSSFRow> { } /** - * @deprecated (Aug 2008) use {@link HSSFRow#createCell(int) } - */ - public HSSFCell createCell(short columnIndex) { - return createCell((int)columnIndex); - } - /** - * @deprecated (Aug 2008) use {@link HSSFRow#createCell(int, int) } - */ - public HSSFCell createCell(short columnIndex, int type) { - return createCell((int)columnIndex, type); - } - /** * Use this to create new cells within the row and return it. * <p> * The cell that is returned is a CELL_TYPE_BLANK. The type can be changed @@ -343,14 +331,6 @@ public final class HSSFRow implements Row, Comparable<HSSFRow> { } /** - * @deprecated (Aug 2008) use {@link #getCell(int)} - */ - public HSSFCell getCell(short cellnum) { - int ushortCellNum = cellnum & 0x0000FFFF; // avoid sign extension - return getCell(ushortCellNum); - } - - /** * Get the hssfcell representing a given column (logical cell) * 0-based. If you ask for a cell that is not defined then * you get a null, unless you have set a different diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java index cfae1e92cf..20a31e9077 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java @@ -31,6 +31,7 @@ import java.io.PrintWriter; import java.nio.charset.Charset; import java.util.ArrayList; import java.util.Arrays; +import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.Hashtable; @@ -537,14 +538,13 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss } workbook.getWindowOne().setNumSelectedTabs((short)1); } + /** - * deprecated May 2008 - * @deprecated use setSelectedTab(int) + * Selects multiple sheets as a group. This is distinct from + * the 'active' sheet (which is the sheet with focus). + * + * @param indexes */ - @Deprecated - public void setSelectedTab(short index) { - setSelectedTab((int)index); - } public void setSelectedTabs(int[] indexes) { for (int index : indexes) { @@ -564,6 +564,24 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss } workbook.getWindowOne().setNumSelectedTabs((short)indexes.length); } + + /** + * Gets the selected sheets (if more than one, Excel calls these a [Group]). + * + * @return indices of selected sheets + */ + public Collection<Integer> getSelectedTabs() { + Collection<Integer> indexes = new ArrayList<Integer>(); + int nSheets = _sheets.size(); + for (int i=0; i<nSheets; i++) { + HSSFSheet sheet = getSheetAt(i); + if (sheet.isSelected()) { + indexes.add(i); + } + } + return Collections.unmodifiableCollection(indexes); + } + /** * Convenience method to set the active sheet. The active sheet is is the sheet * which is currently displayed when the workbook is viewed in Excel. @@ -591,14 +609,6 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss public int getActiveSheetIndex() { return workbook.getWindowOne().getActiveSheetIndex(); } - /** - * deprecated May 2008 - * @deprecated - Misleading name - use getActiveSheetIndex() - */ - @Deprecated - public short getSelectedTab() { - return (short) getActiveSheetIndex(); - } /** @@ -612,14 +622,6 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss public void setFirstVisibleTab(int index) { workbook.getWindowOne().setFirstVisibleTab(index); } - /** - * deprecated May 2008 - * @deprecated - Misleading name - use setFirstVisibleTab() - */ - @Deprecated - public void setDisplayedTab(short index) { - setFirstVisibleTab(index); - } /** * sets the first tab that is displayed in the list of tabs in excel. @@ -628,14 +630,6 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss public int getFirstVisibleTab() { return workbook.getWindowOne().getFirstVisibleTab(); } - /** - * deprecated May 2008 - * @deprecated - Misleading name - use getFirstVisibleTab() - */ - @Deprecated - public short getDisplayedTab() { - return (short) getFirstVisibleTab(); - } /** * Set the sheet name. @@ -728,42 +722,6 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss } /** - * Returns the external sheet index of the sheet - * with the given internal index, creating one - * if needed. - * Used by some of the more obscure formula and - * named range things. - * @deprecated for POI internal use only (formula parsing). This method is likely to - * be removed in future versions of POI. - */ - @Deprecated - public int getExternalSheetIndex(int internalSheetIndex) { - return workbook.checkExternSheet(internalSheetIndex); - } - /** - * @deprecated for POI internal use only (formula rendering). This method is likely to - * be removed in future versions of POI. - */ - @Deprecated - public String findSheetNameFromExternSheet(int externSheetIndex){ - // TODO - don't expose internal ugliness like externSheet indexes to the user model API - return workbook.findSheetFirstNameFromExternSheet(externSheetIndex); - } - /** - * @deprecated for POI internal use only (formula rendering). This method is likely to - * be removed in future versions of POI. - * - * @param refIndex Index to REF entry in EXTERNSHEET record in the Link Table - * @param definedNameIndex zero-based to DEFINEDNAME or EXTERNALNAME record - * @return the string representation of the defined or external name - */ - @Deprecated - public String resolveNameXText(int refIndex, int definedNameIndex) { - // TODO - make this less cryptic / move elsewhere - return workbook.resolveNameXText(refIndex, definedNameIndex); - } - - /** * create an HSSFSheet for this HSSFWorkbook, adds it to the sheets and returns * the high level representation. Use this to create new sheets. * @@ -967,16 +925,6 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss return _sheets.size(); } - /** - * @deprecated for POI internal use only (formula parsing). This method is likely to - * be removed in future versions of POI. - */ - @Deprecated - public int getSheetIndexFromExternSheetIndex(int externSheetNumber) { - // TODO - don't expose internal ugliness like externSheet indexes to the user model API - return workbook.getFirstSheetIndexFromExternSheetIndex(externSheetNumber); - } - private HSSFSheet[] getSheets() { HSSFSheet[] result = new HSSFSheet[_sheets.size()]; _sheets.toArray(result); @@ -1431,25 +1379,7 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss return retval; } - /** @deprecated Do not call this method from your applications. Use the methods - * available in the HSSFRow to add string HSSFCells - */ - @Deprecated - public int addSSTString(String string) - { - return workbook.addSSTString(new UnicodeString(string)); - } - - /** @deprecated Do not call this method from your applications. Use the methods - * available in the HSSFRow to get string HSSFCells - */ - @Deprecated - public String getSSTString(int index) - { - return workbook.getSSTString(index).getString(); - } - - InternalWorkbook getWorkbook() { + /*package*/ InternalWorkbook getWorkbook() { return workbook; } diff --git a/src/java/org/apache/poi/poifs/crypt/EncryptionHeader.java b/src/java/org/apache/poi/poifs/crypt/EncryptionHeader.java index b326b52a1a..b6a0e2d0c4 100644 --- a/src/java/org/apache/poi/poifs/crypt/EncryptionHeader.java +++ b/src/java/org/apache/poi/poifs/crypt/EncryptionHeader.java @@ -53,13 +53,6 @@ public abstract class EncryptionHeader { protected EncryptionHeader() {} - /** - * @deprecated use getChainingMode().ecmaId - */ - public int getCipherMode() { - return chainingMode.ecmaId; - } - public ChainingMode getChainingMode() { return chainingMode; } @@ -84,13 +77,6 @@ public abstract class EncryptionHeader { this.sizeExtra = sizeExtra; } - /** - * @deprecated use getCipherAlgorithm() - */ - public int getAlgorithm() { - return cipherAlgorithm.ecmaId; - } - public CipherAlgorithm getCipherAlgorithm() { return cipherAlgorithm; } @@ -99,13 +85,6 @@ public abstract class EncryptionHeader { this.cipherAlgorithm = cipherAlgorithm; } - /** - * @deprecated use getHashAlgorithmEx() - */ - public int getHashAlgorithm() { - return hashAlgorithm.ecmaId; - } - public HashAlgorithm getHashAlgorithmEx() { return hashAlgorithm; } @@ -138,13 +117,6 @@ public abstract class EncryptionHeader { this.keySalt = (salt == null) ? null : salt.clone(); } - /** - * @deprecated use getCipherProvider() - */ - public int getProviderType() { - return providerType.ecmaId; - } - public CipherProvider getCipherProvider() { return providerType; } diff --git a/src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java b/src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java index 6f8c04fd3b..780409e191 100644 --- a/src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java +++ b/src/java/org/apache/poi/poifs/crypt/EncryptionInfo.java @@ -145,78 +145,6 @@ public class EncryptionInfo { } /** - * @deprecated Use {@link #EncryptionInfo(EncryptionMode)} (fs parameter no longer required) - */ - @Deprecated - public EncryptionInfo(POIFSFileSystem fs, EncryptionMode encryptionMode) { - this(encryptionMode); - } - - /** - * @deprecated Use {@link #EncryptionInfo(EncryptionMode)} (fs parameter no longer required) - */ - @Deprecated - public EncryptionInfo(NPOIFSFileSystem fs, EncryptionMode encryptionMode) { - this(encryptionMode); - } - - /** - * @deprecated Use {@link #EncryptionInfo(EncryptionMode)} (dir parameter no longer required) - */ - @Deprecated - public EncryptionInfo(DirectoryNode dir, EncryptionMode encryptionMode) { - this(encryptionMode); - } - - /** - * @deprecated use {@link #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode)} - */ - @Deprecated - public EncryptionInfo( - POIFSFileSystem fs - , EncryptionMode encryptionMode - , CipherAlgorithm cipherAlgorithm - , HashAlgorithm hashAlgorithm - , int keyBits - , int blockSize - , ChainingMode chainingMode - ) { - this(encryptionMode, cipherAlgorithm, hashAlgorithm, keyBits, blockSize, chainingMode); - } - - /** - * @deprecated use {@link #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode)} - */ - @Deprecated - public EncryptionInfo( - NPOIFSFileSystem fs - , EncryptionMode encryptionMode - , CipherAlgorithm cipherAlgorithm - , HashAlgorithm hashAlgorithm - , int keyBits - , int blockSize - , ChainingMode chainingMode - ) { - this(encryptionMode, cipherAlgorithm, hashAlgorithm, keyBits, blockSize, chainingMode); - } - - /** - * @deprecated use {@link #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode)} - */ - @Deprecated - public EncryptionInfo( - DirectoryNode dir - , EncryptionMode encryptionMode - , CipherAlgorithm cipherAlgorithm - , HashAlgorithm hashAlgorithm - , int keyBits - , int blockSize - , ChainingMode chainingMode - ) { - this(encryptionMode, cipherAlgorithm, hashAlgorithm, keyBits, blockSize, chainingMode); - } - - /** * Prepares for encryption, using the given Encryption Mode, and * all other parameters as default. * @see #EncryptionInfo(EncryptionMode, CipherAlgorithm, HashAlgorithm, int, int, ChainingMode) diff --git a/src/java/org/apache/poi/poifs/crypt/EncryptionVerifier.java b/src/java/org/apache/poi/poifs/crypt/EncryptionVerifier.java index a782063e77..2688b50f41 100644 --- a/src/java/org/apache/poi/poifs/crypt/EncryptionVerifier.java +++ b/src/java/org/apache/poi/poifs/crypt/EncryptionVerifier.java @@ -37,28 +37,10 @@ public abstract class EncryptionVerifier { return salt; } - /** - * The method name is misleading - you'll get the encrypted verifier, not the plain verifier - * @deprecated use getEncryptedVerifier() - */ - @Deprecated - public byte[] getVerifier() { - return encryptedVerifier; - } - public byte[] getEncryptedVerifier() { return encryptedVerifier; } - /** - * The method name is misleading - you'll get the encrypted verifier hash, not the plain verifier hash - * @deprecated use getEnryptedVerifierHash - */ - @Deprecated - public byte[] getVerifierHash() { - return encryptedVerifierHash; - } - public byte[] getEncryptedVerifierHash() { return encryptedVerifierHash; } @@ -75,14 +57,6 @@ public abstract class EncryptionVerifier { return cipherAlgorithm.ecmaId; } - /** - * @deprecated use getCipherAlgorithm().jceId - */ - @Deprecated - public String getAlgorithmName() { - return cipherAlgorithm.jceId; - } - public byte[] getEncryptedKey() { return encryptedKey; } diff --git a/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java b/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java index d8a55563a2..5f473dbe1e 100644 --- a/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java +++ b/src/java/org/apache/poi/poifs/filesystem/EntryUtils.java @@ -99,7 +99,7 @@ public class EntryUtils * is the target Directory to copy to * @param excepts * is a list of Strings specifying what nodes NOT to copy - * @deprecated use {@link FilteringDirectoryNode} instead + * @deprecated POI 3.8 beta 5. Use {@link FilteringDirectoryNode} instead */ public static void copyNodes( DirectoryEntry sourceRoot, DirectoryEntry targetRoot, List<String> excepts ) diff --git a/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java b/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java index 99b7ab3931..11f18a40a6 100644 --- a/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java +++ b/src/java/org/apache/poi/poifs/filesystem/Ole10Native.java @@ -114,20 +114,6 @@ public class Ole10Native { setDataBuffer(data);
mode = EncodingMode.parsed;
}
-
- /**
- * Creates an instance and fills the fields based on the data in the given buffer.
- *
- * @param data The buffer containing the Ole10Native record
- * @param offset The start offset of the record in the buffer
- * @param plain as of POI 3.11 this parameter is ignored
- * @throws Ole10NativeException on invalid or unexcepted data format
- *
- * @deprecated parameter plain is ignored, use {@link #Ole10Native(byte[],int)}
- */
- public Ole10Native(byte[] data, int offset, boolean plain) throws Ole10NativeException {
- this(data, offset);
- }
/**
* Creates an instance and fills the fields based on the data in the given buffer.
diff --git a/src/java/org/apache/poi/ss/formula/LazyRefEval.java b/src/java/org/apache/poi/ss/formula/LazyRefEval.java index a483992f92..e0b5e19f93 100644 --- a/src/java/org/apache/poi/ss/formula/LazyRefEval.java +++ b/src/java/org/apache/poi/ss/formula/LazyRefEval.java @@ -35,10 +35,6 @@ final class LazyRefEval extends RefEvalBase { _evaluator = sre; } - @Deprecated - public ValueEval getInnerValueEval() { - return getInnerValueEval(_evaluator.getFirstSheetIndex()); - } public ValueEval getInnerValueEval(int sheetIndex) { return _evaluator.getEvalForCell(sheetIndex, getRow(), getColumn()); } diff --git a/src/java/org/apache/poi/ss/formula/eval/BlankEval.java b/src/java/org/apache/poi/ss/formula/eval/BlankEval.java index b49b2992ab..845e7deaab 100644 --- a/src/java/org/apache/poi/ss/formula/eval/BlankEval.java +++ b/src/java/org/apache/poi/ss/formula/eval/BlankEval.java @@ -24,10 +24,6 @@ package org.apache.poi.ss.formula.eval; public final class BlankEval implements ValueEval { public static final BlankEval instance = new BlankEval(); - /** - * @deprecated (Nov 2009) use {@link #instance} - */ - public static final BlankEval INSTANCE = instance; private BlankEval() { // enforce singleton diff --git a/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java b/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java index 199e45e351..28f5d2258b 100644 --- a/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java +++ b/src/java/org/apache/poi/ss/usermodel/ConditionalFormattingRule.java @@ -19,27 +19,11 @@ package org.apache.poi.ss.usermodel;
-import static org.apache.poi.ss.usermodel.ConditionType.*;
-
/**
* Represents a description of a conditional formatting rule
*/
public interface ConditionalFormattingRule {
/**
- * This conditional formatting rule compares a cell value
- * to a formula calculated result, using an operator
- * @deprecated Use {@link ConditionType#CELL_VALUE_IS}
- */
- public static final byte CONDITION_TYPE_CELL_VALUE_IS = CELL_VALUE_IS.id;
-
- /**
- * This conditional formatting rule contains a formula to evaluate.
- * When the formula result is true, the cell is highlighted.
- * @deprecated Use {@link ConditionType#FORMULA}
- */
- public static final byte CONDITION_TYPE_FORMULA = FORMULA.id;
-
- /**
* Create a new border formatting structure if it does not exist,
* otherwise just return existing object.
*
@@ -95,25 +79,14 @@ public interface ConditionalFormattingRule { /**
* Type of conditional formatting rule.
- * <p>
- * MUST be one of the IDs of a {@link ConditionType}
- * </p>
- *
- * @return the type of condition
- * @deprecated Use {@link #getConditionTypeType()}
- */
- byte getConditionType();
-
- /**
- * Type of conditional formatting rule.
*
* @return the type of condition
*/
- ConditionType getConditionTypeType();
+ ConditionType getConditionType();
/**
* The comparison function used when the type of conditional formatting is set to
- * {@link #CONDITION_TYPE_CELL_VALUE_IS}
+ * {@link ConditionType#CELL_VALUE_IS}
* <p>
* MUST be a constant from {@link ComparisonOperator}
* </p>
@@ -125,13 +98,13 @@ public interface ConditionalFormattingRule { /**
* The formula used to evaluate the first operand for the conditional formatting rule.
* <p>
- * If the condition type is {@link #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 #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.
* </p>
* <p>
- * If comparison type is {@link #CONDITION_TYPE_FORMULA} the formula MUST be a Boolean function
+ * If comparison type is {@link ConditionType#FORMULA} the formula MUST be a Boolean function
* </p>
*
* @return the first formula
@@ -140,7 +113,7 @@ public interface ConditionalFormattingRule { /**
* The formula used to evaluate the second operand of the comparison when
- * comparison type is {@link #CONDITION_TYPE_CELL_VALUE_IS} and operator
+ * comparison type is {@link ConditionType#CELL_VALUE_IS} and operator
* is either {@link ComparisonOperator#BETWEEN} or {@link ComparisonOperator#NOT_BETWEEN}
*
* @return the second formula
diff --git a/src/java/org/apache/poi/ss/util/CellRangeAddress.java b/src/java/org/apache/poi/ss/util/CellRangeAddress.java index 1f40cf693d..df8533f312 100644 --- a/src/java/org/apache/poi/ss/util/CellRangeAddress.java +++ b/src/java/org/apache/poi/ss/util/CellRangeAddress.java @@ -53,14 +53,6 @@ public class CellRangeAddress extends CellRangeAddressBase { throw new IllegalArgumentException("lastRow < firstRow || lastCol < firstCol"); } - /** - * @deprecated use {@link #serialize(LittleEndianOutput)} - */ - @Deprecated - public int serialize(int offset, byte[] data) { - serialize(new LittleEndianByteArrayOutputStream(data, offset, ENCODED_SIZE)); - return ENCODED_SIZE; - } public void serialize(LittleEndianOutput out) { out.writeShort(getFirstRow()); out.writeShort(getLastRow()); |