Struct spreadsheet_ods::style::stylemap::StyleMap
source · pub struct StyleMap { /* private fields */ }Expand description
A style-map is one way for conditional formatting of cells.
It seems this is always translated into calcext:conditional-formats which seem to be the preferred way to deal with this. But it still works somewhat.
Implementations§
source§impl StyleMap
impl StyleMap
sourcepub fn new(
condition: Condition,
applied_style: AnyStyleRef,
base_cell: Option<CellRef>
) -> Self
pub fn new( condition: Condition, applied_style: AnyStyleRef, base_cell: Option<CellRef> ) -> Self
Create a stylemap. When the condition is fullfilled the style applied_style is used. The base_cell is used to resolve all relative cell-references within the condition.
sourcepub fn set_condition(&mut self, cond: Condition)
pub fn set_condition(&mut self, cond: Condition)
Condition
sourcepub fn applied_style(&self) -> &AnyStyleRef
pub fn applied_style(&self) -> &AnyStyleRef
The applied style.
sourcepub fn set_applied_style(&mut self, style: AnyStyleRef)
pub fn set_applied_style(&mut self, style: AnyStyleRef)
Sets the applied style.
sourcepub fn set_base_cell(&mut self, cellref: Option<CellRef>)
pub fn set_base_cell(&mut self, cellref: Option<CellRef>)
Sets the base cell.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for StyleMap
impl Send for StyleMap
impl Sync for StyleMap
impl Unpin for StyleMap
impl UnwindSafe for StyleMap
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more