CommentsPart
Vue de l’ensemble
‘CommentsPart’ est une classe dans Aspose.Slides FOSS pour C++.
Gérer une partie XML des commentaires en slide (ppt/comments/slideN.xml). Un fichier existe par slides qui ont des remarques. Il fournit des opérations CRUD pour les éléments de commentaire individuels et les méthodes d’usine / cycle de vie statique.
Cette classe fournit 19 méthodes pour travailler avec les objets CommentsPart dans des programmes C++. Les méthodologies disponibles comprennent: add_comment, clear , compute_relative_target ; count; create_for_slide : delete_ for_side ́ ; ‘find_ comment_by_idx . , ' find_komment _by _idX_all ! , ‘get_Comments ? , ’get _comments_ by_author. , insert_ Comment‘, ‘is_empty` et 7 méthode supplémentaires. Tous les membres publics sont accessibles à toute application C ++ après l’installation de la FOSS Aspose.Slides pour le package C ++.
méthodes
| Signature | Description |
|---|---|
part_name() → std::string | The part path inside the package. |
get_comments() → std::vector<CommentData> | Get all comments in this part. |
get_comments_by_author(author_id: int32_t) → std::vector<CommentData> | Get comments filtered by author ID. |
find_comment_by_idx(author_id: int32_t, idx: int32_t) → std::optional<CommentData> | Find a comment by author ID and index. |
find_comment_by_idx_all(idx: int32_t) → std::optional<CommentData> | Find a comment by index across all authors (for parentCmId lookup). |
add_comment(author_id: int32_t, idx: int32_t, text: std::string_view, pos_x: double, pos_y: double, dt_str: std::string_view, parent_idx: std::optional<int32_t>) → CommentData | Append a new comment element and return its CommentData. |
insert_comment(index: int32_t, author_id: int32_t, idx: int32_t, text: std::string_view, pos_x: double, pos_y: double, dt_str: std::string_view, parent_idx: std::optional<int32_t>) → CommentData | Insert a comment at the given position among existing comments. |
remove_comment(author_id: int32_t, idx: int32_t) | Remove a specific comment by author ID and index. |
remove_comment_elem(elem: pugi::xml_node) | Remove a comment by its XML node. |
remove_comments_at(index: int32_t) | Remove the comment at the given positional index. |
clear() | Remove all comments from this part. |
count() → int32_t | Number of comments in this part. |
is_empty() → bool | Whether this part has no comments. |
save() | Persist the XML back to the package. |
create_for_slide(package: opc::OpcPackage, slide_part_name: std::string_view) → CommentsPart | Create a new empty comments part for a slide and register all relationships and content types. RelationshipsManager so the relationship survives subsequent saves. |
load_for_slide(package: opc::OpcPackage, slide_part_name: std::string_view) → std::optional<CommentsPart> | Load the comments part for a slide, if one exists. |
delete_for_slide(package: opc::OpcPackage, slide_part_name: std::string_view) | Delete the comments part associated with a slide. |
resolve_target(from_part: std::string_view, target: std::string_view) → std::string | Resolve a relative target path to an absolute part name. |
compute_relative_target(from_part: std::string_view, to_part: std::string_view) → std::string | Compute a relative path from one part to another. |
Voir aussi
- Aspose.Slides - référence API d’entreprise