CommentsPart — Aspose.Slides FOSS Java API Reference
CommentsPart — Manages a slide comments XML part (ppt/comments/slideN.
Package: org.aspose.slides.foss.internal.pptx
Note: This is an internal implementation class. Do not import or use it directly — the package
org.aspose.slides.foss.internal.pptxis not part of the public API and may change without notice. This page is provided for reference only.
Properties
| Property | Type | Access | Description |
|---|---|---|---|
partName | String | Read/Write | |
comments | List<CommentData> | Read/Write | |
empty | boolean | Read/Write |
Methods
| Method | Returns | Description |
|---|---|---|
getPartName() | String | Returns the part name (URI) of this comments part. |
getComments() | List<CommentData> | Returns all comments in this part. |
getCommentsByAuthor(int authorId) | List<CommentData> | Returns all comments by the given author. |
findCommentByIdx(int authorId, int idx) | Optional<CommentData> | Finds a comment by author ID and index. |
findCommentByIdxAll(int idx) | Optional<CommentData> | Finds a comment by index across all authors (for parentCmId lookup). |
addComment(int authorId, int idx, String text, double posX, double posY, String dtStr, Integer parentIdx) | CommentData | Appends a new comment element and returns its data wrapper. |
insertComment(int index, int authorId, int idx, String text, double posX, double posY, String dtStr, Integer parentIdx) | CommentData | Inserts a comment at the given index among existing comments. |
removeComment(int authorId, int idx) | void | Removes a comment by author ID and index. |
removeCommentElem(Element elem) | void | Removes a specific comment element from the document. |
removeCommentsAt(int index) | void | Removes the comment at the given positional index. |
clear() | void | Removes all comments from this part. |
count() | int | Returns the number of comments in this part. |
isEmpty() | boolean | Returns whether this part contains no comments. |
save() | void | Saves the comments XML back to the package. |
createForSlide(OpcPackage pkg, String slidePartName) | CommentsPart | Creates a new empty comments part for a slide and registers all relationships. |
loadForSlide(OpcPackage pkg, String slidePartName) | Optional<CommentsPart> | Loads the comments part for a slide, if it exists. |
delete(OpcPackage pkg, String slidePartName) | void | Deletes the comments part for a slide, removing the part, content type, and relationship. |
resolveTarget(String fromPart, String target) | String | Resolves a relative target path to an absolute part name. |
computeRelativeTarget(String fromPart, String toPart) | String | Computes a relative path from one part to another. |
dtToStr(LocalDateTime dt) | String | Converts a LocalDateTime or LocalDate to an OOXML datetime string. |
dtToStr(LocalDate date) | String | Converts a LocalDate to an OOXML datetime string. |
strToDt(String s) | Optional<LocalDateTime> | Parses an OOXML datetime string to a LocalDateTime. |