OdfStyleRepository
OfficeIMO.OpenDocument
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) #Creates a collision-free automatic style in content.xml.
Parameters
- family OfficeIMO.OpenDocument.OdfStyleFamily
- prefix string = "of"
- parentStyleName string? = null
Returns
OdfStylepublic OdfDataStyle CreateDateStyle(string name) #Creates a common Gregorian ISO year-month-day style usable by any ODF document.
Parameters
- name string
Returns
OdfDataStylepublic OdfGradient CreateGradient(string name, OdfGradientPattern pattern) #Creates a reusable native two-color gradient in common styles.
Parameters
- name string
- pattern OfficeIMO.OpenDocument.OdfGradientPattern
Returns
OdfGradientpublic OdfMarker CreateMarker(string name, OdfMarkerGeometry geometry) #Creates reusable native marker geometry in common styles.
Parameters
- name string
- geometry OfficeIMO.OpenDocument.OdfMarkerGeometry
Returns
OdfMarkerpublic OdfStyle CreateNamed(string name, OdfStyleFamily family, string? parentStyleName = null) #Creates a common named style in styles.xml.
Parameters
- name string
- family OfficeIMO.OpenDocument.OdfStyleFamily
- parentStyleName string? = null
Returns
OdfStylepublic OdfStrokeDash CreateStrokeDash(string name, OdfStrokeDashPattern pattern) #Creates a named dash pattern shared by shapes that reference it.
Parameters
- name string
- pattern OfficeIMO.OpenDocument.OdfStrokeDashPattern
Returns
OdfStrokeDashpublic OdfDataStyle CreateTimeStyle(string name) #Creates a common 24-hour clock style with hours, minutes and seconds.
Parameters
- name string
Returns
OdfDataStylepublic OdfStyle? Find(OdfStyleFamily family, string name) #Finds a style by family and name, preferring content automatic styles.
Parameters
- family OfficeIMO.OpenDocument.OdfStyleFamily
- name string
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
- partPath string = "content.xml"
Returns
OdfDataStyle?public OdfGradient? FindGradient(string name) #Finds a gradient, rejecting duplicate names across native and SVG gradient definitions.
Parameters
- name string
Returns
OdfGradient?public OdfMarker? FindMarker(string name) #Finds a marker, rejecting ambiguous duplicate names.
Parameters
- name string
Returns
OdfMarker?public OdfStrokeDash? FindStrokeDash(string name) #Finds a named dash definition, rejecting ambiguous duplicate names.
Parameters
- name string
Returns
OdfStrokeDash?Inherited Methods
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.