Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OdfStyleRepository

OfficeIMO.OpenDocument

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

Indexes and creates named and automatic ODF styles without detaching them from package XML.

Inheritance

  • object
  • OdfStyleRepository

Usage

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

Methods

public OdfStyle CreateAutomatic(OdfStyleFamily family, string prefix = "of", string? parentStyleName = null) #

Creates a collision-free automatic style in content.xml.

Parameters

family OfficeIMO.OpenDocument.OdfStyleFamily required
prefix string = "of" optional
parentStyleName string? = null optional

Returns

OdfStyle
public OdfDataStyle CreateDateStyle(string name) #

Creates a common Gregorian ISO year-month-day style usable by any ODF document.

Parameters

name string required
public OdfGradient CreateGradient(string name, OdfGradientPattern pattern) #

Creates a reusable native two-color gradient in common styles.

Parameters

name string required
pattern OfficeIMO.OpenDocument.OdfGradientPattern required
public OdfMarker CreateMarker(string name, OdfMarkerGeometry geometry) #

Creates reusable native marker geometry in common styles.

Parameters

name string required
geometry OfficeIMO.OpenDocument.OdfMarkerGeometry required

Returns

OdfMarker
public OdfStyle CreateNamed(string name, OdfStyleFamily family, string? parentStyleName = null) #

Creates a common named style in styles.xml.

Parameters

name string required
family OfficeIMO.OpenDocument.OdfStyleFamily required
parentStyleName string? = null optional

Returns

OdfStyle
public OdfStrokeDash CreateStrokeDash(string name, OdfStrokeDashPattern pattern) #

Creates a named dash pattern shared by shapes that reference it.

Parameters

name string required
pattern OfficeIMO.OpenDocument.OdfStrokeDashPattern required
public OdfDataStyle CreateTimeStyle(string name) #

Creates a common 24-hour clock style with hours, minutes and seconds.

Parameters

name string required
public OdfStyle? Find(OdfStyleFamily family, string name) #

Finds a style by family and name, preferring content automatic styles.

Parameters

family OfficeIMO.OpenDocument.OdfStyleFamily required
name string required

Returns

OdfStyle?
public OdfDataStyle? FindDataStyle(string name, string partPath = "content.xml") #

Finds a data style in the requested part's automatic styles, then common styles. Duplicate names are rejected.

Parameters

name string required
partPath string = "content.xml" optional

Returns

OdfDataStyle?
public OdfGradient? FindGradient(string name) #

Finds a gradient, rejecting duplicate names across native and SVG gradient definitions.

Parameters

name string required

Returns

OdfGradient?
public OdfMarker? FindMarker(string name) #

Finds a marker, rejecting ambiguous duplicate names.

Parameters

name string required

Returns

OdfMarker?
public OdfStrokeDash? FindStrokeDash(string name) #

Finds a named dash definition, rejecting ambiguous duplicate names.

Parameters

name string required
public IReadOnlyList<OdfStyle> Resolve(OdfStyle style) #

Resolves a style and its parent chain from most specific to least specific.

Parameters

style OfficeIMO.OpenDocument.OdfStyle required

Returns

IReadOnlyList<OdfStyle>

Properties

public IReadOnlyList<OdfStyle> Named { get; } #

Enumerates common styles from styles.xml.

public IReadOnlyList<OdfStyle> Automatic { get; } #

Enumerates automatic styles from both content.xml and styles.xml.

public IReadOnlyList<OdfGradient> Gradients { get; } #

Named native and SVG gradient definitions in common styles.

public IReadOnlyList<OdfMarker> Markers { get; } #

Named marker definitions in common styles.

public IReadOnlyList<OdfStrokeDash> StrokeDashes { get; } #

Named stroke-dash definitions in common styles.