Struct spreadsheet_ods::CellStyle[][src]

pub struct CellStyle { /* fields omitted */ }
Expand description

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

Creates an empty style.

Creates an empty style with the given name and a reference to a value format.

Returns the name as a CellStyleRef.

Origin of the style, either styles.xml oder content.xml

Changes the origin.

Usage for the style.

Usage for the style.

Stylename

Stylename

Reference to the value format.

Reference to the value format.

Display name.

Display name.

The parent style this derives from.

The parent style this derives from.

Allows access to all attributes of the style itself.

Allows access to all attributes of the style itself.

Allows access to all cell-style like attributes.

Allows access to all cell-style like attributes.

Allows access to all paragraph-style like attributes.

Allows access to all paragraph-style like attributes.

Allows access to all text-style like attributes.

Allows access to all text-style like attributes.

Adds a stylemap.

Returns the stylemaps

Returns the mutable stylemap.

Pagebreak before

Pagebreak after

Keep-together

Keep with next

Margin for all sides.

Margin

Margin

Margin

Margin

Text alignment.

Text alignment.

Text indent.

Line spacing.

Line numbering.

Vertical alignment for paragraphs.

Text color

Text font.

Combined font attributes.

Font size.

Font size as a percentage.

Set to italic.

Set font style.

Set to bold.

Sets the font weight.

Sets the letter spacing.

Sets the letter spacing to normal.

Text shadow.

Text positioning.

Transforms on the text.

Font style relief.

Color

Line through

Line through

Line through

Line through

References a text-style.

Line through

Outline

Underlining

Underlining

Underlining

Underlining

Underlining

Overlining

Overlining

Overlining

Overlining

Overlining

Background-color

Border style all four sides.

Border style.

Border style.

Border style.

Border style.

Widths for double borders.

Widths for double borders.

Widths for double borders.

Widths for double borders.

Widths for double borders.

Padding for all sides.

Padding

Padding

Padding

Padding

Shadow

Writing-mode

Wrap text.

Printing?

Repeat to fill.

Rotation

Rotation

Shrink text to fit.

Vertical alignment.

Diagonal style.

Widths for double borders.

Diagonal style.

Widths for double borders.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.