diff options
Diffstat (limited to 'src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java')
-rw-r--r-- | src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java index 6ce7e2ac3d..778f020f29 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFSettings.java @@ -84,7 +84,12 @@ public class XWPFSettings extends POIXMLDocumentPart { zoom = ctSettings.getZoom(); } - return zoom.getPercent().longValue(); + + BigInteger percent = zoom.getPercent(); + if(percent == null) { + return 100; + } + return percent.longValue(); } /** |