API Reference
OdfStyleRepository
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
- Property OdfDocument.Styles
- Property OdgDocument.Styles
- Property OdpPresentation.Styles
- Property OdsDocument.Styles
- Property OdtDocument.Styles
Methods
public OdfStyle CreateAutomatic(OdfStyleFamily family, String prefix = "of", String? parentStyleName = null) #OdfStyleCreates a collision-free automatic style in content.xml.
Parameters
- family OfficeIMO.OpenDocument.OdfStyleFamily
- prefix System.String = "of"
- parentStyleName System.String? = null
public OdfDataStyle CreateDateStyle(String name) #OdfDataStyleCreates a common Gregorian ISO year-month-day style usable by any ODF document.
Parameters
- name System.String
public OdfGradient CreateGradient(String name, OdfGradientPattern pattern) #OdfGradientCreates a reusable native two-color gradient in common styles.
Parameters
- name System.String
- pattern OfficeIMO.OpenDocument.OdfGradientPattern
public OdfMarker CreateMarker(String name, OdfMarkerGeometry geometry) #OdfMarkerCreates reusable native marker geometry in common styles.
Parameters
- name System.String
- geometry OfficeIMO.OpenDocument.OdfMarkerGeometry
public OdfStyle CreateNamed(String name, OdfStyleFamily family, String? parentStyleName = null) #OdfStyleCreates a common named style in styles.xml.
Parameters
- name System.String
- family OfficeIMO.OpenDocument.OdfStyleFamily
- parentStyleName System.String? = null
public OdfStrokeDash CreateStrokeDash(String name, OdfStrokeDashPattern pattern) #OdfStrokeDashCreates a named dash pattern shared by shapes that reference it.
Parameters
- name System.String
- pattern OfficeIMO.OpenDocument.OdfStrokeDashPattern
public OdfDataStyle CreateTimeStyle(String name) #OdfDataStyleCreates a common 24-hour clock style with hours, minutes and seconds.
Parameters
- name System.String
public OdfStyle? Find(OdfStyleFamily family, String name) #OdfStyle?Finds a style by family and name, preferring content automatic styles.
Parameters
- family OfficeIMO.OpenDocument.OdfStyleFamily
- name System.String
public OdfDataStyle? FindDataStyle(String name, String partPath = "content.xml") #OdfDataStyle?Finds a data style in the requested part's automatic styles, then common styles. Duplicate names are rejected.
Parameters
- name System.String
- partPath System.String = "content.xml"
public OdfGradient? FindGradient(String name) #OdfGradient?Finds a gradient, rejecting duplicate names across native and SVG gradient definitions.
Parameters
- name System.String
public OdfMarker? FindMarker(String name) #OdfMarker?Finds a marker, rejecting ambiguous duplicate names.
Parameters
- name System.String
public OdfStrokeDash? FindStrokeDash(String name) #OdfStrokeDash?Finds a named dash definition, rejecting ambiguous duplicate names.
Parameters
- name System.String
public IReadOnlyList<OdfStyle> Resolve(OdfStyle style) #IReadOnlyList<OdfStyle>Resolves a style and its parent chain from most specific to least specific.
Parameters
- style OfficeIMO.OpenDocument.OdfStyle
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
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.