OdfTextContent
OfficeIMO.OpenDocument
Native ODF paragraph or inline content. Edits stay in the owning document XML.
Inheritance
- object
- OdfTextContent
Derived Types
Usage
Explore 2 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 2
- Method OdfTextContent.AddText
- Method OdfTextContent.TransformTextCase
Methods
public OdfTextField AddField(OdfTextFieldKind kind, string? displayText = null) #Appends a basic native field with cached display text.
Parameters
- kind OfficeIMO.OpenDocument.OdfTextFieldKind
- displayText string? = null
Returns
OdfTextFieldpublic OdfTextHyperlink AddHyperlink(string text, string href) #Appends a hyperlink without fetching or resolving its target.
Parameters
- text string
- href string
Returns
OdfTextHyperlinkpublic OdfTextRun AddRun(string? text = null) #Appends a styled run, retaining existing nodes.
Parameters
- text string? = null
Returns
OdfTextRunpublic OdfTextContent AddText(string text) #Appends text using ODF space, tab, and line-break encoding.
Parameters
- text string
Returns
OdfTextContentpublic OdfTextContent TransformTextCase(OfficeTextCase textCase, CultureInfo? culture = null) #Transforms stored text while retaining inline XML and excluding annotations and embedded objects.
Parameters
- textCase OfficeIMO.Drawing.OfficeTextCase
- culture System.Globalization.CultureInfo? = null
Returns
OdfTextContentInherited Methods
Properties
public string Text { get; set; } #Decoded text. Assignment replaces this element's child content, including nested formatting and fields.
public IReadOnlyList<OdfTextNode> InlineNodes { get; } #Ordered inline syntax. Text values are snapshots; typed wrappers edit the original XML.
public IReadOnlyList<OdfTextRun> Runs { get; } #Styled runs in this content's text story, including nested runs.
public IReadOnlyList<OdfTextHyperlink> Hyperlinks { get; } #Hyperlinks in this content's text story, including links inside runs.
public IReadOnlyList<OdfTextField> Fields { get; } #Basic page, date, and time fields in this content's text story.
public bool? Bold { get; set; } #Effective bold state, including inline, paragraph, and graphic inheritance.
public OdfTextDecorationStyle? UnderlineStyle { get; set; } #Effective native underline style.
public OdfTextDecorationType? UnderlineType { get; set; } #Effective native underline line count.
public double? TextOpacity { get; set; } #Effective text opacity from zero to one, including inline, paragraph and graphic inheritance.
Exceptions
InvalidDataException– The nearest imported opacity declaration is invalid or its aliases conflict.ArgumentOutOfRangeException– The assigned value is not finite or is outside zero to one.
public OdfColor? BackgroundColor { get; set; } #Effective text background. An explicit transparent override stops inheritance.
public OdfTextPosition? TextPosition { get; set; } #Effective baseline placement.
public OdfTextTransform? TextTransform { get; set; } #Effective display-time case transformation.