mirror of
https://github.com/zaphar/sheetsui.git
synced 2025-07-21 20:39:47 -04:00
docs: style path documentation
This commit is contained in:
parent
3219e01176
commit
7ffd420029
4
Cargo.lock
generated
4
Cargo.lock
generated
@ -841,7 +841,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ironcalc"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/ironcalc/IronCalc?rev=264fcac63cc93b08a4b4a6764815e0c0adf6a53c#99125f1fea1c8c72c61f8cba94d847ed3471a4af"
|
||||
source = "git+https://github.com/ironcalc/IronCalc?rev=264fcac63cc93b08a4b4a6764815e0c0adf6a53c#7e54cb6aa27f6d02fc3b090de4fb127c67900dc8"
|
||||
dependencies = [
|
||||
"bitcode",
|
||||
"chrono",
|
||||
@ -857,7 +857,7 @@ dependencies = [
|
||||
[[package]]
|
||||
name = "ironcalc_base"
|
||||
version = "0.3.0"
|
||||
source = "git+https://github.com/ironcalc/IronCalc?rev=264fcac63cc93b08a4b4a6764815e0c0adf6a53c#99125f1fea1c8c72c61f8cba94d847ed3471a4af"
|
||||
source = "git+https://github.com/ironcalc/IronCalc?rev=264fcac63cc93b08a4b4a6764815e0c0adf6a53c#7e54cb6aa27f6d02fc3b090de4fb127c67900dc8"
|
||||
dependencies = [
|
||||
"bitcode",
|
||||
"chrono",
|
||||
|
@ -278,14 +278,26 @@ impl Book {
|
||||
// not use a style.
|
||||
match self
|
||||
.model
|
||||
.get_model()
|
||||
.get_style_for_cell(sheet, cell.row as i32, cell.col as i32)
|
||||
.get_cell_style(sheet, cell.row as i32, cell.col as i32)
|
||||
{
|
||||
Err(_) => None,
|
||||
Ok(s) => Some(s),
|
||||
}
|
||||
}
|
||||
|
||||
/// Set the cell style
|
||||
/// Valid style paths are:
|
||||
/// * fill.bg_color background color
|
||||
/// * fill.fg_color foreground color
|
||||
/// * font.b bold
|
||||
/// * font.i italicize
|
||||
/// * font.strike strikethrough
|
||||
/// * font.color font color
|
||||
/// * num_fmt number format
|
||||
/// * alignment turn off alignment
|
||||
/// * alignment.horizontal make alignment horzontal
|
||||
/// * alignment.vertical make alignment vertical
|
||||
/// * alignment.wrap_text wrap cell text
|
||||
pub fn set_cell_style(&mut self, style: &[(&str, &str)], area: &Area) -> Result<()> {
|
||||
for (path, val) in style {
|
||||
self.model
|
||||
@ -315,6 +327,19 @@ impl Book {
|
||||
}
|
||||
}
|
||||
|
||||
/// Set the column style.
|
||||
/// Valid style paths are:
|
||||
/// * fill.bg_color background color
|
||||
/// * fill.fg_color foreground color
|
||||
/// * font.b bold
|
||||
/// * font.i italicize
|
||||
/// * font.strike strikethrough
|
||||
/// * font.color font color
|
||||
/// * num_fmt number format
|
||||
/// * alignment turn off alignment
|
||||
/// * alignment.horizontal make alignment horzontal
|
||||
/// * alignment.vertical make alignment vertical
|
||||
/// * alignment.wrap_text wrap cell text
|
||||
pub fn set_col_style(
|
||||
&mut self,
|
||||
style: &[(&str, &str)],
|
||||
@ -332,6 +357,19 @@ impl Book {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Set the row style
|
||||
/// Valid style paths are:
|
||||
/// * fill.bg_color background color
|
||||
/// * fill.fg_color foreground color
|
||||
/// * font.b bold
|
||||
/// * font.i italicize
|
||||
/// * font.strike strikethrough
|
||||
/// * font.color font color
|
||||
/// * num_fmt number format
|
||||
/// * alignment turn off alignment
|
||||
/// * alignment.horizontal make alignment horzontal
|
||||
/// * alignment.vertical make alignment vertical
|
||||
/// * alignment.wrap_text wrap cell text
|
||||
pub fn set_row_style(
|
||||
&mut self,
|
||||
style: &[(&str, &str)],
|
||||
|
Loading…
x
Reference in New Issue
Block a user