fix some deprecation warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1833116 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2018-06-07 12:01:49 +00:00
parent 232bf3a776
commit 74ff20d363
4 changed files with 8 additions and 9 deletions

View File

@ -81,7 +81,7 @@ public class XSLFTable extends XSLFGraphicFrame implements Iterable<XSLFTableRow
} }
_rows = new ArrayList<>(_table.sizeOfTrArray()); _rows = new ArrayList<>(_table.sizeOfTrArray());
for(CTTableRow row : _table.getTrArray()) { for(CTTableRow row : _table.getTrList()) {
_rows.add(new XSLFTableRow(row, this)); _rows.add(new XSLFTableRow(row, this));
} }
updateRowColIndexes(); updateRowColIndexes();

View File

@ -50,9 +50,9 @@ public class XSLFTableStyles extends POIXMLDocumentPart implements Iterable<XSLF
TblStyleLstDocument styleDoc = TblStyleLstDocument.Factory.parse(is); TblStyleLstDocument styleDoc = TblStyleLstDocument.Factory.parse(is);
is.close(); is.close();
_tblStyleLst = styleDoc.getTblStyleLst(); _tblStyleLst = styleDoc.getTblStyleLst();
CTTableStyle[] tblStyleArray = _tblStyleLst.getTblStyleArray(); List<CTTableStyle> tblStyles = _tblStyleLst.getTblStyleList();
_styles = new ArrayList<>(tblStyleArray.length); _styles = new ArrayList<>(tblStyles.size());
for(CTTableStyle c : tblStyleArray){ for(CTTableStyle c : tblStyles){
_styles.add(new XSLFTableStyle(c)); _styles.add(new XSLFTableStyle(c));
} }
} }

View File

@ -838,7 +838,7 @@ public class XSLFTextParagraph implements TextParagraph<XSLFShape,XSLFTextParagr
List<XSLFTextRun> otherRs = other.getTextRuns(); List<XSLFTextRun> otherRs = other.getTextRuns();
int i=0; int i=0;
for(CTRegularTextRun rtr : thisP.getRArray()) { for(CTRegularTextRun rtr : thisP.getRList()) {
XSLFTextRun run = newTextRun(rtr); XSLFTextRun run = newTextRun(rtr);
run.copy(otherRs.get(i++)); run.copy(otherRs.get(i++));
_runs.add(run); _runs.add(run);

View File

@ -53,8 +53,7 @@ public class ColumnHelper {
int i = 0; int i = 0;
for (i = 0; i < colsArray.length; i++) { for (i = 0; i < colsArray.length; i++) {
CTCols cols = colsArray[i]; CTCols cols = colsArray[i];
CTCol[] colArray = cols.getColArray(); for (CTCol col : cols.getColList()) {
for (CTCol col : colArray) {
addCleanColIntoCols(newCols, col, trackedCols); addCleanColIntoCols(newCols, col, trackedCols);
} }
} }
@ -310,7 +309,7 @@ public class ColumnHelper {
} }
private boolean columnExists(CTCols cols, long min, long max) { private boolean columnExists(CTCols cols, long min, long max) {
for (CTCol col : cols.getColArray()) { for (CTCol col : cols.getColList()) {
if (col.getMin() == min && col.getMax() == max) { if (col.getMin() == min && col.getMax() == max) {
return true; return true;
} }
@ -321,7 +320,7 @@ public class ColumnHelper {
public int getIndexOfColumn(CTCols cols, CTCol searchCol) { public int getIndexOfColumn(CTCols cols, CTCol searchCol) {
if (cols == null || searchCol == null) return -1; if (cols == null || searchCol == null) return -1;
int i = 0; int i = 0;
for (CTCol col : cols.getColArray()) { for (CTCol col : cols.getColList()) {
if (col.getMin() == searchCol.getMin() && col.getMax() == searchCol.getMax()) { if (col.getMin() == searchCol.getMin() && col.getMax() == searchCol.getMax()) {
return i; return i;
} }