Table of Contents

Class OdfHeadingCollection

Namespace
OdfKit.Text
Assembly
OdfKit.dll

Adds heading paragraphs to text documents. 提供標題新增入口。

public sealed class OdfHeadingCollection : IEnumerable<OdfHeading>, IEnumerable
Inheritance
OdfHeadingCollection
Implements
Inherited Members

Constructors

OdfHeadingCollection(TextDocument)

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

public OdfHeadingCollection(TextDocument document)

Parameters

document TextDocument

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

Properties

Items

Gets a summary list of the top-level headings in the document body. 取得文件本文最上層標題清單。

public IReadOnlyList<OdfHeading> Items { get; }

Property Value

IReadOnlyList<OdfHeading>

Methods

Add(string)

Short overload of Add that accepts text; remaining optional parameters use defaults and forward to the full overload. 便利多載:提供 text;其餘可選參數使用預設值並轉呼叫最長 Add 多載。

public OdfHeading Add(string text)

Parameters

text string

Returns

OdfHeading

Add(string, int)

Adds a heading paragraph to the collection. 新增標題。

public OdfHeading Add(string text, int outlineLevel)

Parameters

text string

The heading text. / 標題文字。

outlineLevel int

The outline level. / 大綱階層。

Returns

OdfHeading

The newly added heading. / 新增完成的標題。

GetEnumerator()

Gets an enumerator over the headings, for use with LINQ queries. 取得標題列舉器,供 LINQ 查詢使用。

public IEnumerator<OdfHeading> GetEnumerator()

Returns

IEnumerator<OdfHeading>

The heading enumerator. / 標題列舉器。