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

source

pub fn origin(&self) -> StyleOrigin

Origin of the style, either styles.xml oder content.xml

source

pub fn set_origin(&mut self, origin: StyleOrigin)

Changes the origin.

source

pub fn styleuse(&self) -> StyleUse

Usage for the style.

source

pub fn set_styleuse(&mut self, styleuse: StyleUse)

Usage for the style.

source

pub fn name(&self) -> &str

Stylename

source

pub fn set_name<S: AsRef<str>>(&mut self, name: S)

Stylename

source

pub fn style_ref(&self) -> RowStyleRef

Returns the name as a style reference.

source

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.
source

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.

source

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.

source

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

source

pub fn new_empty() -> Self

empty

source

pub fn new<S: AsRef<str>>(name: S) -> Self

New Style.

source

pub fn attrmap(&self) -> &AttrMap2

General attributes.

source

pub fn attrmap_mut(&mut self) -> &mut AttrMap2

General attributes.

source

pub fn rowstyle(&self) -> &AttrMap2

Style attributes.

source

pub fn rowstyle_mut(&mut self) -> &mut AttrMap2

Style attributes.

source

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.

source

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.

source

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.

source

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.

source

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.

source

pub fn set_row_height(&mut self, height: Length)

The style:row-height attribute specifies a fixed row height

source

pub fn row_height(&self) -> Result<Length, OdsError>

Parses the row height

source

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.
source

pub fn use_optimal_row_height(&self) -> Result<bool, OdsError>

Parses the flag.

Trait Implementations§

source§

impl Clone for RowStyle

source§

fn clone(&self) -> RowStyle

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for RowStyle

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl GetSize for RowStyle

source§

fn get_heap_size(&self) -> usize

Determines how many bytes this object occupies inside the heap. Read more
source§

fn get_stack_size() -> usize

Determines how may bytes this object occupies inside the stack. Read more
source§

fn get_size(&self) -> usize

Determines the total size of the object. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.