You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by "AntonOellerer (via GitHub)" <gi...@apache.org> on 2023/08/17 11:30:28 UTC

[GitHub] [poi] AntonOellerer commented on a diff in pull request #503: Fully replace content of XWPFTableCell on `setText`

AntonOellerer commented on code in PR #503:
URL: https://github.com/apache/poi/pull/503#discussion_r1297089117


##########
poi-ooxml/src/main/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java:
##########
@@ -423,6 +423,8 @@ public String getText() {
 
     public void setText(String text) {
         XWPFParagraph par = paragraphs.isEmpty() ? addParagraph() : paragraphs.get(0);
+        par.getRuns().clear();
+        par.getIRuns().clear();

Review Comment:
   Done, testing also exposed an issue in how the `setText` was done, which has been fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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