API Reference
OdfTextContent
Native ODF paragraph or inline content. Edits stay in the owning document XML.
Inheritance
- Object
- OdfTextContent
Methods
public OdfTextField AddField(OdfTextFieldKind kind, String displayText = null) #OdfTextFieldAppends a basic native field with cached display text.
Parameters
- kind OfficeIMO.OpenDocument.OdfTextFieldKind
- displayText System.String = null
public OdfTextHyperlink AddHyperlink(String text, String href) #OdfTextHyperlinkAppends a hyperlink without fetching or resolving its target.
Parameters
- text System.String
- href System.String
public OdfTextRun AddRun(String text = null) #OdfTextRunAppends a styled run, retaining existing nodes.
Parameters
- text System.String = null
public Void AddText(String text) #VoidAppends text using ODF space, tab, and line-break encoding.
Parameters
- text System.String
public Void TransformTextCase(OfficeTextCase textCase, CultureInfo culture = null) #VoidTransforms stored text while retaining inline XML and excluding annotations and embedded objects.
Parameters
- textCase OfficeIMO.Drawing.OfficeTextCase
- culture System.Globalization.CultureInfo = null
Inherited Methods
Properties
public String Text { get; set; } #Decoded text. Assignment replaces this element's child content, including nested formatting and fields.
public String StyleName { get; set; } #Referenced native style name.
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 Nullable<Boolean> Bold { get; set; } #Effective bold state, including inline, paragraph, and graphic inheritance.
public Nullable<Boolean> Italic { get; set; } #Effective italic state.
public Nullable<Boolean> Underline { get; set; } #Effective underline state.
public Nullable<OdfTextDecorationStyle> UnderlineStyle { get; set; } #Effective native underline style.
public Nullable<OdfTextDecorationType> UnderlineType { get; set; } #Effective native underline line count.
public Nullable<Boolean> StrikeThrough { get; set; } #Effective strike-through state.
public Nullable<OdfLength> FontSize { get; set; } #Effective font size.
public String FontFamily { get; set; } #Effective font family.
public Nullable<OdfColor> Color { get; set; } #Effective text color.
public Nullable<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 Nullable<OdfColor> BackgroundColor { get; set; } #Effective text background. An explicit transparent override stops inheritance.
public Nullable<OdfTextPosition> TextPosition { get; set; } #Effective baseline placement.
public Nullable<OdfTextTransform> TextTransform { get; set; } #Effective display-time case transformation.
public Nullable<Boolean> SmallCaps { get; set; } #Effective small-cap formatting.