目錄 / Table of Contents

Class OdfTableOfContents

Namespace
OdfKit.Text
Assembly
OdfKit.dll

Represents a table of contents in an ODF document. 表示 ODF 文件中的目錄。

public class OdfTableOfContents : OdfIndex
Inheritance
OdfTableOfContents
Inherited Members

Constructors

OdfTableOfContents(OdfNode, TextDocument)

Initializes a new instance of the OdfTableOfContents class. 初始化 OdfTableOfContents 類別的新執行個體。

public OdfTableOfContents(OdfNode node, TextDocument doc)

Parameters

node OdfNode

The OdfNode of the table of contents. / 目錄的 OdfNode 節點。

doc TextDocument

The owning text document. / 所屬的文字文件。

Properties

OutlineLevel

Gets or sets the outline level of the table of contents. 取得或設定目錄的大綱階層。

public int OutlineLevel { get; set; }

Property Value

int

UseIndexMarks

Gets or sets a value indicating whether index marks are used to generate the table of contents. 取得或設定一個值,指出是否使用索引標記來產生目錄。

public bool UseIndexMarks { get; set; }

Property Value

bool

UseOutlineLevel

Gets or sets a value indicating whether the outline level is used to generate the table of contents. 取得或設定一個值,指出是否使用大綱階層來產生目錄。

public bool UseOutlineLevel { get; set; }

Property Value

bool

Methods

AddEntryTemplate(int, string)

Adds or replaces the entry template for an outline level of the table of contents. 新增或取代目錄指定大綱階層的項目範本。

public OdfIndexTemplateBuilder AddEntryTemplate(int outlineLevel, string styleName)

Parameters

outlineLevel int

The outline level. / 大綱階層。

styleName string

The style name. / 樣式名稱。

Returns

OdfIndexTemplateBuilder

An OdfIndexTemplateBuilder instance for constructing the template. / 用於建構範本的 OdfIndexTemplateBuilder 執行個體。

Remarks

Replacing a template discards its previous content. 取代範本時會捨棄原有內容。

Exceptions

ArgumentOutOfRangeException

The outline level is not positive. / 大綱階層不是正整數。

GetSourceLocalName()

Gets the XML local name of the table of contents source node. 取得目錄來源節點的 XML 區域名稱。

protected override string GetSourceLocalName()

Returns

string

The XML local name. / XML 區域名稱。

Update()

Updates the content of the table of contents. 更新目錄的內容。

public override void Update()