CommentsPart
概述
CommentsPart 是 Aspose.Slides FOSS 中用于 .NET 的一个类。
管理一个幻灯片评论 XML 部分(ppt/comments/slideN.xml)。每个包含评论的幻灯片对应一个文件。
此类提供 16 个用于在 .NET 程序中处理 CommentsPart 对象的方法。可用的方法包括:AddComment、Clear、ComputeRelativeTarget、Count、FindCommentByIdx、FindCommentByIdxAll、GetComments、GetCommentsByAuthor、InsertComment、IsEmpty、Load、RemoveComment,以及另外 4 个方法。所有导出的成员在安装了 Aspose.Slides FOSS for .NET 包后,可供任何 .NET 应用程序访问。属性:PartName。
描述
CommentsPart 是 Aspose.Slides FOSS 库中用于 .NET 的一个类,提供 16 个方法和 1 个属性供程序化使用。
该类还提供 PartName 属性(获取部件名称)。
属性
| 名称 | 类型 | 访问 | 描述 |
|---|---|---|---|
PartName | string | 读取 | 获取部件名称。 |
方法
| 签名 | 描述 |
|---|---|
Load() | 从包中加载评论 XML。 |
GetComments() | 返回此部分的所有评论。 |
GetCommentsByAuthor(authorId: int) | 返回属于指定作者的评论。 |
FindCommentByIdxAll(idx: int) | 在所有作者中按索引查找评论。 |
FindCommentByIdx(authorId: int, idx: int) | 通过作者 ID 和索引查找评论。 |
AddComment(authorId: int, idx: int, text: string, posX: float, posY: float, dtStr: string, parentIdx: int?) | 追加一个新评论元素并返回其数据。 |
InsertComment(index: int, authorId: int, idx: int, text: string, posX: float, posY: float, dtStr: string, parentIdx: int?) | 在现有评论中于指定索引插入评论。 |
RemoveComment(authorId: int, idx: int) | 通过作者 ID 和索引删除评论。 |
RemoveCommentElem(elem: XElement) | 从评论列表中移除指定的 XML 元素。 |
RemoveCommentsAt(index: int) | 删除指定位置的评论。 |
Clear() | 删除所有评论元素。 |
Count() | 返回评论的数量。 |
IsEmpty() | 如果没有评论则返回 true。 |
Save() | 将评论 XML 保存回包。 |
ResolveTarget(fromPart: string, target: string) | 将相对目标路径解析为绝对部件名称。 |
ComputeRelativeTarget(fromPart: string, toPart: string) | 计算从一个部分到另一个部分的相对路径。 |