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 an entry template for 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 執行個體。

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()