CommentAuthorsPart

CommentAuthorsPart

Overview

CommentAuthorsPart is a class in Aspose.Slides for CPP. Inherits from: CommentAuthorsPart.

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.

Methods

SignatureDescription
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)AuthorDataAdd 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_tReturn 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”).