Struct spreadsheet_ods::CellContent
source · pub struct CellContent {
pub value: Value,
pub style: Option<String>,
pub formula: Option<String>,
pub repeat: u32,
pub validation_name: Option<String>,
pub span: CellSpan,
pub matrix_span: CellSpan,
pub annotation: Option<Annotation>,
pub draw_frames: Vec<DrawFrame>,
}Expand description
A copy of the relevant data for a spreadsheet cell.
Fields§
§value: ValueCell value.
style: Option<String>Cell stylename.
formula: Option<String>Cell formula.
repeat: u32Cell repeat count.
validation_name: Option<String>Reference to a validation rule.
span: CellSpanCellspan.
matrix_span: CellSpanMatrix span.
annotation: Option<Annotation>Annotation
draw_frames: Vec<DrawFrame>DrawFrames
Implementations§
source§impl CellContent
impl CellContent
sourcepub fn set_formula<V: Into<String>>(&mut self, formula: V)
pub fn set_formula<V: Into<String>>(&mut self, formula: V)
Sets the formula.
sourcepub fn clear_formula(&mut self)
pub fn clear_formula(&mut self)
Resets the formula.
sourcepub fn set_style(&mut self, style: &CellStyleRef)
pub fn set_style(&mut self, style: &CellStyleRef)
Sets the cell style.
sourcepub fn clear_style(&mut self)
pub fn clear_style(&mut self)
Removes the style.
sourcepub fn set_repeat(&mut self, repeat: u32)
pub fn set_repeat(&mut self, repeat: u32)
Sets the repeat count for the cell. Value must be > 0.
sourcepub fn get_repeat(&mut self) -> u32
pub fn get_repeat(&mut self) -> u32
Returns the repeat count for the cell.
sourcepub fn validation(&self) -> Option<&String>
pub fn validation(&self) -> Option<&String>
Returns the validation name.
sourcepub fn set_validation(&mut self, validation: &ValidationRef)
pub fn set_validation(&mut self, validation: &ValidationRef)
Sets the validation name.
sourcepub fn clear_validation(&mut self)
pub fn clear_validation(&mut self)
No validation.
sourcepub fn set_row_span(&mut self, rows: u32)
pub fn set_row_span(&mut self, rows: u32)
Sets the row span of this cell. Cells below with values will be lost when writing.
sourcepub fn set_col_span(&mut self, cols: u32)
pub fn set_col_span(&mut self, cols: u32)
Sets the column span of this cell. Cells to the right with values will be lost when writing.
sourcepub fn set_matrix_row_span(&mut self, rows: u32)
pub fn set_matrix_row_span(&mut self, rows: u32)
Sets the row span of this cell. Cells below with values will be lost when writing.
sourcepub fn matrix_row_span(&self) -> u32
pub fn matrix_row_span(&self) -> u32
Returns the row span.
sourcepub fn set_matrix_col_span(&mut self, cols: u32)
pub fn set_matrix_col_span(&mut self, cols: u32)
Sets the column span of this cell. Cells to the right with values will be lost when writing.
sourcepub fn matrix_col_span(&self) -> u32
pub fn matrix_col_span(&self) -> u32
Returns the col span.
sourcepub fn set_annotation(&mut self, annotation: Annotation)
pub fn set_annotation(&mut self, annotation: Annotation)
Annotation
sourcepub fn clear_annotation(&mut self)
pub fn clear_annotation(&mut self)
Annotation
sourcepub fn annotation(&self) -> Option<&Annotation>
pub fn annotation(&self) -> Option<&Annotation>
Returns the Annotation
sourcepub fn set_draw_frames(&mut self, draw_frames: Vec<DrawFrame>)
pub fn set_draw_frames(&mut self, draw_frames: Vec<DrawFrame>)
Draw Frames
sourcepub fn draw_frames(&self) -> &Vec<DrawFrame>
pub fn draw_frames(&self) -> &Vec<DrawFrame>
Draw Frames
Trait Implementations§
source§impl Clone for CellContent
impl Clone for CellContent
source§fn clone(&self) -> CellContent
fn clone(&self) -> CellContent
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more