CommentAuthorsPart

General

CommentAuthorsPart és una classe en Aspose.Slides FOSS per a C++.

Gestiona la part XML dels autors de comentaris (ppt/commentAuthors.xml). Aquesta part conté totes les definicions d’autors utilitzades en els comentars de la presentació. Proporciona operacions CRUD i un assignador d ‘índex de coments globalment únic.

Mètodes

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”).
 Català