Struct spreadsheet_ods::format::PartScientificBuilder
source · pub struct PartScientificBuilder<'vf, T: ValueFormatTrait> { /* private fields */ }Expand description
Builder for FormatPart with type ScientificNumber.
The number:scientific-number element specifies the display formatting properties for a number style that should be displayed in scientific format.
The number:scientific-number element is usable within the following element:
- number:number-style 16.27.2.
The number:scientific-number element has the following attributes:
- number:decimal-places 19.343.4,
- number:grouping 19.348,
- number:min-exponentdigits 19.351 and
- number:min-integer-digits 19.352.
The number:scientific-number element has no child elements.
Implementations§
source§impl<'vf, T: ValueFormatTrait> PartScientificBuilder<'vf, T>
impl<'vf, T: ValueFormatTrait> PartScientificBuilder<'vf, T>
sourcepub fn if_then<F>(self, test: bool, build: F) -> Selfwhere
F: Fn(Self) -> Self,
pub fn if_then<F>(self, test: bool, build: F) -> Selfwhere
F: Fn(Self) -> Self,
Only applies the builder if the test is true.
sourcepub fn decimal_places(self, v: u8) -> Self
pub fn decimal_places(self, v: u8) -> Self
If the number:decimal-places attribute is not specified, the number of decimal places specified by the default table cell style is used.
sourcepub fn expontent_interval(self, v: u8) -> Self
pub fn expontent_interval(self, v: u8) -> Self
The number:exponent-interval attribute determines the valid exponents to be used: the valid exponents are the integer multiples of the value of the number:exponent-interval attribute. The default value for this attribute is 1.
sourcepub fn forced_exponent_sign(self, v: bool) -> Self
pub fn forced_exponent_sign(self, v: bool) -> Self
The number:forced-exponent-sign attribute specifies whether the sign of the exponent for a scientific number is always displayed. The defined values for the number:forced-exponent-sign attribute are:
- false: the exponent sign is displayed only for a negative value of the exponent, otherwise it is not displayed.
- true: the exponent sign is always displayed regardless of the value of exponent. The default value for this attribute is true.
sourcepub fn grouping(self) -> Self
pub fn grouping(self) -> Self
The number:grouping attribute specifies whether the integer digits of a number should be grouped using a separator character. The grouping character that is used and the number of digits that are grouped together depends on the language and country of the style. The defined values for the number:grouping attribute are:
- false: integer digits of a number are not grouped using a separator character.
- true: integer digits of a number should be grouped by a separator character. The default value for this attribute is false.
sourcepub fn min_decimal_places(self, v: u8) -> Self
pub fn min_decimal_places(self, v: u8) -> Self
The number:min-decimal-places attribute specifies the minimum number of digits in the decimal part. The value of the number:min-decimal-places attribute shall not be greater than the value of the number:decimal-places 19.343 attribute. If the value of number:min-decimal-places is less than the value of number:decimalplaces, trailing zero digits in decimal places following the position indicated by the value of number:min-decimal-places shall not be displayed.
sourcepub fn min_exponent_digits(self, v: u8) -> Self
pub fn min_exponent_digits(self, v: u8) -> Self
The number:min-exponent-digits attribute specifies the minimum number of digits to use to display an exponent.
sourcepub fn min_integer_digits(self, v: u8) -> Self
pub fn min_integer_digits(self, v: u8) -> Self
The number:min-integer-digits attribute specifies the minimum number of integer digits to display in the integer portion of a number, a scientific number, or a fraction. For a number:fraction element, if the number:min-integer-digits attribute is not present, no integer portion is displayed.