RubyStyle

Struct RubyStyle 

Source
pub struct RubyStyle { /* private fields */ }
Expand description

Text style. This is not used for cell-formatting. Use CellStyle instead.

Implementations§

Source§

impl RubyStyle

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) -> RubyStyleRef

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: &RubyStyleRef)

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 RubyStyle

Source

pub fn new_empty() -> Self

Empty.

Source

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

A new named style.

Source

pub fn attrmap(&self) -> &AttrMap2

General attributes for the style.

Source

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

General attributes for the style.

Source

pub fn rubystyle(&self) -> &AttrMap2

All text-attributes for the style.

Source

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

All text-attributes for the style.

Trait Implementations§

Source§

impl Clone for RubyStyle

Source§

fn clone(&self) -> RubyStyle

Returns a duplicate 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 RubyStyle

Source§

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

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

impl GetSize for RubyStyle

Source§

fn get_heap_size(&self) -> usize

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

fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)

Determines how many bytes this object occupies inside the heap while using a tracker. 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
Source§

fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)
where T: GetSizeTracker,

Determines the total size of the object while using a tracker. 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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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,

Source§

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>,

Source§

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>,

Source§

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.