mirror of https://github.com/apache/poi.git
add null check
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1868317 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a564c52311
commit
1f6a3c99ae
|
@ -472,7 +472,7 @@ public abstract class XSLFShape implements Shape<XSLFShape,XSLFTextParagraph> {
|
||||||
@Override
|
@Override
|
||||||
public FlipMode getFlipMode() {
|
public FlipMode getFlipMode() {
|
||||||
CTTileInfoProperties tile = blipFill.getTile();
|
CTTileInfoProperties tile = blipFill.getTile();
|
||||||
switch (tile == null ? STTileFlipMode.INT_NONE : tile.getFlip().intValue()) {
|
switch (tile == null || tile.getFlip() == null ? STTileFlipMode.INT_NONE : tile.getFlip().intValue()) {
|
||||||
default:
|
default:
|
||||||
case STTileFlipMode.INT_NONE:
|
case STTileFlipMode.INT_NONE:
|
||||||
return FlipMode.NONE;
|
return FlipMode.NONE;
|
||||||
|
|
|
@ -308,7 +308,7 @@ public final class TestPOIXMLProperties {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String zeroPad(long i) {
|
private static String zeroPad(long i) {
|
||||||
if (i >= 0 && i <=9) {
|
if (i >= 0 && i <= 9) {
|
||||||
return "0" + i;
|
return "0" + i;
|
||||||
} else {
|
} else {
|
||||||
return String.valueOf(i);
|
return String.valueOf(i);
|
||||||
|
|
Loading…
Reference in New Issue