@Override public List<XSLFComment> getComments() { final List<XSLFComment> comments = new ArrayList<>(); final XSLFComments xComments = getCommentsPart(); final XSLFCommentAuthors xAuthors = getCommentAuthorsPart(); if (xComments != null) { //noinspection deprecation for (final CTComment xc : xComments.getCTCommentsList().getCmArray()) { comments.add(new XSLFComment(xc, xAuthors)); } } return comments; }
/** * Construct a SpreadsheetML slide comments from a package part * * @param part the package part holding the comments data, * the content type must be <code>application/vnd.openxmlformats-officedocument.comments+xml</code> * @since POI 3.14-Beta1 */ XSLFComments(PackagePart part) throws IOException, XmlException { super(part); doc = CmLstDocument.Factory.parse(getPackagePart().getInputStream(), DEFAULT_XML_OPTIONS); }
if (comments != null) { StringBuilder authorStringBuilder = new StringBuilder(); for (int i = 0; i < comments.getNumberOfComments(); i++) { authorStringBuilder.setLength(0); CTComment comment = comments.getCommentAt(i); xhtml.startElement("p", "class", "slide-comment"); CTCommentAuthor cta = commentAuthors.getAuthorById(comment.getAuthorId());
@Override public List<XSLFComment> getComments() { final List<XSLFComment> comments = new ArrayList<>(); final XSLFComments xComments = getCommentsPart(); final XSLFCommentAuthors xAuthors = getCommentAuthorsPart(); if (xComments != null) { //noinspection deprecation for (final CTComment xc : xComments.getCTCommentsList().getCmArray()) { comments.add(new XSLFComment(xc, xAuthors)); } } return comments; }
/** * Construct a SpreadsheetML slide comments from a package part * * @param part the package part holding the comments data, * the content type must be <code>application/vnd.openxmlformats-officedocument.comments+xml</code> * @since POI 3.14-Beta1 */ XSLFComments(PackagePart part) throws IOException, XmlException { super(part); doc = CmLstDocument.Factory.parse(getPackagePart().getInputStream(), DEFAULT_XML_OPTIONS); }
for (CTComment comment : comments.getCTCommentsList().getCmList()) {
/** * Construct a SpreadsheetML slide comments from a package part * * @param part the package part holding the comments data, * the content type must be <code>application/vnd.openxmlformats-officedocument.comments+xml</code> * @param rel the package relationship holding this comments, * the relationship type must be http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments */ XSLFComments(PackagePart part, PackageRelationship rel) throws IOException, XmlException { super(part, rel); CmLstDocument doc = CmLstDocument.Factory.parse(getPackagePart().getInputStream()); _comments = doc.getCmLst(); }
for (CTComment comment : comments.getCTCommentsList().getCmList()) { final StringBuilder sbComment = new StringBuilder();