CommentAuthorsPart
Overview
CommentAuthorsPart is a class in Aspose.Slides FOSS for C++.
Manages the comment authors XML part (ppt/commentAuthors.xml). This part holds all author definitions used across the presentation’s comments. Provides CRUD operations and a globally-unique comment index allocator.
This class provides 8 methods for working with CommentAuthorsPart objects in Go programs.
Available methods include: add_author, clear, ensure_registered, find_author_by_id, get_authors, next_comment_idx, remove_author, save.
All exported members are accessible to any Go application after adding the package via go get github.com/aspose-pdf-foss/aspose-pdf-foss-for-go.
Methods
| Signature | Description |
|---|---|
get_authors() → std::vector<AuthorData> | Get all authors in this part. |
find_author_by_id(author_id: int32_t) → std::optional<AuthorData> | Find an author by numeric ID. |
add_author(name: std::string_view, initials: std::string_view) → AuthorData | Add a new author and return its AuthorData. |
remove_author(author_id: int32_t) | Remove an author by numeric ID. |
clear() | Remove all authors. |
next_comment_idx(author_id: int32_t) → int32_t | Return the next globally-unique comment index. OOXML parentCmId references idx values that must be unique across ALL authors within the presentation (not just per-author). This method takes the maximum lastIdx across every author, increments it, and updates the target author’s lastIdx. |
save() | Persist the XML back to the package. |
ensure_registered(package: opc::OpcPackage, presentation_part_name: std::string_view) | Ensure that commentAuthors.xml is registered in content types and the presentation has a relationship to it. Call before first save. (e.g. “ppt/presentation.xml”). |