pub struct TableStyle { /* private fields */ }Expand description
Describes the style information for a table.
Implementations§
Source§impl TableStyle
impl TableStyle
Sourcepub fn origin(&self) -> StyleOrigin
pub fn origin(&self) -> StyleOrigin
Origin of the style, either styles.xml oder content.xml
Sourcepub fn set_origin(&mut self, origin: StyleOrigin)
pub fn set_origin(&mut self, origin: StyleOrigin)
Changes the origin.
Sourcepub fn set_styleuse(&mut self, styleuse: StyleUse)
pub fn set_styleuse(&mut self, styleuse: StyleUse)
Usage for the style.
Sourcepub fn style_ref(&self) -> TableStyleRef
pub fn style_ref(&self) -> TableStyleRef
Returns the name as a style reference.
Sourcepub fn set_auto_update(&mut self, auto: bool)
pub fn set_auto_update(&mut self, auto: bool)
The style:auto-update attribute specifies whether styles are automatically updated when the formatting properties of an object that has the style assigned to it are changed.
The defined values for the style:auto-update attribute are:
- false: a change to a formatting property is applied for the object where the change was made. If necessary, a new automatic style will be created which is applied to the object where the change was made.
- true: a change to a formatting property results in the updating of the common style that is applied to an object. The formatting change is applied to all objects subject to the common style where the change was made.
The default value for this attribute is false.
Sourcepub fn set_class(&mut self, class: &str)
pub fn set_class(&mut self, class: &str)
The style:class attribute specifies a style class name. A style may belong to an arbitrary class of styles. The style class name is an arbitrary string. The style class name has no meaning within the file format itself, but it can for instance be evaluated by user interfaces to show a list of styles where the styles are grouped by its name.
Sourcepub fn set_display_name<S: Into<String>>(&mut self, name: S)
pub fn set_display_name<S: Into<String>>(&mut self, name: S)
The style:display-name attribute specifies the name of a style as it should appear in the user interface. If this attribute is not present, the display name should be the same as the style name.
Sourcepub fn set_parent_style(&mut self, name: &TableStyleRef)
pub fn set_parent_style(&mut self, name: &TableStyleRef)
The style:parent-style-name attribute specifies the name of a parent style. The parent style cannot be an automatic style and shall exist. If a parent style is not specified, the default style which has the same style:family 19.480 attribute value as the current style is used.
Source§impl TableStyle
impl TableStyle
Sourcepub fn set_master_page(&mut self, masterpage: &MasterPageRef)
pub fn set_master_page(&mut self, masterpage: &MasterPageRef)
The style:master-page-name attribute defines a master page for a paragraph or table style. This applies to automatic and common styles.
If this attribute is associated with a style, a page break is inserted when the style is applied and the specified master page is applied to the resulting page.
This attribute is ignored if it is associated with a paragraph style that is applied to a paragraph within a table.
Sourcepub fn attrmap_mut(&mut self) -> &mut AttrMap2
pub fn attrmap_mut(&mut self) -> &mut AttrMap2
Access to all stored attributes.
Sourcepub fn tablestyle(&self) -> &AttrMap2
pub fn tablestyle(&self) -> &AttrMap2
Access to all style attributes.
Sourcepub fn tablestyle_mut(&mut self) -> &mut AttrMap2
pub fn tablestyle_mut(&mut self) -> &mut AttrMap2
Access to all style attributes.
Sourcepub fn set_background_color(&mut self, color: Rgb<u8>)
pub fn set_background_color(&mut self, color: Rgb<u8>)
The fo:background-color attribute specifies a background color for characters, paragraphs, text sections, frames, page bodies, headers, footers, table cells, table rows and tables. This can be transparent or a color. If the value is set to transparent, it switches off any background image that is specified by a style:background-image 17.3.
If a value for a draw:fill attribute is provided in a style, any background image that is specified by a style:background-image element and any background color that is specified with the fo:background-color attribute are switched off.
Sourcepub fn set_break_before(&mut self, pagebreak: PageBreak)
pub fn set_break_before(&mut self, pagebreak: PageBreak)
See §7.19.2 of XSL. The values odd-page and even-page are not supported. This attribute shall not be used at the same time as fo:break-after. In the OpenDocument XSL-compatible namespace, the fo:break-before attribute does not support even-page, inherit and odd-page values.
Sourcepub fn set_break_after(&mut self, pagebreak: PageBreak)
pub fn set_break_after(&mut self, pagebreak: PageBreak)
See §7.19.1 of XSL. The values odd-page and even-page are not supported. This attribute shall not be used at the same time as fo:break-before. In the OpenDocument XSL-compatible namespace, the fo:break-after attribute does not support even-page, inherit and odd-page values.
Sourcepub fn set_keep_with_next(&mut self, keep_with_next: TextKeep)
pub fn set_keep_with_next(&mut self, keep_with_next: TextKeep)
See §7.19.4 of XSL. In the OpenDocument XSL-compatible namespace, the fo:keep-with-next attribute does not support the integer value.
Sourcepub fn set_margin(&mut self, margin: Margin)
pub fn set_margin(&mut self, margin: Margin)
See §7.29.14 of XSL. In the OpenDocument XSL-compatible namespace, the fo:margin attribute does not support auto and inherit values.
The fo:margin attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tableproperties 17.15.
Sourcepub fn set_margin_bottom(&mut self, margin: Margin)
pub fn set_margin_bottom(&mut self, margin: Margin)
See §7.10.2 of XSL. If this attribute is contained in a style:paragraph-properties 17.6 element, its value may be a percentage that refers to the corresponding margin of a parent style. In the OpenDocument XSL-compatible namespace, the fo:margin-bottom attribute does not support the auto and inherit values.
The fo:margin-bottom attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tableproperties 17.15.
Sourcepub fn set_margin_left(&mut self, margin: Margin)
pub fn set_margin_left(&mut self, margin: Margin)
See §7.10.3 of XSL. If this attribute is contained in a style:paragraph-properties 17.6 element, its value may be a percentage that refers to the corresponding margin of a parent style. Tables that align to the left or to the center ignore right margins, and tables that align to the right or to the center ignore left margins.
The fo:margin-left attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6, style:sectionproperties 17.11 and style:table-properties 17.15.
Sourcepub fn set_margin_right(&mut self, margin: Margin)
pub fn set_margin_right(&mut self, margin: Margin)
See §7.10.4 of XSL. If this attribute is contained in a style:paragraph-properties 17.6 element, its value may be a percentage that refers to the corresponding margin of a parent style. Tables that align to the left or to the center ignore right margins, and tables that align to the right or to the center ignore left margins.
The fo:margin-right attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6, style:sectionproperties 17.11 and style:table-properties 17.15.
Sourcepub fn set_margin_top(&mut self, margin: Margin)
pub fn set_margin_top(&mut self, margin: Margin)
See §7.10.1 of XSL. If this attribute is contained in a style:paragraph-properties 17.6 element, its value may be a percentage that refers to the corresponding margin of a parent style. In the OpenDocument XSL-compatible namespace, the fo:margin-top attribute does not support the inherit value.
The fo:margin-top attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6 and style:tableproperties 17.15.
Sourcepub fn set_may_break_between_rows(&mut self, br: bool)
pub fn set_may_break_between_rows(&mut self, br: bool)
The style:may-break-between-rows attribute specifies that a page break may occur inside a table.
The defined values for the style:may-break-between-rows attribute are:
- false: page break shall not occur inside a table.
- true: page break may occur inside a table
Sourcepub fn set_page_number(&mut self, page_number: PageNumber)
pub fn set_page_number(&mut self, page_number: PageNumber)
The style:page-number attribute specifies the page number that should be used for a new page when either a paragraph or table style specifies a master page that should be applied beginning from the start of a paragraph or table.
The defined values for the style:page-number attribute are:
- auto: a page has the page number of the previous page, incremented by one.
- a value of type nonNegativeInteger 18.2: specifies a page number.
The style:page-number attribute is usable with the following elements: style:paragraph-properties 17.6 and style:table-properties 17.15.
The values of the style:page-number attribute are a value of type nonNegativeInteger 18.2 or auto.
Sourcepub fn set_rel_width(&mut self, rel_width: RelativeScale)
pub fn set_rel_width(&mut self, rel_width: RelativeScale)
The style:rel-width attribute specifies the relative width of a drawing object.
The defined values for the style:rel-width attribute are:
- scale: the width should be calculated depending on the height, so that the ratio of width and height of the original image or object size is preserved.
- scale-min: the width should be calculated as for value scale, but the calculated width is a minimum width rather than an absolute one.
- a value of type percent 18.3.23.
The interpretation of the percent value depends on the anchor of the drawing object. If the anchor for the drawing object is in a table cell, the percent value of the surrounding table box. If the anchor for the drawing object is in a text box, the percentage value of the surrounding text box. In all other cases, the percent value of the containing page or window To support consumers that do not support relative width, producers should also provide the width in a svg:width 19.575 attribute.
Sourcepub fn set_width(&mut self, width: Length)
pub fn set_width(&mut self, width: Length)
The style:width attribute specifies the fixed width of a table. Every table shall have a fixed width.
Sourcepub fn set_shadow(
&mut self,
x_offset: Length,
y_offset: Length,
blur: Option<Length>,
color: Rgb<u8>,
)
pub fn set_shadow( &mut self, x_offset: Length, y_offset: Length, blur: Option<Length>, color: Rgb<u8>, )
The style:shadow attribute specifies a shadow effect. The defined values for this attribute are those defined in §7.16.5 of XSL, except the value inherit.
The shadow effect is not applied to the text content of an element, but depending on the element where the attribute appears, to a paragraph, a text box, a page body, a header, a footer, a table or a table cell.
The style:shadow attribute is usable with the following elements: style:graphicproperties 17.21, style:header-footer-properties 17.5, style:pagelayout-properties 17.2, style:paragraph-properties 17.6, style:tablecell-properties 17.18 and style:table-properties 17.15.
Sourcepub fn set_writing_mode(&mut self, writing_mode: WritingMode)
pub fn set_writing_mode(&mut self, writing_mode: WritingMode)
See §7.27.7 of XSL.
The defined value for the style:writing-mode attribute is page: writing mode is inherited from the page that contains the element where this attribute appears.
Sourcepub fn set_align(&mut self, align: TableAlign)
pub fn set_align(&mut self, align: TableAlign)
The table:align attribute specifies the horizontal alignment of a table.
The defined values for the table:align attribute are:
- center: table aligns to the center between left and right margins.
- left: table aligns to the left margin.
- margins: table fills all the space between the left and right margins.
- right: table aligns to the right margin.
Consumers that do not support the margins value, may treat this value as left.
Sourcepub fn set_border_model(&mut self, border: TableBorderModel)
pub fn set_border_model(&mut self, border: TableBorderModel)
The table:border-model attribute specifies what border model to use when creating a table with a border.
The defined values for the table:border-model attribute are:
- collapsing: when two adjacent cells have different borders, the wider border appears as the border between the cells. Each cell receives half of the width of the border.
- separating: borders appear within the cell that specifies the border.
In OpenDocument, a row height or column width includes any space required to display borders or padding. This means that, while the width and height of the content area is less than the column width and row height, the sum of the widths of all columns is equal to the total width of the table.
Sourcepub fn set_display(&mut self, display: bool)
pub fn set_display(&mut self, display: bool)
The table:display attribute specifies whether a table is displayed.
The defined values for the table:display attribute are:
- false: table should not be displayed.
- true: table should be displayed.
Sourcepub fn set_tab_color(&mut self, color: Rgb<u8>)
pub fn set_tab_color(&mut self, color: Rgb<u8>)
The table:tab-color attribute specifies the color of the tab associated with a sheet. When this attribute is missing, the application should use the default color used for sheet tabs.
Trait Implementations§
Source§impl Clone for TableStyle
impl Clone for TableStyle
Source§fn clone(&self) -> TableStyle
fn clone(&self) -> TableStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TableStyle
impl Debug for TableStyle
Source§impl GetSize for TableStyle
impl GetSize for TableStyle
Source§fn get_heap_size(&self) -> usize
fn get_heap_size(&self) -> usize
Source§fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>(
&self,
tracker: TRACKER,
) -> (usize, TRACKER)
fn get_heap_size_with_tracker<TRACKER: GetSizeTracker>( &self, tracker: TRACKER, ) -> (usize, TRACKER)
tracker. Read moreSource§fn get_stack_size() -> usize
fn get_stack_size() -> usize
Source§fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
fn get_size_with_tracker<T>(&self, tracker: T) -> (usize, T)where
T: GetSizeTracker,
tracker. Read more