Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OdfStyle

OfficeIMO.OpenDocument

Namespace
OfficeIMO.OpenDocument
Assembly
OfficeIMO.OpenDocument
Source revision
be6c300e4ab1 with working tree changes
Modifiers
sealed

An XML-backed common or automatic ODF style.

Inheritance

  • object
  • OdfStyle

Usage

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

Accepted by parameters 2

Methods

public OdfStyleMap AddConditionalMap(string condition, string applyStyleName, string? baseCellAddress = null) #

Adds a native ODF conditional style mapping.

Parameters

condition string required
applyStyleName string required
baseCellAddress string? = null optional

Properties

public string Name { get; } #

Style name.

public OdfStyleFamily Family { get; } #

Style family.

public string? ParentStyleName { get; set; } #

Optional parent style name.

public bool IsAutomatic { get; } #

True for an automatic style.

public IReadOnlyList<OdfStyleMap> ConditionalMaps { get; } #

Conditional style mappings in their authored evaluation order.

public string? DataStyleName { get; set; } #

Referenced number, currency, percentage, date, or time data style.

public bool? Bold { get; set; } #

True when bold text is explicitly enabled by this style.

public bool? Italic { get; set; } #

True when italic text is explicitly enabled by this style.

public bool? Underline { get; set; } #

True when text underline is explicitly enabled by this style.

public OdfTextDecorationStyle? UnderlineStyle { get; set; } #

Explicit native ODF underline line style.

public OdfTextDecorationType? UnderlineType { get; set; } #

Explicit native ODF underline line count.

public bool? UsesNonSolidUnderlineStyle { get; } #

Whether this style explicitly uses an underline variant other than solid or none.

public bool? Strikethrough { get; set; } #

True when text strike-through is explicitly enabled by this style.

public OdfTextDecorationStyle? LineThroughStyle { get; set; } #

Explicit native ODF line-through style.

public OdfTextDecorationType? LineThroughType { get; set; } #

Explicit native ODF line-through count.

public bool? UsesNonSolidLineThroughStyle { get; } #

Whether this style explicitly uses a line-through variant other than solid or none.

public OdfLength? FontSize { get; set; } #

Explicit font size.

public string? TextPositionValue { get; set; } #

Exact ODF style:text-position value, including authored percentages.

public OdfTextPosition? TextPosition { get; set; } #

Common native ODF baseline placement.

public OdfTextTransform? TextTransform { get; set; } #

Native ODF display-time case transformation.

public bool? SmallCaps { get; set; } #

Native ODF small-cap display formatting.

public string? FontFamily { get; set; } #

Explicit font family.

public OdfColor? Color { get; set; } #

Explicit text color.

public double? TextOpacity { get; set; } #

Explicit text opacity from zero to one. Null means no declaration in this style.

Exceptions

  • InvalidDataException – An imported declaration is invalid or its aliases conflict.
  • ArgumentOutOfRangeException – The assigned value is not finite or is outside zero to one.
public OdfColor? TextBackgroundColor { get; set; } #

Explicit text background color, commonly used for highlighting.

public OdfColor? BackgroundColor { get; set; } #

Explicit cell or paragraph background color.

public string? BreakBefore { get; set; } #

Explicit paragraph break-before value.

public string? TextAlign { get; set; } #

Explicit horizontal paragraph alignment.

public string? CellTextAlignSource { get; set; } #

Whether table-cell horizontal alignment is fixed or follows the value type.

public string? CellVerticalAlign { get; set; } #

Explicit table-cell vertical alignment token.

public string? CellWrapOption { get; set; } #

Explicit table-cell text wrapping token.

public string? WritingMode { get; set; } #

Explicit ODF paragraph writing-mode token.

public OdfLength? LineHeight { get; set; } #

Explicit paragraph line height, including absolute and percentage values.

public OdfLength? MarginLeft { get; set; } #

Explicit paragraph start margin.

public OdfLength? MarginRight { get; set; } #

Explicit paragraph end margin.

public OdfLength? MarginTop { get; set; } #

Explicit paragraph top margin.

public OdfLength? MarginBottom { get; set; } #

Explicit paragraph bottom margin.

public OdfLength? TextIndent { get; set; } #

Explicit first-line paragraph indentation.