suppress deprecation warnings in poi-ooxml

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1022452 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yegor Kozlov 2010-10-14 10:06:16 +00:00
parent 8f59cfbb23
commit 3279f4d9c3
4 changed files with 12 additions and 0 deletions

View File

@ -112,6 +112,7 @@ public class CommentsTable extends POIXMLDocumentPart {
return ct == null ? null : new XSSFComment(this, ct, null); return ct == null ? null : new XSSFComment(this, ct, null);
} }
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public CTComment getCTComment(String cellRef) { public CTComment getCTComment(String cellRef) {
// Create the cache if needed // Create the cache if needed
if(commentRefs == null) { if(commentRefs == null) {

View File

@ -339,6 +339,7 @@ public class XSSFRichTextString implements RichTextString {
/** /**
* Returns the plain string representation. * Returns the plain string representation.
*/ */
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public String getString() { public String getString() {
if(st.sizeOfRArray() == 0) { if(st.sizeOfRArray() == 0) {
return utfDecode(st.getT()); return utfDecode(st.getT());

View File

@ -185,6 +185,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* Read hyperlink relations, link them with CTHyperlink beans in this worksheet * Read hyperlink relations, link them with CTHyperlink beans in this worksheet
* and initialize the internal array of XSSFHyperlink objects * and initialize the internal array of XSSFHyperlink objects
*/ */
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
private void initHyperlinks() { private void initHyperlinks() {
hyperlinks = new ArrayList<XSSFHyperlink>(); hyperlinks = new ArrayList<XSSFHyperlink>();
@ -543,6 +544,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* *
* @return column indexes of all the vertical page breaks, never <code>null</code> * @return column indexes of all the vertical page breaks, never <code>null</code>
*/ */
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public int[] getColumnBreaks() { public int[] getColumnBreaks() {
if (!worksheet.isSetColBreaks() || worksheet.getColBreaks().sizeOfBrkArray() == 0) { if (!worksheet.isSetColBreaks() || worksheet.getColBreaks().sizeOfBrkArray() == 0) {
return new int[0]; return new int[0];
@ -998,6 +1000,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* *
* @return row indexes of all the horizontal page breaks, never <code>null</code> * @return row indexes of all the horizontal page breaks, never <code>null</code>
*/ */
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public int[] getRowBreaks() { public int[] getRowBreaks() {
if (!worksheet.isSetRowBreaks() || worksheet.getRowBreaks().sizeOfBrkArray() == 0) { if (!worksheet.isSetRowBreaks() || worksheet.getRowBreaks().sizeOfBrkArray() == 0) {
return new int[0]; return new int[0];
@ -1177,6 +1180,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
} }
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
private short getMaxOutlineLevelCols() { private short getMaxOutlineLevelCols() {
CTCols ctCols = worksheet.getColsArray(0); CTCols ctCols = worksheet.getColsArray(0);
short outlineLevel = 0; short outlineLevel = 0;
@ -1324,6 +1328,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
/** /**
* Removes a page break at the indicated column * Removes a page break at the indicated column
*/ */
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public void removeColumnBreak(int column) { public void removeColumnBreak(int column) {
CTBreak[] brkArray = getSheetTypeColumnBreaks().getBrkArray(); CTBreak[] brkArray = getSheetTypeColumnBreaks().getBrkArray();
for (int i = 0 ; i < brkArray.length ; i++) { for (int i = 0 ; i < brkArray.length ; i++) {
@ -1379,6 +1384,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
/** /**
* Removes the page break at the indicated row * Removes the page break at the indicated row
*/ */
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public void removeRowBreak(int row) { public void removeRowBreak(int row) {
CTPageBreak pgBreak = worksheet.isSetRowBreaks() ? worksheet.getRowBreaks() : worksheet.addNewRowBreaks(); CTPageBreak pgBreak = worksheet.isSetRowBreaks() ? worksheet.getRowBreaks() : worksheet.addNewRowBreaks();
CTBreak[] brkArray = pgBreak.getBrkArray(); CTBreak[] brkArray = pgBreak.getBrkArray();
@ -2134,6 +2140,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* @param copyRowHeight whether to copy the row height during the shift * @param copyRowHeight whether to copy the row height during the shift
* @param resetOriginalRowHeight whether to set the original row's height to the default * @param resetOriginalRowHeight whether to set the original row's height to the default
*/ */
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public void shiftRows(int startRow, int endRow, int n, boolean copyRowHeight, boolean resetOriginalRowHeight) { public void shiftRows(int startRow, int endRow, int n, boolean copyRowHeight, boolean resetOriginalRowHeight) {
for (Iterator<Row> it = rowIterator() ; it.hasNext() ; ) { for (Iterator<Row> it = rowIterator() ; it.hasNext() ; ) {
XSSFRow row = (XSSFRow)it.next(); XSSFRow row = (XSSFRow)it.next();
@ -2278,6 +2285,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
* *
* @param value <code>true</code> if this sheet is selected * @param value <code>true</code> if this sheet is selected
*/ */
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public void setSelected(boolean value) { public void setSelected(boolean value) {
CTSheetViews views = getSheetTypeSheetViews(); CTSheetViews views = getSheetTypeSheetViews();
for (CTSheetView view : views.getSheetViewArray()) { for (CTSheetView view : views.getSheetViewArray()) {
@ -2887,6 +2895,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
return dataValidationHelper; return dataValidationHelper;
} }
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public List<XSSFDataValidation> getDataValidations() { public List<XSSFDataValidation> getDataValidations() {
List<XSSFDataValidation> xssfValidations = new ArrayList<XSSFDataValidation>(); List<XSSFDataValidation> xssfValidations = new ArrayList<XSSFDataValidation>();
CTDataValidations dataValidations = this.worksheet.getDataValidations(); CTDataValidations dataValidations = this.worksheet.getDataValidations();

View File

@ -879,6 +879,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, Iterable<X
* which is currently displayed when the workbook is viewed in Excel. * which is currently displayed when the workbook is viewed in Excel.
* 'Selected' sheet(s) is a distinct concept. * 'Selected' sheet(s) is a distinct concept.
*/ */
@SuppressWarnings("deprecation") //YK: getXYZArray() array accessors are deprecated in xmlbeans with JDK 1.5 support
public void setActiveSheet(int index) { public void setActiveSheet(int index) {
validateSheetIndex(index); validateSheetIndex(index);