Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

OdfStyleRepository

Namespace OfficeIMO.OpenDocument
Assembly OfficeIMO.OpenDocument
Source revision 804a7612eee4 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) #
Returns: OdfStyle

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

Parameters

family OfficeIMO.OpenDocument.OdfStyleFamily requiredposition: 0
prefix System.String = "of" optionalposition: 1
parentStyleName System.String? = null optionalposition: 2
public OdfDataStyle CreateDateStyle(String name) #
Returns: OdfDataStyle

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

Parameters

name System.String requiredposition: 0
public OdfGradient CreateGradient(String name, OdfGradientPattern pattern) #
Returns: OdfGradient

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

Parameters

name System.String requiredposition: 0
pattern OfficeIMO.OpenDocument.OdfGradientPattern requiredposition: 1
public OdfMarker CreateMarker(String name, OdfMarkerGeometry geometry) #
Returns: OdfMarker

Creates reusable native marker geometry in common styles.

Parameters

name System.String requiredposition: 0
geometry OfficeIMO.OpenDocument.OdfMarkerGeometry requiredposition: 1
public OdfStyle CreateNamed(String name, OdfStyleFamily family, String? parentStyleName = null) #
Returns: OdfStyle

Creates a common named style in styles.xml.

Parameters

name System.String requiredposition: 0
family OfficeIMO.OpenDocument.OdfStyleFamily requiredposition: 1
parentStyleName System.String? = null optionalposition: 2
public OdfStrokeDash CreateStrokeDash(String name, OdfStrokeDashPattern pattern) #
Returns: OdfStrokeDash

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

Parameters

name System.String requiredposition: 0
pattern OfficeIMO.OpenDocument.OdfStrokeDashPattern requiredposition: 1
public OdfDataStyle CreateTimeStyle(String name) #
Returns: OdfDataStyle

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

Parameters

name System.String requiredposition: 0
public OdfStyle? Find(OdfStyleFamily family, String name) #
Returns: OdfStyle?

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

Parameters

family OfficeIMO.OpenDocument.OdfStyleFamily requiredposition: 0
name System.String requiredposition: 1
public OdfDataStyle? FindDataStyle(String name, String partPath = "content.xml") #
Returns: OdfDataStyle?

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

Parameters

name System.String requiredposition: 0
partPath System.String = "content.xml" optionalposition: 1
public OdfGradient? FindGradient(String name) #
Returns: OdfGradient?

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

Parameters

name System.String requiredposition: 0
public OdfMarker? FindMarker(String name) #
Returns: OdfMarker?

Finds a marker, rejecting ambiguous duplicate names.

Parameters

name System.String requiredposition: 0
public OdfStrokeDash? FindStrokeDash(String name) #
Returns: OdfStrokeDash?

Finds a named dash definition, rejecting ambiguous duplicate names.

Parameters

name System.String requiredposition: 0
public IReadOnlyList<OdfStyle> Resolve(OdfStyle style) #
Returns: IReadOnlyList<OdfStyle>

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

Parameters

style OfficeIMO.OpenDocument.OdfStyle requiredposition: 0

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.