diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java index 3711fdfc1a..3d4b9cff21 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFShape.java @@ -472,7 +472,7 @@ public abstract class XSLFShape implements Shape { @Override public FlipMode getFlipMode() { 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: case STTileFlipMode.INT_NONE: return FlipMode.NONE; diff --git a/src/ooxml/testcases/org/apache/poi/ooxml/TestPOIXMLProperties.java b/src/ooxml/testcases/org/apache/poi/ooxml/TestPOIXMLProperties.java index 459ba812e4..ba0acca5c8 100644 --- a/src/ooxml/testcases/org/apache/poi/ooxml/TestPOIXMLProperties.java +++ b/src/ooxml/testcases/org/apache/poi/ooxml/TestPOIXMLProperties.java @@ -308,7 +308,7 @@ public final class TestPOIXMLProperties { } private static String zeroPad(long i) { - if (i >= 0 && i <=9) { + if (i >= 0 && i <= 9) { return "0" + i; } else { return String.valueOf(i);