diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java index 50cc38fb7..07dc096c5 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTable.java @@ -81,7 +81,7 @@ public class XSLFTable extends XSLFGraphicFrame implements Iterable(_table.sizeOfTrArray()); - for(CTTableRow row : _table.getTrArray()) { + for(CTTableRow row : _table.getTrList()) { _rows.add(new XSLFTableRow(row, this)); } updateRowColIndexes(); diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java index e0cf82fe2..160ad5faf 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableStyles.java @@ -50,9 +50,9 @@ public class XSLFTableStyles extends POIXMLDocumentPart implements Iterable(tblStyleArray.length); - for(CTTableStyle c : tblStyleArray){ + List tblStyles = _tblStyleLst.getTblStyleList(); + _styles = new ArrayList<>(tblStyles.size()); + for(CTTableStyle c : tblStyles){ _styles.add(new XSLFTableStyle(c)); } } diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java index 9d2f71470..68b4b22a2 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTextParagraph.java @@ -838,7 +838,7 @@ public class XSLFTextParagraph implements TextParagraph otherRs = other.getTextRuns(); int i=0; - for(CTRegularTextRun rtr : thisP.getRArray()) { + for(CTRegularTextRun rtr : thisP.getRList()) { XSLFTextRun run = newTextRun(rtr); run.copy(otherRs.get(i++)); _runs.add(run); diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java index bccbbf167..0aa772086 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/helpers/ColumnHelper.java @@ -53,8 +53,7 @@ public class ColumnHelper { int i = 0; for (i = 0; i < colsArray.length; i++) { CTCols cols = colsArray[i]; - CTCol[] colArray = cols.getColArray(); - for (CTCol col : colArray) { + for (CTCol col : cols.getColList()) { addCleanColIntoCols(newCols, col, trackedCols); } } @@ -310,7 +309,7 @@ public class ColumnHelper { } 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) { return true; } @@ -321,7 +320,7 @@ public class ColumnHelper { public int getIndexOfColumn(CTCols cols, CTCol searchCol) { if (cols == null || searchCol == null) return -1; int i = 0; - for (CTCol col : cols.getColArray()) { + for (CTCol col : cols.getColList()) { if (col.getMin() == searchCol.getMin() && col.getMax() == searchCol.getMax()) { return i; }