pub struct PageStyle { /* private fields */ }Expand description
The style:page-layout element represents the styles that specify the formatting properties of a page.
For an example see MasterPage.
Implementations§
Source§impl PageStyle
impl PageStyle
Sourcepub fn style_ref(&self) -> PageStyleRef
pub fn style_ref(&self) -> PageStyleRef
Style reference.
Sourcepub fn set_page_usage(&mut self, usage: MasterPageUsage)
pub fn set_page_usage(&mut self, usage: MasterPageUsage)
The style:page-usage attribute specifies the type of pages that a page master should generate. The defined values for the style:page-usage attribute are:
- all: if there are no style:header-left or style:footer-left elements, the header and footer content is the same for left and right pages.
- left: style:header-left or style:footer-left elements are ignored.
- mirrored: if there are no style:header-left or style:footer-left elements, the header and footer content is the same for left and right pages.
- right: style:header-left or style:footer-left elements are ignored.
The default value for this attribute is all.
Sourcepub fn clear_page_usage(&mut self)
pub fn clear_page_usage(&mut self)
Remove page-usage flag.
Sourcepub fn page_usage(&self) -> OdsResult<Option<MasterPageUsage>>
pub fn page_usage(&self) -> OdsResult<Option<MasterPageUsage>>
The style:page-usage attribute specifies the type of pages that a page master should generate.
Sourcepub fn headerstyle(&self) -> &HeaderFooterStyle
pub fn headerstyle(&self) -> &HeaderFooterStyle
Attributes for header.
Sourcepub fn headerstyle_mut(&mut self) -> &mut HeaderFooterStyle
pub fn headerstyle_mut(&mut self) -> &mut HeaderFooterStyle
Attributes for header.
Attributes for footer.
Attributes for footer.
Sourcepub fn set_page_height(&mut self, height: Length)
pub fn set_page_height(&mut self, height: Length)
Page Height
Sourcepub fn set_page_width(&mut self, width: Length)
pub fn set_page_width(&mut self, width: Length)
Page Width
Sourcepub fn set_first_page_number(&mut self, number: u32)
pub fn set_first_page_number(&mut self, number: u32)
The style:first-page-number attribute specifies the number of a document. The value of this attribute can be an integer or continue. If the value is continue, the page number is the preceding page number incremented by 1. The default first page number is 1.
Sourcepub fn set_footnote_max_height(&mut self, height: Length)
pub fn set_footnote_max_height(&mut self, height: Length)
The style:footnote-max-height attribute specifies the maximum amount of space on a page that a footnote can occupy. The value of the attribute is a length, which determines the maximum height of a footnote area. If the value of this attribute is set to 0cm, there is no limit to the amount of space that the footnote can occupy.
Sourcepub fn set_num_format(&mut self, format: StyleNumFormat)
pub fn set_num_format(&mut self, format: StyleNumFormat)
The style:num-format attribute specifies a numbering sequence. If no value is given, no number sequence is displayed.
The defined values for the style:num-format attribute are:
- 1: number sequence starts with “1”.
- a: number sequence starts with “a”.
- A: number sequence starts with “A”.
- empty string: no number sequence displayed.
- i: number sequence starts with “i”.
- I: number sequence start with “I”.
- a value of type string 18.2
Sourcepub fn set_num_letter_sync(&mut self, sync: bool)
pub fn set_num_letter_sync(&mut self, sync: bool)
The style:num-letter-sync attribute specifies whether letter synchronization shall take place. If letters are used in alphabetical order for numbering, there are two ways to process overflows within a digit, as follows:
- false: A new digit is inserted that always has the same value as the following digit. The numbering sequence (for lower case numberings) in that case is a, b, c, …, z, aa, bb, cc, …, zz, aaa, …, and so on.
- true: A new digit is inserted. Its start value is ”a” or ”A”, and it is incremented every time an overflow occurs in the following digit. The numbering sequence (for lower case numberings) in that case is a,b,c, …, z, aa, ab, ac, …,az, ba, …, and so on
Sourcepub fn set_num_prefix<S: Into<String>>(&mut self, prefix: S)
pub fn set_num_prefix<S: Into<String>>(&mut self, prefix: S)
The style:num-prefix attribute specifies what to display before a number. If the style:num-prefix and style:num-suffix values do not contain any character that has a Unicode category of Nd, Nl, No, Lu, Ll, Lt, Lm or Lo, an XSLT format attribute can be created from the OpenDocument attributes by concatenating the values of the style:num-prefix, style:num-format, and style:num-suffix attributes.
Sourcepub fn set_num_suffix<S: Into<String>>(&mut self, suffix: S)
pub fn set_num_suffix<S: Into<String>>(&mut self, suffix: S)
The style:num-prefix and style:num-suffix attributes specify what to display before and after a number. If the style:num-prefix and style:num-suffix values do not contain any character that has a Unicode category of Nd, Nl, No, Lu, Ll, Lt, Lm or Lo, an XSLT format attribute can be created from the OpenDocument attributes by concatenating the values of the style:numprefix, style:num-format, and style:num-suffix attributes.
Sourcepub fn set_paper_tray_name<S: Into<String>>(&mut self, tray: S)
pub fn set_paper_tray_name<S: Into<String>>(&mut self, tray: S)
The style:paper-tray-name attribute specifies the paper tray to use when printing a document. The names assigned to the paper trays depends upon the printer.
The defined values for the style:paper-tray-name attribute are:
- default: the default tray specified by printer configuration settings.
- a value of type string
Sourcepub fn set_print(&mut self, print: &[PrintContent])
pub fn set_print(&mut self, print: &[PrintContent])
The style:print attribute specifies the components in a spreadsheet document to print. The value of the style:print attribute is a white space separated list of one or more of these values: headers, grid, annotations, objects, charts, drawings, formulas, zerovalues, or the empty list.
The defined values for the style:print attribute are:
- annotations: annotations should be printed.
- charts: charts should be printed.
- drawings: drawings should be printed.
- formulas: formulas should be printed.
- headers: headers should be printed.
- grid: grid lines should be printed.
- objects: (including graphics): objects should be printed.
- zero-values: zero-values should be printed.
Sourcepub fn set_print_orientation(&mut self, orientation: PrintOrientation)
pub fn set_print_orientation(&mut self, orientation: PrintOrientation)
The style:print-orientation attribute specifies the orientation of the printed page. The value of this attribute can be portrait or landscape.
The defined values for the style:print-orientation attribute are:
- landscape: a page is printed in landscape orientation.
- portrait: a page is printed in portrait orientation.
Sourcepub fn set_print_page_order(&mut self, order: PrintOrder)
pub fn set_print_page_order(&mut self, order: PrintOrder)
The style:print-page-order attribute specifies the order in which data in a spreadsheet is numbered and printed when the data does not fit on one printed page.
The defined values for the style:print-page-order attribute are:
- ltr: create pages from the first column to the last column before continuing with the next set of rows.
- ttb: create pages from the top row to the bottom row before continuing with the next set of columns.
Sourcepub fn set_scale_to(&mut self, percent: Percent)
pub fn set_scale_to(&mut self, percent: Percent)
The style:scale-to attribute specifies that a document is to be scaled to a percentage value. A value of 100% means no scaling. If this attribute and style:scale-to-pages are absent, a document is not scaled.
Sourcepub fn set_scale_to_pages(&mut self, pages: u32)
pub fn set_scale_to_pages(&mut self, pages: u32)
The style:scale-to-pages attribute specifies the number of pages on which a document should be printed. The document is scaled to fit a specified number of pages. If this attribute and style:scale-to are absent, a document is not scaled.
Sourcepub fn set_table_centering(&mut self, center: PrintCentering)
pub fn set_table_centering(&mut self, center: PrintCentering)
The style:table-centering attribute specifies whether tables are centered horizontally and/or vertically on the page. This attribute only applies to spreadsheet documents. The default is to align the table to the top-left or top-right corner of the page, depending of its writing direction.
The defined values for the style:table-centering attribute are:
- both: tables should be centered both horizontally and vertically on the pages where they appear.
- horizontal: tables should be centered horizontally on the pages where they appear.
- none: tables should not be centered both horizontally or vertically on the pages where they appear.
- vertical: tables should be centered vertically on the pages where they appear.
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_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_border(&mut self, width: Length, border: Border, color: Rgb<u8>)
pub fn set_border(&mut self, width: Length, border: Border, color: Rgb<u8>)
Border style all four sides. See §7.29.3 of XSL.
Sourcepub fn set_border_bottom(
&mut self,
width: Length,
border: Border,
color: Rgb<u8>,
)
pub fn set_border_bottom( &mut self, width: Length, border: Border, color: Rgb<u8>, )
Border style. See §7.29.4 of XSL
Sourcepub fn set_border_left(&mut self, width: Length, border: Border, color: Rgb<u8>)
pub fn set_border_left(&mut self, width: Length, border: Border, color: Rgb<u8>)
Border style. See §7.29.6 of XSL.
Sourcepub fn set_border_right(
&mut self,
width: Length,
border: Border,
color: Rgb<u8>,
)
pub fn set_border_right( &mut self, width: Length, border: Border, color: Rgb<u8>, )
Border style. See §7.29.7 of XSL.
Sourcepub fn set_border_top(&mut self, width: Length, border: Border, color: Rgb<u8>)
pub fn set_border_top(&mut self, width: Length, border: Border, color: Rgb<u8>)
Border style. See §7.29.10 of XSL.
Sourcepub fn set_border_line_width(
&mut self,
inner: Length,
spacing: Length,
outer: Length,
)
pub fn set_border_line_width( &mut self, inner: Length, spacing: Length, outer: Length, )
The style:border-line-width attribute specifies the widths of borders defined by the FO border properties (see 20.183) for borders where the value of these properties is double. The value of the style:border-line-width attribute is a list of three white space-separated lengths, as follows:
- The first value specifies the width of the inner line
- The second value specifies the distance between the two lines
- The third value specifies the width of the outer line
The style:border-line-width attribute is usable with the following elements: style:graphic-properties 17.21, style:header-footer-properties 17.5, style:page-layout-properties 17.2, style:paragraph-properties 17.6 and style:table-cell-properties 17.18.
Sourcepub fn set_border_line_width_bottom(
&mut self,
inner: Length,
spacing: Length,
outer: Length,
)
pub fn set_border_line_width_bottom( &mut self, inner: Length, spacing: Length, outer: Length, )
The style:border-line-width-bottom attribute specifies the widths of the bottom border for borders defined by the FO border properties (see 20.183) if the property for the bottom border has the value double. The value of the style:border-line-width-bottom attribute is a list of three white spaceseparated lengths, as follows:
- The first value specifies the width of the inner line
- The second value specifies the distance between the two lines
- The third value specifies the width of the outer line
The style:border-line-width attribute is usable with the following elements: style:graphic-properties 17.21, style:header-footer-properties 17.5, style:page-layout-properties 17.2, style:paragraph-properties 17.6 and style:table-cell-properties 17.18.
Sourcepub fn set_border_line_width_left(
&mut self,
inner: Length,
spacing: Length,
outer: Length,
)
pub fn set_border_line_width_left( &mut self, inner: Length, spacing: Length, outer: Length, )
The style:border-line-width-left attribute specifies the widths of the left border for borders defined by the FO border properties (see 20.183) if the property for the left border has the value double. The value of the style:border-line-width-left attribute is a list of three white spaceseparated lengths, as follows:
- The first value specifies the width of the inner line
- The second value specified the distance between the two lines
- The third value specifies the width of the outer line
The style:border-line-width attribute is usable with the following elements: style:graphic-properties 17.21, style:header-footer-properties 17.5, style:page-layout-properties 17.2, style:paragraph-properties 17.6 and style:table-cell-properties 17.18.
Sourcepub fn set_border_line_width_right(
&mut self,
inner: Length,
spacing: Length,
outer: Length,
)
pub fn set_border_line_width_right( &mut self, inner: Length, spacing: Length, outer: Length, )
The style:border-line-width-right attribute specifies the widths of the right border for borders defined by the FO border properties (see 20.183) if the property for the right border has the value double. The value of the style:border-line-width-right attribute is a list of three white spaceseparated lengths, as follows:
- The first value specifies the width of the inner line
- The second value specified the distance between the two lines
- The third value specifies the width of the outer line
The style:border-line-width attribute is usable with the following elements: style:graphic-properties 17.21, style:header-footer-properties 17.5, style:page-layout-properties 17.2, style:paragraph-properties 17.6 and style:table-cell-properties 17.18.
Sourcepub fn set_border_line_width_top(
&mut self,
inner: Length,
spacing: Length,
outer: Length,
)
pub fn set_border_line_width_top( &mut self, inner: Length, spacing: Length, outer: Length, )
The style:border-line-width-top attribute specifies the widths of the top border for borders defined by the FO border properties (see 20.183) if the property for the top border has the value double. The value of the style:border-line-width-top attribute is a list of three white spaceseparated lengths, as follows:
- The first value specifies the width of the inner line
- The second value specified the distance between the two lines
- The third value specifies the width of the outer line
The style:border-line-width attribute is usable with the following elements: style:graphic-properties 17.21, style:header-footer-properties 17.5, style:page-layout-properties 17.2, style:paragraph-properties 17.6 and style:table-cell-properties 17.18.
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_padding(&mut self, padding: Length)
pub fn set_padding(&mut self, padding: Length)
Padding for all sides. See §7.29.15 of XSL.
The fo:padding 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:tablecell-properties 17.18.
Sourcepub fn set_padding_bottom(&mut self, padding: Length)
pub fn set_padding_bottom(&mut self, padding: Length)
Padding. See §7.7.36 of XSL.
The fo:padding-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:tablecell-properties 17.18.
Sourcepub fn set_padding_left(&mut self, padding: Length)
pub fn set_padding_left(&mut self, padding: Length)
Padding. See §7.7.37 of XSL.
The fo:padding-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 and style:tablecell-properties 17.18.
Sourcepub fn set_padding_right(&mut self, padding: Length)
pub fn set_padding_right(&mut self, padding: Length)
Padding. See §7.7.38 of XSL.
The fo:padding-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 and style:tablecell-properties 17.18.
Sourcepub fn set_padding_top(&mut self, padding: Length)
pub fn set_padding_top(&mut self, padding: Length)
Padding. See §7.7.35 of XSL.
The fo:padding-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:tablecell-properties 17.18.
Sourcepub fn set_dynamic_spacing(&mut self, dynamic: bool)
pub fn set_dynamic_spacing(&mut self, dynamic: bool)
Dynamic spacing
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.
Trait Implementations§
Source§impl GetSize for PageStyle
impl GetSize for PageStyle
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