From a9ec119c40f0a81999e1d9cfa9166c3e8699b307 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alain=20B=C3=A9arez?= Date: Sat, 11 Apr 2020 21:43:18 +0000 Subject: [PATCH] Return and set paragraph indentation level git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1876406 13f79535-47bb-0310-9956-ffa450edef68 --- .../usermodel/text/XDDFTextParagraph.java | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFTextParagraph.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFTextParagraph.java index 97082725c1..b5e3378795 100644 --- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFTextParagraph.java +++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFTextParagraph.java @@ -171,6 +171,32 @@ public class XDDFTextParagraph { return run; } + /** + * Returns the paragraph indentation level. + * + * @return indentation level of the paragraph. + */ + public int getIndentationLevel() { + if (_p.isSetPPr()) { + return getProperties().getLevel(); + } else { + return 0; + } + } + + /** + * Specifies the paragraph indentation level, between 1 and 9. + * + * @param level + * new indentation level for the paragraph. + * Use null to unset the indentation level. + */ + public void setIndentationLevel(Integer level) { + if (_p.isSetPPr()) { + getProperties().setLevel(level); + } + } + /** * Returns the alignment that is applied to the paragraph. * -- 2.39.5