Struct spreadsheet_ods::style::RowStyle
source · pub struct RowStyle { /* private fields */ }Expand description
Describes the style information for a table row. Hardly ever used. It’s easier to set the row_height via Sheet::set_row_height.
Implementations§
source§impl RowStyle
impl RowStyle
sourcepub fn origin(&self) -> StyleOrigin
pub fn origin(&self) -> StyleOrigin
Origin of the style, either styles.xml oder content.xml
sourcepub fn set_origin(&mut self, origin: StyleOrigin)
pub fn set_origin(&mut self, origin: StyleOrigin)
Changes the origin.
sourcepub fn set_styleuse(&mut self, styleuse: StyleUse)
pub fn set_styleuse(&mut self, styleuse: StyleUse)
Usage for the style.
sourcepub fn style_ref(&self) -> RowStyleRef
pub fn style_ref(&self) -> RowStyleRef
Returns the name as a style reference.
sourcepub fn set_auto_update(&mut self, auto: bool)
pub fn set_auto_update(&mut self, auto: bool)
The style:auto-update attribute specifies whether styles are automatically updated when the formatting properties of an object that has the style assigned to it are changed. The defined values for the style:auto-update attribute are:
- false: a change to a formatting property is applied for the object where the change was made. If necessary, a new automatic style will be created which is applied to the object where the change was made.
- true: a change to a formatting property results in the updating of the common style that is applied to an object. The formatting change is applied to all objects subject to the common style where the change was made. The default value for this attribute is false.
sourcepub fn set_class(&mut self, class: &str)
pub fn set_class(&mut self, class: &str)
The style:class attribute specifies a style class name. A style may belong to an arbitrary class of styles. The style class name is an arbitrary string. The style class name has no meaning within the file format itself, but it can for instance be evaluated by user interfaces to show a list of styles where the styles are grouped by its name.
sourcepub fn set_display_name<S: Into<String>>(&mut self, name: S)
pub fn set_display_name<S: Into<String>>(&mut self, name: S)
The style:display-name attribute specifies the name of a style as it should appear in the user interface. If this attribute is not present, the display name should be the same as the style name.
sourcepub fn set_parent_style(&mut self, name: &RowStyleRef)
pub fn set_parent_style(&mut self, name: &RowStyleRef)
The style:parent-style-name attribute specifies the name of a parent style. The parent style cannot be an automatic style and shall exist. If a parent style is not specified, the default style which has the same style:family 19.480 attribute value as the current style is used.
source§impl RowStyle
impl RowStyle
sourcepub fn attrmap_mut(&mut self) -> &mut AttrMap2
pub fn attrmap_mut(&mut self) -> &mut AttrMap2
General attributes.
sourcepub fn rowstyle_mut(&mut self) -> &mut AttrMap2
pub fn rowstyle_mut(&mut self) -> &mut AttrMap2
Style attributes.
sourcepub fn set_background_color(&mut self, color: Rgb<u8>)
pub fn set_background_color(&mut self, color: Rgb<u8>)
The fo:background-color attribute specifies a background color for characters, paragraphs, text sections, frames, page bodies, headers, footers, table cells, table rows and tables. This can be transparent or a color. If the value is set to transparent, it switches off any background image that is specified by a style:background-image 17.3.
If a value for a draw:fill attribute is provided in a style, any background image that is specified by a style:background-image element and any background color that is specified with the fo:background-color attribute are switched off.
sourcepub fn set_break_before(&mut self, pagebreak: PageBreak)
pub fn set_break_before(&mut self, pagebreak: PageBreak)
See §7.19.2 of XSL. The values odd-page and even-page are not supported. This attribute shall not be used at the same time as fo:break-after. In the OpenDocument XSL-compatible namespace, the fo:break-before attribute does not support even-page, inherit and odd-page values.
sourcepub fn set_break_after(&mut self, pagebreak: PageBreak)
pub fn set_break_after(&mut self, pagebreak: PageBreak)
See §7.19.1 of XSL. The values odd-page and even-page are not supported. This attribute shall not be used at the same time as fo:break-before. In the OpenDocument XSL-compatible namespace, the fo:break-after attribute does not support even-page, inherit and odd-page values.
sourcepub fn set_keep_together(&mut self, keep_together: TextKeep)
pub fn set_keep_together(&mut self, keep_together: TextKeep)
See §7.19.3 of XSL. In the OpenDocument XSL-compatible namespace, the fo:keep-together attribute does not support the integer value.
The fo:keep-together attribute is usable with the following elements: style:paragraphproperties 17.6 and style:table-row-properties 17.17.
sourcepub fn set_min_row_height(&mut self, min_height: Length)
pub fn set_min_row_height(&mut self, min_height: Length)
The style:min-row-height attribute specifies a fixed minimum height for a row.
sourcepub fn set_row_height(&mut self, height: Length)
pub fn set_row_height(&mut self, height: Length)
The style:row-height attribute specifies a fixed row height
sourcepub fn row_height(&self) -> Result<Length, OdsError>
pub fn row_height(&self) -> Result<Length, OdsError>
Parses the row height
sourcepub fn set_use_optimal_row_height(&mut self, opt: bool)
pub fn set_use_optimal_row_height(&mut self, opt: bool)
The style:use-optimal-row-height attribute specifies that a row height should be recalculated automatically if content in the row changes. The defined values for the style:use-optimal-row-height attribute are:
- false: row height should not be recalculated automatically if content in the row changes.
- true: row height should be recalculated automatically if content in the row changes.
sourcepub fn use_optimal_row_height(&self) -> Result<bool, OdsError>
pub fn use_optimal_row_height(&self) -> Result<bool, OdsError>
Parses the flag.