diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2020-03-17 22:04:09 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2020-03-17 22:04:09 +0000 |
commit | a54394de7c31dfdfde7c2da67c101c9b526e73ba (patch) | |
tree | 8c3cc185492ebff1fda8951f431d7456893491ed /src/ooxml/java/org/apache/poi | |
parent | e807eed5287743f86cf06f90eaeb6c6ab6c3b58b (diff) | |
download | poi-a54394de7c31dfdfde7c2da67c101c9b526e73ba.tar.gz poi-a54394de7c31dfdfde7c2da67c101c9b526e73ba.zip |
Make SlideLayout bullets accessible
based on question from mailing list:
http://apache-poi.1045710.n5.nabble.com/PPTX-how-to-get-the-marked-list-with-adjacent-icons-tp5734952.html
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1875328 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org/apache/poi')
3 files changed, 21 insertions, 2 deletions
diff --git a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFParagraphBulletProperties.java b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFParagraphBulletProperties.java index 9875d583cd..3e3249d3bd 100644 --- a/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFParagraphBulletProperties.java +++ b/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFParagraphBulletProperties.java @@ -204,4 +204,8 @@ public class XDDFParagraphBulletProperties { props.unsetBuSzTx(); } } + + public CTTextParagraphProperties getXmlObject() { + return props; + } } diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPlaceholderDetails.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPlaceholderDetails.java index 6cb179d964..b0f94e529f 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPlaceholderDetails.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPlaceholderDetails.java @@ -59,6 +59,16 @@ public class XSLFPlaceholderDetails implements PlaceholderDetails { return Placeholder.lookupOoxml(ph.getType().intValue()); } + public XSLFSimpleShape getPlaceholderShape() { + CTPlaceholder ph = getCTPlaceholder(false); + if (ph == null) { + return null; + } + XSLFSheet sheet = (XSLFSheet)shape.getSheet().getMasterSheet(); + return sheet.getPlaceholder(ph); + } + + @Override public void setPlaceholder(final Placeholder placeholder) { CTPlaceholder ph = getCTPlaceholder(placeholder != null); @@ -66,7 +76,10 @@ public class XSLFPlaceholderDetails implements PlaceholderDetails { if (placeholder != null) { ph.setType(STPlaceholderType.Enum.forInt(placeholder.ooxmlId)); } else { - getNvProps().unsetPh(); + CTApplicationNonVisualDrawingProps nvProps = getNvProps(); + if (nvProps != null) { + nvProps.unsetPh(); + } } } } diff --git a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java index d78a35bee2..59945d51db 100644 --- a/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java +++ b/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java @@ -49,6 +49,7 @@ import org.apache.poi.sl.usermodel.Placeholder; import org.apache.poi.sl.usermodel.Sheet; import org.apache.poi.util.Beta; import org.apache.poi.util.IOUtils; +import org.apache.poi.util.Internal; import org.apache.poi.util.POILogFactory; import org.apache.poi.util.POILogger; import org.apache.poi.util.Units; @@ -540,7 +541,8 @@ implements XSLFShapeContainer, Sheet<XSLFShape,XSLFTextParagraph> { return getPlaceholderByType(ph.ooxmlId); } - XSLFSimpleShape getPlaceholder(CTPlaceholder ph) { + @Internal + public XSLFSimpleShape getPlaceholder(CTPlaceholder ph) { XSLFSimpleShape shape = null; if(ph.isSetIdx()) { shape = getPlaceholderById((int)ph.getIdx()); |