elementList = new ArrayList(); for (Comment comment : ((CommentsPart) relPart .getPart(rs)).getJaxbElement().getComment()) { elementList.addAll(comment.getEGBlockLevelElts());
elementList = new ArrayList(); for (Comment comment : ((CommentsPart) relPart .getPart(rs)).getJaxbElement().getComment()) { elementList.addAll(comment.getEGBlockLevelElts());
public void addNewComment(String author, String text) { // XMLGregorianCalendar xmlCal = new XMLGregorianCalendarImpl(); // You'll need to fix this! // CommentRangeEnd cRangeEnde = wmlObjectFactory.createCommentRangeEnd(); // CommentRangeStart cRangeStart = wmlObjectFactory // .createCommentRangeStart(); Comments comment = wmlObjectFactory.createComments(); // Comments.Comment myCom = wm org.docx4j.wml.Comments.Comment c = Context.getWmlObjectFactory().createCommentsComment(); System.out.println("test"); // comment.setParent(cmPart); c.setAuthor(author); // c.setDate(xmlCal); cmPart.getJaxbElement().getComment().add(c); System.out.println("test ende"); }
private static void collectComments(final Map<BigInteger, CommentWrapper> comments, WordprocessingMLPackage document) { try { CommentsPart commentsPart = (CommentsPart) document.getParts() .get(new PartName("/word/comments.xml")); if (commentsPart != null) { for (Comments.Comment comment : commentsPart.getContents().getComment()) { CommentWrapper commentWrapper = comments.get(comment.getId()); if (commentWrapper != null) { commentWrapper.setComment(comment); } } } } catch (Docx4JException e) { throw new IllegalStateException(e); } }
.get(new PartName("/word/comments.xml")); Comments comments = commentsPart.getContents(); for (Comments.Comment comment : comments.getComment()) { if (comment.getId().equals(id)) { return comment;
elementList = new ArrayList(); for (Comment comment : ((CommentsPart) relPart .getPart(rs)).getJaxbElement().getComment()) { elementList.addAll(comment.getEGBlockLevelElts());
.get(new PartName("/word/comments.xml")); Comments comments = commentsPart.getContents(); for (Comments.Comment comment : comments.getComment()) { if (comment.getId().equals(id)) { return comment;
elementList = new ArrayList(); for (Comment comment : ((CommentsPart) relPart .getPart(rs)).getJaxbElement().getComment()) { elementList.addAll(comment.getEGBlockLevelElts());