update indents
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1835482 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7dc47ceefe
commit
6f3cc9ed80
@ -3018,15 +3018,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
|
|||||||
rowShifter.updateConditionalFormatting(formulaShifter);
|
rowShifter.updateConditionalFormatting(formulaShifter);
|
||||||
rowShifter.updateHyperlinks(formulaShifter);
|
rowShifter.updateHyperlinks(formulaShifter);
|
||||||
|
|
||||||
//rebuild the _rows map
|
rebuildRows();
|
||||||
Map<Integer, XSSFRow> map = new HashMap<>();
|
|
||||||
for(XSSFRow r : _rows.values()) {
|
|
||||||
// Performance optimization: explicit boxing is slightly faster than auto-unboxing, though may use more memory
|
|
||||||
final Integer rownumI = new Integer(r.getRowNum()); // NOSONAR
|
|
||||||
map.put(rownumI, r);
|
|
||||||
}
|
|
||||||
_rows.clear();
|
|
||||||
_rows.putAll(map);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -3051,14 +3043,18 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet {
|
|||||||
columnShifter.updateHyperlinks(formulaShifter);
|
columnShifter.updateHyperlinks(formulaShifter);
|
||||||
columnShifter.updateNamedRanges(formulaShifter);
|
columnShifter.updateNamedRanges(formulaShifter);
|
||||||
|
|
||||||
//rebuild the _rows map
|
rebuildRows();
|
||||||
Map<Integer, XSSFRow> map = new HashMap<>();
|
|
||||||
for(XSSFRow r : _rows.values()) {
|
|
||||||
final Integer rownumI = new Integer(r.getRowNum()); // NOSONAR
|
|
||||||
map.put(rownumI, r);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private final void rebuildRows() {
|
||||||
|
//rebuild the _rows map
|
||||||
|
List<XSSFRow> rowList = new ArrayList<>(_rows.values());
|
||||||
_rows.clear();
|
_rows.clear();
|
||||||
_rows.putAll(map);
|
for(XSSFRow r : rowList) {
|
||||||
|
// Performance optimization: explicit boxing is slightly faster than auto-unboxing, though may use more memory
|
||||||
|
final Integer rownumI = new Integer(r.getRowNum()); // NOSONAR
|
||||||
|
_rows.put(rownumI, r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// remove all rows which will be overwritten
|
// remove all rows which will be overwritten
|
||||||
|
@ -368,7 +368,7 @@ public final class TestUnfixedBugs {
|
|||||||
private void assertThatRowsInAscendingOrder(final XSSFWorkbook wb) {
|
private void assertThatRowsInAscendingOrder(final XSSFWorkbook wb) {
|
||||||
// Check that CTRows are stored in ascending order of row index
|
// Check that CTRows are stored in ascending order of row index
|
||||||
long maxSeenRowNum = 0; //1-based
|
long maxSeenRowNum = 0; //1-based
|
||||||
for (final CTRow ctRow : wb.getSheetAt(0).getCTWorksheet().getSheetData().getRowArray()) {
|
for (final CTRow ctRow : wb.getSheetAt(0).getCTWorksheet().getSheetData().getRowList()) {
|
||||||
final long rowNum = ctRow.getR(); //1-based
|
final long rowNum = ctRow.getR(); //1-based
|
||||||
assertTrue("Row " + rowNum + " (1-based) is not in ascending order; previously saw " + maxSeenRowNum,
|
assertTrue("Row " + rowNum + " (1-based) is not in ascending order; previously saw " + maxSeenRowNum,
|
||||||
rowNum > maxSeenRowNum);
|
rowNum > maxSeenRowNum);
|
||||||
|
Loading…
Reference in New Issue
Block a user