revert back to changes of bug 57840

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1747945 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2016-06-12 00:54:01 +00:00
parent f919e8bd8a
commit 6a6aa540eb

View File

@ -72,7 +72,7 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
_cells = new TreeMap<Integer, XSSFCell>(); _cells = new TreeMap<Integer, XSSFCell>();
for (CTCell c : row.getCArray()) { for (CTCell c : row.getCArray()) {
XSSFCell cell = new XSSFCell(this, c); XSSFCell cell = new XSSFCell(this, c);
_cells.put(cell.getColumnIndex(), cell); _cells.put(new Integer(cell.getColumnIndex()), cell);
sheet.onReadCell(cell); sheet.onReadCell(cell);
} }
} }
@ -198,7 +198,7 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
*/ */
public XSSFCell createCell(int columnIndex, int type) { public XSSFCell createCell(int columnIndex, int type) {
CTCell ctCell; CTCell ctCell;
XSSFCell prev = _cells.get(columnIndex); XSSFCell prev = _cells.get(new Integer(columnIndex));
if(prev != null){ if(prev != null){
ctCell = prev.getCTCell(); ctCell = prev.getCTCell();
ctCell.set(CTCell.Factory.newInstance()); ctCell.set(CTCell.Factory.newInstance());
@ -210,7 +210,7 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
if (type != Cell.CELL_TYPE_BLANK) { if (type != Cell.CELL_TYPE_BLANK) {
xcell.setCellType(type); xcell.setCellType(type);
} }
_cells.put(columnIndex, xcell); _cells.put(new Integer(columnIndex), xcell);
return xcell; return xcell;
} }
@ -236,7 +236,7 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
public XSSFCell getCell(int cellnum, MissingCellPolicy policy) { public XSSFCell getCell(int cellnum, MissingCellPolicy policy) {
if(cellnum < 0) throw new IllegalArgumentException("Cell index must be >= 0"); if(cellnum < 0) throw new IllegalArgumentException("Cell index must be >= 0");
XSSFCell cell = _cells.get(cellnum); XSSFCell cell = _cells.get(new Integer(cellnum));
if(policy == RETURN_NULL_AND_BLANK) { if(policy == RETURN_NULL_AND_BLANK) {
return cell; return cell;
} }
@ -455,7 +455,7 @@ public class XSSFRow implements Row, Comparable<XSSFRow> {
if(cell.getCellType() == Cell.CELL_TYPE_FORMULA) { if(cell.getCellType() == Cell.CELL_TYPE_FORMULA) {
_sheet.getWorkbook().onDeleteFormula(xcell); _sheet.getWorkbook().onDeleteFormula(xcell);
} }
_cells.remove(cell.getColumnIndex()); _cells.remove(new Integer(cell.getColumnIndex()));
} }
/** /**