diff options
author | Alain Béarez <abearez@apache.org> | 2018-08-26 21:19:07 +0000 |
---|---|---|
committer | Alain Béarez <abearez@apache.org> | 2018-08-26 21:19:07 +0000 |
commit | 262bb83d008edbb77fd95ef675d0225308032f26 (patch) | |
tree | b21a1ff8488f7cd75f98e270744a041fcfdf1c7b /src/ooxml/java | |
parent | aadd9cff068530c5db60fd29ed445664e38dcf81 (diff) | |
download | poi-262bb83d008edbb77fd95ef675d0225308032f26.tar.gz poi-262bb83d008edbb77fd95ef675d0225308032f26.zip |
complete body properties with insets
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1839256 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java')
-rw-r--r-- | src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFBodyProperties.java | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFBodyProperties.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFBodyProperties.java index d21a76c9f7..994770ee75 100644 --- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFBodyProperties.java +++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFBodyProperties.java @@ -19,6 +19,7 @@ package org.apache.poi.xddf.usermodel.text; import org.apache.poi.util.Beta; import org.apache.poi.util.Internal; +import org.apache.poi.util.Units; import org.apache.poi.xddf.usermodel.XDDFExtensionList; import org.openxmlformats.schemas.drawingml.x2006.main.CTTextBodyProperties; @@ -75,4 +76,68 @@ public class XDDFBodyProperties { props.setExtLst(list.getXmlObject()); } } + + public Double getBottomInset() { + if (props.isSetBIns()) { + return Units.toPoints(props.getBIns()); + } else { + return null; + } + } + + public void setBottomInset(Double points) { + if (points == null || Double.isNaN(points)) { + props.unsetBIns(); + } else { + props.setBIns(Units.toEMU(points)); + } + } + + public Double getLeftInset() { + if (props.isSetLIns()) { + return Units.toPoints(props.getLIns()); + } else { + return null; + } + } + + public void setLeftInset(Double points) { + if (points == null || Double.isNaN(points)) { + props.unsetLIns(); + } else { + props.setLIns(Units.toEMU(points)); + } + } + + public Double getRightInset() { + if (props.isSetRIns()) { + return Units.toPoints(props.getRIns()); + } else { + return null; + } + } + + public void setRightInset(Double points) { + if (points == null || Double.isNaN(points)) { + props.unsetRIns(); + } else { + props.setRIns(Units.toEMU(points)); + } + } + + public Double getTopInset() { + if (props.isSetTIns()) { + return Units.toPoints(props.getTIns()); + } else { + return null; + } + } + + public void setTopInset(Double points) { + if (points == null || Double.isNaN(points)) { + props.unsetTIns(); + } else { + props.setTIns(Units.toEMU(points)); + } + } } |