# OdtSpan

An XML-backed ODT inline span.

Class 

`OfficeIMO.OpenDocument`

**Namespace**

`OfficeIMO.OpenDocument`

**Assembly**

`OfficeIMO.OpenDocument`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OdtSpan.cs:78](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L78)

**Modifiers**

sealed

An XML-backed ODT inline span.

## Inheritance

- object
- OdtSpan

## Usage

Explore 7 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 7

- Method [OdtHyperlink.AddRun](/api/open-document/officeimo-opendocument-odthyperlink/#method-addrun-string)
- Property [OdtInlineNode.Span](/api/open-document/officeimo-opendocument-odtinlinenode/#property-span)
- Method [OdtParagraph.AddRun](/api/open-document/officeimo-opendocument-odtparagraph/#method-addrun-string)
- Property [OdtParagraph.Spans](/api/open-document/officeimo-opendocument-odtparagraph/#property-spans)
- Method [OdtSpan.AddRun](/api/open-document/officeimo-opendocument-odtspan/#method-addrun-string)
- Method [OdtSpan.AddText](/api/open-document/officeimo-opendocument-odtspan/#method-addtext-string)
- Method [OdtSpan.TransformTextCase](/api/open-document/officeimo-opendocument-odtspan/#method-transformtextcase-officeimo-drawing-officetextcase-globalization-cultureinfo)

Filter members 

Show inherited

## Methods

`public OdtHyperlink AddHyperlink(string text, string href)` [#](#method-addhyperlink-string-string)

[OdtSpan.cs:91](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L91)

Appends a hyperlink inside this span without fetching its target.

Parameters

**text string required**

**href string required**

Returns

`OdtHyperlink`

`public OdtSpan AddRun(string? text = null)` [#](#method-addrun-string)

[OdtSpan.cs:82](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L82)

Appends a nested styled span.

Parameters

**text string? = null optional**

Returns

`OdtSpan`

`public OdtSpan AddText(string text)` [#](#method-addtext-string)

[OdtSpan.cs:78](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L78)

Appends decoded plain text.

Parameters

**text string required**

Returns

`OdtSpan`

`public OdtSpan TransformTextCase(OfficeTextCase textCase, CultureInfo? culture = null)` [#](#method-transformtextcase-officeimo-drawing-officetextcase-globalization-cultureinfo)

[OdtSpan.cs:103](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L103)

Changes the stored span text casing while preserving its text style.

Parameters

**textCase OfficeIMO.Drawing.OfficeTextCase required**

**culture System.Globalization.CultureInfo? = null optional**

Returns

`OdtSpan`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public string Text { get; set; }` [#](#property-text)

[OdtSpan.cs:19](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L19)

Decoded span text.

`public IReadOnlyList<OdtInlineNode> InlineNodes { get; }` [#](#property-inlinenodes)

[OdtSpan.cs:30](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L30)

Ordered text, spans, and hyperlinks inside this span.

`public string? StyleName { get; set; }` [#](#property-stylename)

[OdtSpan.cs:33](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L33)

Referenced text style name.

`public bool? Bold { get; set; }` [#](#property-bold)

[OdtSpan.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L37)

Explicit or inherited bold state.

`public bool? Italic { get; set; }` [#](#property-italic)

[OdtSpan.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L39)

Explicit or inherited italic state.

`public bool? Underline { get; set; }` [#](#property-underline)

[OdtSpan.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L41)

Explicit or inherited underline state.

`public OdfTextDecorationStyle? UnderlineStyle { get; set; }` [#](#property-underlinestyle)

[OdtSpan.cs:43](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L43)

Explicit or inherited native underline style.

`public OdfTextDecorationType? UnderlineType { get; set; }` [#](#property-underlinetype)

[OdtSpan.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L45)

Explicit or inherited native underline line count.

`public bool UsesNonSolidUnderlineStyle { get; }` [#](#property-usesnonsolidunderlinestyle)

[OdtSpan.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L47)

Whether the effective underline uses a non-solid ODF decoration style.

`public bool? Strikethrough { get; set; }` [#](#property-strikethrough)

[OdtSpan.cs:49](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L49)

Explicit or inherited strike-through state.

`public OdfTextDecorationStyle? LineThroughStyle { get; set; }` [#](#property-linethroughstyle)

[OdtSpan.cs:51](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L51)

Explicit or inherited native line-through style.

`public OdfTextDecorationType? LineThroughType { get; set; }` [#](#property-linethroughtype)

[OdtSpan.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L53)

Explicit or inherited native line-through count.

`public bool UsesNonSolidLineThroughStyle { get; }` [#](#property-usesnonsolidlinethroughstyle)

[OdtSpan.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L55)

Whether the effective line-through uses a non-solid ODF decoration style.

`public OdfLength? FontSize { get; set; }` [#](#property-fontsize)

[OdtSpan.cs:57](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L57)

Explicit or inherited font size.

`public OdfTextPosition? TextPosition { get; set; }` [#](#property-textposition)

[OdtSpan.cs:59](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L59)

Explicit or inherited baseline placement.

`public OdfTextTransform? TextTransform { get; set; }` [#](#property-texttransform)

[OdtSpan.cs:61](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L61)

Explicit or inherited display-time case transformation.

`public bool? SmallCaps { get; set; }` [#](#property-smallcaps)

[OdtSpan.cs:63](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L63)

Explicit or inherited small-cap display formatting.

`public string? FontFamily { get; set; }` [#](#property-fontfamily)

[OdtSpan.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L65)

Explicit or inherited font family.

`public OdfColor? Color { get; set; }` [#](#property-color)

[OdtSpan.cs:67](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L67)

Explicit or inherited text color.

`public OdfColor? BackgroundColor { get; set; }` [#](#property-backgroundcolor)

[OdtSpan.cs:70](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L70)

Explicit or inherited text background color.

`public bool HasTextBackgroundOverride { get; }` [#](#property-hastextbackgroundoverride)

[OdtSpan.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OpenDocument/Text/OdtSpan.cs#L74)

Whether an inline style sets a text background, including transparent.

<!-- PowerForge markdown artifact sha256:8C64F0851807116604715A3A94C3A1CC97B8F0527B8EFA7DA1893E8D9E37D795 -->
