Table of Contents

Class OdfComment

Namespace
OdfKit.Text
Assembly
OdfKit.dll

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

author string

The comment's author. / 註解的作者。

text string

The comment's body text. / 註解的內文。

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

author string

The comment's author. / 註解的作者。

text string

The comment's body text. / 註解的內文。

date DateTime

The comment's date. / 註解的日期。

name string

The comment's unique name. / 註解的唯一名稱。

Properties

Author

Gets or sets the comment's author. 取得或設定註解的作者。

public string Author { get; set; }

Property Value

string

Date

Gets or sets the comment's date and time. 取得或設定註解的日期與時間。

public DateTime Date { get; set; }

Property Value

DateTime

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

string

Replies

Gets the list of replies to this comment. 取得此註解的回覆列表。

public IReadOnlyList<OdfComment> Replies { get; }

Property Value

IReadOnlyList<OdfComment>

Text

Gets or sets the comment's body text. 取得或設定註解的內文。

public string Text { get; set; }

Property Value

string

Methods

AddReply(OdfComment)

Adds a reply to this comment. 新增回覆至此註解。

public void AddReply(OdfComment reply)

Parameters

reply OdfComment

The reply comment instance to add. / 要新增的回覆註解執行個體。

AddReply(string, string)

Adds a reply to this comment. 新增回覆至此註解。

public void AddReply(string author, string text)

Parameters

author string

The reply's author. / 回覆的作者。

text string

The reply's body text. / 回覆的內文。

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

node OdfNode

The 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 執行個體。