aboutsummaryrefslogtreecommitdiffstats
path: root/poi
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2021-04-22 22:09:14 +0000
committerAndreas Beeker <kiwiwings@apache.org>2021-04-22 22:09:14 +0000
commit1d594451d8b0ebee8f771aae1b59080e46c982a0 (patch)
treee44fc121fe4f94e04c409bcec032cb4199331abf /poi
parent48d3c6827086c2d0209852c08be37ef502fb4b0d (diff)
downloadpoi-1d594451d8b0ebee8f771aae1b59080e46c982a0.tar.gz
poi-1d594451d8b0ebee8f771aae1b59080e46c982a0.zip
#65228 - the method getCap() does not work correctly in xslf.usermodel.XSLFTextRun
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1889111 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi')
-rw-r--r--poi/src/main/java/org/apache/poi/sl/image/ImageHeaderEMF.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderEMF.java b/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderEMF.java
index 6dd5faf440..646c88eb9d 100644
--- a/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderEMF.java
+++ b/poi/src/main/java/org/apache/poi/sl/image/ImageHeaderEMF.java
@@ -50,7 +50,7 @@ public class ImageHeaderEMF {
int top = LittleEndian.getInt(data, offset); offset += 4;
int right = LittleEndian.getInt(data, offset); offset += 4;
int bottom = LittleEndian.getInt(data, offset); offset += 4;
- deviceBounds = new Rectangle(left, top, right-left, bottom-top);
+ deviceBounds = new Rectangle(left, top, right-left == -1 ? 0 : right-left, bottom-top == -1 ? 0 : bottom-top);
// ignore frame bounds
offset += 16;
String signature = new String(data, offset, EMF_SIGNATURE.length(), LocaleUtil.CHARSET_1252);