diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2020-12-12 23:15:20 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2020-12-12 23:15:20 +0000 |
commit | c5f6dfa68e04c5a42b64b3f862756b9c990665dc (patch) | |
tree | abeaa3d26edfb046c64ef744451648999b0d3a53 /src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java | |
parent | 1f072afe18b3022f90a7f2dae52b9606b459e045 (diff) | |
download | poi-c5f6dfa68e04c5a42b64b3f862756b9c990665dc.tar.gz poi-c5f6dfa68e04c5a42b64b3f862756b9c990665dc.zip |
Bug 56205 - Upgrade OOXML schema to 3rd edition (transitional)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1884368 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java')
-rw-r--r-- | src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java index 4d6fc246a5..848c8c86c3 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureShape.java @@ -35,6 +35,7 @@ import javax.imageio.ImageIO; import javax.xml.namespace.QName; import javax.xml.stream.XMLStreamReader; +import org.apache.poi.ooxml.util.POIXMLUnits; import org.apache.poi.ooxml.util.XPathHelper; import org.apache.poi.openxml4j.opc.PackagePart; import org.apache.poi.openxml4j.opc.PackageRelationship; @@ -216,7 +217,12 @@ public class XSLFPictureShape extends XSLFSimpleShape @Override public Insets getClipping(){ CTRelativeRect r = getBlipFill().getSrcRect(); - return (r == null) ? null : new Insets(r.getT(), r.getL(), r.getB(), r.getR()); + + return (r == null) ? null : new Insets( + POIXMLUnits.parsePercent(r.xgetT()), + POIXMLUnits.parsePercent(r.xgetL()), + POIXMLUnits.parsePercent(r.xgetB()), + POIXMLUnits.parsePercent(r.xgetR())); } /** |