Table of Contents

Class OdfParagraphCollection

Namespace
OdfKit.Text
Assembly
OdfKit.dll

Adds paragraphs to text documents. 提供段落新增入口。

public sealed class OdfParagraphCollection : IEnumerable<OdfParagraph>, IEnumerable
Inheritance
OdfParagraphCollection
Implements
Inherited Members

Constructors

OdfParagraphCollection(TextDocument)

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

public OdfParagraphCollection(TextDocument document)

Parameters

document TextDocument

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

Properties

Items

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

public IReadOnlyList<OdfParagraph> Items { get; }

Property Value

IReadOnlyList<OdfParagraph>

Methods

Add()

Short overload of Add that uses default values for all optional parameters and forwards to the full overload. 便利多載:Add 的所有可選參數使用預設值並轉呼叫最長多載。

public OdfParagraph Add()

Returns

OdfParagraph

Add(string)

Adds a paragraph to the collection. 新增段落。

public OdfParagraph Add(string text)

Parameters

text string

The paragraph text. / 段落文字。

Returns

OdfParagraph

The newly added paragraph. / 新增完成的段落。

GetEnumerator()

Gets an enumerator over the paragraphs, for use with LINQ queries. 取得段落列舉器,供 LINQ 查詢使用。

public IEnumerator<OdfParagraph> GetEnumerator()

Returns

IEnumerator<OdfParagraph>

The paragraph enumerator. / 段落列舉器。