]> source.dussan.org Git - poi.git/commitdiff
Correctly initialize text shapes' first paragraph
authorAlain Béarez <abearez@apache.org>
Tue, 10 Dec 2019 00:10:52 +0000 (00:10 +0000)
committerAlain Béarez <abearez@apache.org>
Tue, 10 Dec 2019 00:10:52 +0000 (00:10 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1871112 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFAutoShape.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java

index aad07d158c7c2f03c35416795938d34f3bccaf40..744ccfd175a3d53e7fec1e43ae94ddccd28aba32 100644 (file)
@@ -81,6 +81,7 @@ public class XSLFAutoShape extends XSLFTextShape implements AutoShape<XSLFShape,
             initTextBody(body);
             shape.setTxBody(body.getXmlObject());
             txBody = shape.getTxBody();
+            getTextParagraphs().add(newTextParagraph(txBody.getPArray(0)));
         }
         return txBody;
     }
index 0a78a2171eb1fcf8a1cf3182dbde8e6d1857514b..5071852aec4dd5f16f2832c37602d00aca36dc5d 100644 (file)
@@ -92,6 +92,7 @@ public class XSLFTableCell extends XSLFTextShape implements TableCell<XSLFShape,
             initTextBody(body);
             cell.setTxBody(body.getXmlObject());
             txBody = cell.getTxBody();
+            getTextParagraphs().add(newTextParagraph(txBody.getPArray(0)));
         }
         return txBody;
     }