mirror of
https://github.com/apache/poi.git
synced 2026-02-27 20:40:08 +08:00
edge case (avoid short overflow)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1907066 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1cf4094e2d
commit
cde87ab3c6
@ -1706,9 +1706,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet, OoxmlSheetEx
|
||||
index = Math.toIntExact(col.getMax());
|
||||
}
|
||||
worksheet.setColsArray(0, ctCols);
|
||||
if (maxLevelCol > getSheetFormatPrOutlineLevelCol()) {
|
||||
increaseSheetFormatPrOutlineLevelColIfNecessary((short) maxLevelCol);
|
||||
}
|
||||
increaseSheetFormatPrOutlineLevelColIfNecessary((short) Math.min(Short.MAX_VALUE, maxLevelCol));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1743,9 +1741,7 @@ public class XSSFSheet extends POIXMLDocumentPart implements Sheet, OoxmlSheetEx
|
||||
maxOutlineLevel = Math.max(maxOutlineLevel, newOutlineLevel);
|
||||
ctrow.setOutlineLevel((short) newOutlineLevel);
|
||||
}
|
||||
if (maxOutlineLevel >= 0) {
|
||||
increaseSheetFormatPrOutlineLevelRowIfNecessary((short) maxOutlineLevel);
|
||||
}
|
||||
increaseSheetFormatPrOutlineLevelRowIfNecessary((short) Math.min(Short.MAX_VALUE, maxOutlineLevel));
|
||||
}
|
||||
|
||||
private short getMaxOutlineLevelRows(){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user