Struct spreadsheet_ods::CellStyle [−][src]
pub struct CellStyle { /* fields omitted */ }
Describes the style information for a cell.
use spreadsheet_ods::{pt, Length, CellStyle, WorkBook, Sheet, CellStyleRef}; use spreadsheet_ods::defaultstyles::DefaultFormat; use color::Rgb; let mut book = WorkBook::new(); let mut st_header = CellStyle::new("header", &DefaultFormat::default()); st_header.set_font_bold(); st_header.set_color(Rgb::new(255,255,0)); st_header.set_font_size(pt!(18)); let ref_header = book.add_cellstyle(st_header); let mut sheet0 = Sheet::new(); sheet0.set_styled_value(0,0, "title", &ref_header); // use a style defined later or elsewhere: let ref_some = CellStyleRef::from("some_else"); sheet0.set_styled_value(1,0, "some", &ref_some);
Implementations
impl CellStyle
[src]
impl CellStyle
[src]pub fn empty() -> Self
[src]
Creates an empty style.
pub fn new<S: Into<String>>(name: S, value_format: &ValueFormatRef) -> Self
[src]
Creates an empty style with the given name and a reference to a value format.
pub fn style_ref(&self) -> CellStyleRef
[src]
Returns the name as a CellStyleRef.
pub fn origin(&self) -> StyleOrigin
[src]
Origin of the style, either styles.xml oder content.xml
pub fn set_origin(&mut self, origin: StyleOrigin)
[src]
Changes the origin.
pub fn styleuse(&self) -> StyleUse
[src]
pub fn set_styleuse(&mut self, styleuse: StyleUse)
[src]
pub fn name(&self) -> &str
[src]
Stylename
pub fn set_name<S: Into<String>>(&mut self, name: S)
[src]
Stylename
pub fn value_format(&self) -> Option<&String>
[src]
Reference to the value format.
pub fn set_value_format(&mut self, name: &ValueFormatRef)
[src]
Reference to the value format.
pub fn display_name(&self) -> Option<&String>
[src]
Display name.
pub fn set_display_name<S: Into<String>>(&mut self, name: S)
[src]
Display name.
pub fn parent_style(&self) -> Option<&String>
[src]
The parent style this derives from.
pub fn set_parent_style(&mut self, name: &CellStyleRef)
[src]
The parent style this derives from.
pub fn attrmap(&self) -> &AttrMap2
[src]
Allows access to all attributes of the style itself.
pub fn attrmap_mut(&mut self) -> &mut AttrMap2
[src]
Allows access to all attributes of the style itself.
pub fn cellstyle(&self) -> &AttrMap2
[src]
Allows access to all cell-style like attributes.
pub fn cellstyle_mut(&mut self) -> &mut AttrMap2
[src]
Allows access to all cell-style like attributes.
pub fn paragraphstyle(&self) -> &AttrMap2
[src]
Allows access to all paragraph-style like attributes.
pub fn paragraphstyle_mut(&mut self) -> &mut AttrMap2
[src]
Allows access to all paragraph-style like attributes.
pub fn textstyle(&self) -> &AttrMap2
[src]
Allows access to all text-style like attributes.
pub fn textstyle_mut(&mut self) -> &mut AttrMap2
[src]
Allows access to all text-style like attributes.
pub fn push_stylemap(&mut self, stylemap: StyleMap)
[src]
Adds a stylemap.
pub fn stylemaps(&self) -> Option<&Vec<StyleMap>>
[src]
Returns the stylemaps
pub fn stylemaps_mut(&mut self) -> &mut Vec<StyleMap>
[src]
Returns the mutable stylemap.
pub fn set_break_before(&mut self, pagebreak: PageBreak)
[src]
Pagebreak before
pub fn set_break_after(&mut self, pagebreak: PageBreak)
[src]
Pagebreak after
pub fn set_keep_together(&mut self, keep_together: TextKeep)
[src]
Keep-together
pub fn set_keep_with_next(&mut self, keep_with_next: TextKeep)
[src]
Keep with next
pub fn set_margin(&mut self, margin: Length)
[src]
Margin for all sides.
pub fn set_margin_bottom(&mut self, margin: Length)
[src]
Margin
pub fn set_margin_left(&mut self, margin: Length)
[src]
Margin
pub fn set_margin_right(&mut self, margin: Length)
[src]
Margin
pub fn set_margin_top(&mut self, margin: Length)
[src]
Margin
pub fn set_text_align_source(&mut self, align: TextAlignSource)
[src]
Text alignment.
pub fn set_text_align(&mut self, align: TextAlign)
[src]
Text alignment.
pub fn set_text_indent(&mut self, indent: Length)
[src]
Text indent.
pub fn set_line_spacing(&mut self, spacing: Length)
[src]
Line spacing.
pub fn set_number_lines(&mut self, number: bool)
[src]
Line numbering.
pub fn set_vertical_align_para(&mut self, align: ParaAlignVertical)
[src]
Vertical alignment for paragraphs.
pub fn set_color(&mut self, color: Rgb<u8>)
[src]
Text color
pub fn set_font_name<S: Into<String>>(&mut self, name: S)
[src]
Text font.
pub fn set_font_attr(&mut self, size: Length, bold: bool, italic: bool)
[src]
Combined font attributes.
pub fn set_font_size(&mut self, size: Length)
[src]
Font size.
pub fn set_font_size_percent(&mut self, size: f64)
[src]
Font size as a percentage.
pub fn set_font_italic(&mut self)
[src]
Set to italic.
pub fn set_font_style(&mut self, style: FontStyle)
[src]
Set font style.
pub fn set_font_bold(&mut self)
[src]
Set to bold.
pub fn set_font_weight(&mut self, weight: FontWeight)
[src]
Sets the font weight.
pub fn set_letter_spacing(&mut self, spacing: Length)
[src]
Sets the letter spacing.
pub fn set_letter_spacing_normal(&mut self)
[src]
Sets the letter spacing to normal.
pub fn set_text_shadow(
&mut self,
x_offset: Length,
y_offset: Length,
blur: Option<Length>,
color: Rgb<u8>
)
[src]
&mut self,
x_offset: Length,
y_offset: Length,
blur: Option<Length>,
color: Rgb<u8>
)
Text shadow.
pub fn set_text_position(&mut self, pos: TextPosition)
[src]
Text positioning.
pub fn set_text_transform(&mut self, trans: TextTransform)
[src]
Transforms on the text.
pub fn set_font_relief(&mut self, relief: TextRelief)
[src]
Font style relief.
pub fn set_font_line_through_color(&mut self, color: Rgb<u8>)
[src]
Color
pub fn set_font_line_through_style(&mut self, lstyle: LineStyle)
[src]
Line through
pub fn set_font_line_through_mode(&mut self, lmode: LineMode)
[src]
Line through
pub fn set_font_line_through_type(&mut self, ltype: LineType)
[src]
Line through
pub fn set_font_line_through_text<S: Into<String>>(&mut self, text: S)
[src]
Line through
pub fn set_font_line_through_text_style(&mut self, style_ref: TextStyleRef)
[src]
References a text-style.
pub fn set_font_line_through_width(&mut self, lwidth: LineWidth)
[src]
Line through
pub fn set_font_text_outline(&mut self, outline: bool)
[src]
Outline
pub fn set_font_underline_color(&mut self, color: Rgb<u8>)
[src]
Underlining
pub fn set_font_underline_style(&mut self, lstyle: LineStyle)
[src]
Underlining
pub fn set_font_underline_type(&mut self, ltype: LineType)
[src]
Underlining
pub fn set_font_underline_mode(&mut self, lmode: LineMode)
[src]
Underlining
pub fn set_font_underline_width(&mut self, lwidth: LineWidth)
[src]
Underlining
pub fn set_font_overline_color(&mut self, color: Rgb<u8>)
[src]
Overlining
pub fn set_font_overline_style(&mut self, lstyle: LineStyle)
[src]
Overlining
pub fn set_font_overline_type(&mut self, ltype: LineType)
[src]
Overlining
pub fn set_font_overline_mode(&mut self, lmode: LineMode)
[src]
Overlining
pub fn set_font_overline_width(&mut self, lwidth: LineWidth)
[src]
Overlining
pub fn set_background_color(&mut self, color: Rgb<u8>)
[src]
Background-color
pub fn set_border(&mut self, width: Length, border: Border, color: Rgb<u8>)
[src]
Border style all four sides.
pub fn set_border_bottom(
&mut self,
width: Length,
border: Border,
color: Rgb<u8>
)
[src]
&mut self,
width: Length,
border: Border,
color: Rgb<u8>
)
Border style.
pub fn set_border_top(&mut self, width: Length, border: Border, color: Rgb<u8>)
[src]
Border style.
pub fn set_border_left(&mut self, width: Length, border: Border, color: Rgb<u8>)
[src]
Border style.
pub fn set_border_right(
&mut self,
width: Length,
border: Border,
color: Rgb<u8>
)
[src]
&mut self,
width: Length,
border: Border,
color: Rgb<u8>
)
Border style.
pub fn set_border_line_width(
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
[src]
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
Widths for double borders.
pub fn set_border_line_width_bottom(
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
[src]
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
Widths for double borders.
pub fn set_border_line_width_left(
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
[src]
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
Widths for double borders.
pub fn set_border_line_width_right(
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
[src]
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
Widths for double borders.
pub fn set_border_line_width_top(
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
[src]
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
Widths for double borders.
pub fn set_padding(&mut self, padding: Length)
[src]
Padding for all sides.
pub fn set_padding_bottom(&mut self, padding: Length)
[src]
Padding
pub fn set_padding_left(&mut self, padding: Length)
[src]
Padding
pub fn set_padding_right(&mut self, padding: Length)
[src]
Padding
pub fn set_padding_top(&mut self, padding: Length)
[src]
Padding
pub fn set_shadow(
&mut self,
x_offset: Length,
y_offset: Length,
blur: Option<Length>,
color: Rgb<u8>
)
[src]
&mut self,
x_offset: Length,
y_offset: Length,
blur: Option<Length>,
color: Rgb<u8>
)
Shadow
pub fn set_writing_mode(&mut self, writing_mode: WritingMode)
[src]
Writing-mode
pub fn set_wrap_option(&mut self, wrap: WrapOption)
[src]
Wrap text.
pub fn set_print_content(&mut self, print: bool)
[src]
Printing?
pub fn set_repeat_content(&mut self, print: bool)
[src]
Repeat to fill.
pub fn set_rotation_align(&mut self, align: RotationAlign)
[src]
Rotation
pub fn set_rotation_angle(&mut self, angle: Angle)
[src]
Rotation
pub fn set_shrink_to_fit(&mut self, shrink: bool)
[src]
Shrink text to fit.
pub fn set_vertical_align(&mut self, align: CellAlignVertical)
[src]
Vertical alignment.
pub fn set_diagonal_bl_tr(
&mut self,
width: Length,
border: Border,
color: Rgb<u8>
)
[src]
&mut self,
width: Length,
border: Border,
color: Rgb<u8>
)
Diagonal style.
pub fn set_diagonal_bl_tr_widths(
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
[src]
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
Widths for double borders.
pub fn set_diagonal_tl_br(
&mut self,
width: Length,
border: Border,
color: Rgb<u8>
)
[src]
&mut self,
width: Length,
border: Border,
color: Rgb<u8>
)
Diagonal style.
pub fn set_diagonal_tl_br_widths(
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
[src]
&mut self,
inner: Length,
spacing: Length,
outer: Length
)
Widths for double borders.
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for CellStyle
impl RefUnwindSafe for CellStyle
impl UnwindSafe for CellStyle
impl UnwindSafe for CellStyle