Class OdfComment
Represents a comment in an ODF document. 表示 ODF 文件中的註解。
public class OdfComment
- Inheritance
-
OdfComment
- Inherited Members
Constructors
OdfComment(string, string)
Initializes a new instance of the OdfComment class. 初始化 OdfComment 類別的新執行個體。
public OdfComment(string author, string text)
Parameters
OdfComment(string, string, DateTime, string)
Initializes a new instance of the OdfComment class. 初始化 OdfComment 類別的新執行個體。
public OdfComment(string author, string text, DateTime date, string name)
Parameters
authorstringThe comment's author. / 註解的作者。
textstringThe comment's body text. / 註解的內文。
dateDateTimeThe comment's date. / 註解的日期。
namestringThe comment's unique name. / 註解的唯一名稱。
Properties
Author
Gets or sets the comment's author. 取得或設定註解的作者。
public string Author { get; set; }
Property Value
Date
Gets or sets the comment's date and time. 取得或設定註解的日期與時間。
public DateTime Date { get; set; }
Property Value
Name
Gets the unique identifier. This identifier is used in ODF 1.3 to reference a parent comment. 取得唯一識別碼。此識別碼在 ODF 1.3 中用於參考上層註解。
public string Name { get; }
Property Value
Replies
Gets the list of replies to this comment. 取得此註解的回覆列表。
public IReadOnlyList<OdfComment> Replies { get; }
Property Value
Text
Gets or sets the comment's body text. 取得或設定註解的內文。
public string Text { get; set; }
Property Value
Methods
AddReply(OdfComment)
Adds a reply to this comment. 新增回覆至此註解。
public void AddReply(OdfComment reply)
Parameters
replyOdfCommentThe reply comment instance to add. / 要新增的回覆註解執行個體。
AddReply(string, string)
Adds a reply to this comment. 新增回覆至此註解。
public void AddReply(string author, string text)
Parameters
FromXmlNode(OdfNode)
A helper method that parses standard ODF 1.3 XML flat sibling entries back into an OdfComment object tree. 將標準的 ODF 1.3 XML 扁平同級專案還原解析為 OdfComment 物件樹的輔助方法。
public static OdfComment FromXmlNode(OdfNode node)
Parameters
nodeOdfNodeThe OdfKit.DOM.OdfNode node to parse. / 要解析的 OdfKit.DOM.OdfNode 節點。
Returns
- OdfComment
The parsed root OdfComment object. / 解析後的 OdfComment 根註解物件。
ToXmlNode()
Recursively renders this comment and its replies as standard ODF 1.3 XML flat sibling office annotation nodes. 將此註解及其回覆遞迴呈現為標準的 ODF 1.3 XML 扁平同級辦公室註解節點。
public OdfNode ToXmlNode()
Returns
- OdfNode
An OdfKit.DOM.OdfNode instance containing the comment XML structure. / 包含註解 XML 結構的 OdfKit.DOM.OdfNode 執行個體。