mirror of
https://github.com/apache/poi.git
synced 2026-02-27 12:30:08 +08:00
Avoid NPE when updating cell-anchors
This commit is contained in:
parent
839ce4a0f4
commit
1594baf696
@ -427,6 +427,10 @@ public class XSLFTable extends XSLFGraphicFrame implements Iterable<XSLFTableRow
|
||||
for (int col2=col+1; col2<col+tc.getGridSpan(); col2++) {
|
||||
assert(col2 < cols);
|
||||
XSLFTableCell tc2 = getCell(row, col2);
|
||||
if (tc2 == null) {
|
||||
LOG.warn("unavailable table span - rendering result is probably wrong");
|
||||
continue;
|
||||
}
|
||||
if (tc2.getGridSpan() != 1 || tc2.getRowSpan() != 1) {
|
||||
LOG.warn("invalid table span - rendering result is probably wrong");
|
||||
}
|
||||
@ -435,6 +439,10 @@ public class XSLFTable extends XSLFGraphicFrame implements Iterable<XSLFTableRow
|
||||
for (int row2=row+1; row2<row+tc.getRowSpan(); row2++) {
|
||||
assert(row2 < rows);
|
||||
XSLFTableCell tc2 = getCell(row2, col);
|
||||
if (tc2 == null) {
|
||||
LOG.warn("unavailable table span - rendering result is probably wrong");
|
||||
continue;
|
||||
}
|
||||
if (tc2.getGridSpan() != 1 || tc2.getRowSpan() != 1) {
|
||||
LOG.warn("invalid table span - rendering result is probably wrong");
|
||||
}
|
||||
|
||||
BIN
test-data/slideshow/LIBRE_OFFICE-100610-0.pptx
Executable file
BIN
test-data/slideshow/LIBRE_OFFICE-100610-0.pptx
Executable file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user