poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1875328 - in /poi/trunk/src/ooxml/java/org/apache/poi: xddf/usermodel/text/XDDFParagraphBulletProperties.java xslf/usermodel/XSLFPlaceholderDetails.java xslf/usermodel/XSLFSheet.java
Date Tue, 17 Mar 2020 22:04:09 GMT
Author: kiwiwings
Date: Tue Mar 17 22:04:09 2020
New Revision: 1875328

URL: http://svn.apache.org/viewvc?rev=1875328&view=rev
Log:
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

Modified:
    poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFParagraphBulletProperties.java
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPlaceholderDetails.java
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFParagraphBulletProperties.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFParagraphBulletProperties.java?rev=1875328&r1=1875327&r2=1875328&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFParagraphBulletProperties.java
(original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xddf/usermodel/text/XDDFParagraphBulletProperties.java
Tue Mar 17 22:04:09 2020
@@ -204,4 +204,8 @@ public class XDDFParagraphBulletProperti
             props.unsetBuSzTx();
         }
     }
+
+    public CTTextParagraphProperties getXmlObject() {
+        return props;
+    }
 }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPlaceholderDetails.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPlaceholderDetails.java?rev=1875328&r1=1875327&r2=1875328&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPlaceholderDetails.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPlaceholderDetails.java Tue
Mar 17 22:04:09 2020
@@ -59,6 +59,16 @@ public class XSLFPlaceholderDetails impl
         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 impl
             if (placeholder != null) {
                 ph.setType(STPlaceholderType.Enum.forInt(placeholder.ooxmlId));
             } else {
-                getNvProps().unsetPh();
+                CTApplicationNonVisualDrawingProps nvProps = getNvProps();
+                if (nvProps != null) {
+                    nvProps.unsetPh();
+                }
             }
         }
     }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java?rev=1875328&r1=1875327&r2=1875328&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFSheet.java Tue Mar 17 22:04:09
2020
@@ -49,6 +49,7 @@ import org.apache.poi.sl.usermodel.Place
 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<XSL
         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());



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org


Mime
View raw message