pub struct ColStyle { /* private fields */ }Expand description
Describes the style information for a table column. Hardly ever used. It’s easier to set the col_width via Sheet::set_col_width
Implementations§
Source§impl ColStyle
impl ColStyle
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) -> ColStyleRef
pub fn style_ref(&self) -> ColStyleRef
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: &ColStyleRef)
pub fn set_parent_style(&mut self, name: &ColStyleRef)
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 ColStyle
impl ColStyle
Sourcepub fn attrmap_mut(&mut self) -> &mut AttrMap2
pub fn attrmap_mut(&mut self) -> &mut AttrMap2
Attributes
Sourcepub fn colstyle_mut(&mut self) -> &mut AttrMap2
pub fn colstyle_mut(&mut self) -> &mut AttrMap2
Style attributes
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_col_width(&mut self, width: Length)
pub fn set_col_width(&mut self, width: Length)
The style:column-width attribute specifies a fixed width for a column.
Sourcepub fn set_rel_col_width(&mut self, rel: f64)
pub fn set_rel_col_width(&mut self, rel: f64)
The style:rel-column-width attribute specifies a relative width of a column with a number value, followed by a ”*” (U+002A, ASTERISK) character. If rc is the relative with of the column, rs the sum of all relative columns widths, and ws the absolute width that is available for these columns the absolute width wc of the column is wc=rcws/rs.
Sourcepub fn set_use_optimal_col_width(&mut self, opt: bool)
pub fn set_use_optimal_col_width(&mut self, opt: bool)
The style:use-optimal-column-width attribute specifies that a column width should be recalculated automatically if content in the column changes.
Sourcepub fn use_optimal_col_width(&self) -> Result<bool, OdsError>
pub fn use_optimal_col_width(&self) -> Result<bool, OdsError>
Parses the flag.
Trait Implementations§
Source§impl GetSize for ColStyle
impl GetSize for ColStyle
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Source§fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)
fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
tracker. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
tracker. Read more