xlnt
|
Describes the formatting of a particular cell. More...
#include <format.hpp>
Public Member Functions | |
class alignment | alignment () const |
Returns the alignment of this format. More... | |
format | alignment (const xlnt::alignment &new_alignment, xlnt::optional< bool > applied={}) |
Sets the alignment of this format to new_alignment. Applied, which defaults to true, determines whether the alignment should be enabled for cells using this format. More... | |
bool | alignment_applied () const |
Returns true if the alignment of this format should be applied to cells using it. More... | |
class border | border () const |
Returns the border of this format. More... | |
format | border (const xlnt::border &new_border, xlnt::optional< bool > applied={}) |
Sets the border of this format to new_border. Applied, which defaults to true, determines whether the border should be enabled for cells using this format. More... | |
bool | border_applied () const |
Returns true if the border set for this format should be applied to cells using the format. More... | |
class fill | fill () const |
Returns the fill of this format. More... | |
format | fill (const xlnt::fill &new_fill, xlnt::optional< bool > applied={}) |
Sets the fill of this format to new_fill. Applied, which defaults to true, determines whether the border should be enabled for cells using this format. More... | |
bool | fill_applied () const |
Returns true if the fill set for this format should be applied to cells using the format. More... | |
class font | font () const |
Returns the font of this format. More... | |
format | font (const xlnt::font &new_font, xlnt::optional< bool > applied={}) |
Sets the font of this format to new_font. Applied, which defaults to true, determines whether the font should be enabled for cells using this format. More... | |
bool | font_applied () const |
Returns true if the font set for this format should be applied to cells using the format. More... | |
class number_format | number_format () const |
Returns the number format of this format. More... | |
format | number_format (const xlnt::number_format &new_number_format, xlnt::optional< bool > applied={}) |
Sets the number format of this format to new_number_format. Applied, which defaults to true, determines whether the number format should be enabled for cells using this format. More... | |
bool | number_format_applied () const |
Returns true if the number_format set for this format should be applied to cells using the format. More... | |
class protection | protection () const |
Returns the protection of this format. More... | |
bool | protection_applied () const |
Returns true if the protection set for this format should be applied to cells using the format. More... | |
format | protection (const xlnt::protection &new_protection, xlnt::optional< bool > applied={}) |
Sets the protection of this format to new_protection. Applied, which defaults to true, determines whether the protection should be enabled for cells using this format. More... | |
bool | pivot_button () const |
Returns true if the pivot table interface is enabled for this format. More... | |
void | pivot_button (bool show) |
If show is true, a pivot table interface will be displayed for cells using this format. More... | |
bool | quote_prefix () const |
Returns true if this format should add a single-quote prefix for all text values. More... | |
void | quote_prefix (bool quote) |
If quote is true, enables a single-quote prefix for all text values in cells using this format (e.g. "abc" will appear as "'abc"). The text will also not be stored in sharedStrings when this is enabled. More... | |
bool | has_style () const |
Returns true if this format has a corresponding style applied. More... | |
void | clear_style () |
Removes the style from this format if it exists. More... | |
format | style (const std::string &name) |
Sets the style of this format to a style with the given name. More... | |
format | style (const class style &new_style) |
Sets the style of this format to new_style. More... | |
class style | style () |
Returns the style of this format. If it has no style, an invalid_parameter exception will be thrown. More... | |
const class style | style () const |
Returns the style of this format. If it has no style, an invalid_parameters exception will be thrown. More... | |
Friends | |
struct | detail::stylesheet |
class | detail::xlsx_producer |
class | detail::xlsx_consumer |
class | cell |
Describes the formatting of a particular cell.
format xlnt::format::alignment | ( | const xlnt::alignment & | new_alignment, |
xlnt::optional< bool > | applied = {} |
||
) |
Sets the alignment of this format to new_alignment. Applied, which defaults to true, determines whether the alignment should be enabled for cells using this format.
class alignment xlnt::format::alignment | ( | ) | const |
Returns the alignment of this format.
bool xlnt::format::alignment_applied | ( | ) | const |
Returns true if the alignment of this format should be applied to cells using it.
class border xlnt::format::border | ( | ) | const |
Returns the border of this format.
format xlnt::format::border | ( | const xlnt::border & | new_border, |
xlnt::optional< bool > | applied = {} |
||
) |
Sets the border of this format to new_border. Applied, which defaults to true, determines whether the border should be enabled for cells using this format.
bool xlnt::format::border_applied | ( | ) | const |
Returns true if the border set for this format should be applied to cells using the format.
void xlnt::format::clear_style | ( | ) |
Removes the style from this format if it exists.
class fill xlnt::format::fill | ( | ) | const |
Returns the fill of this format.
format xlnt::format::fill | ( | const xlnt::fill & | new_fill, |
xlnt::optional< bool > | applied = {} |
||
) |
Sets the fill of this format to new_fill. Applied, which defaults to true, determines whether the border should be enabled for cells using this format.
bool xlnt::format::fill_applied | ( | ) | const |
Returns true if the fill set for this format should be applied to cells using the format.
class font xlnt::format::font | ( | ) | const |
Returns the font of this format.
format xlnt::format::font | ( | const xlnt::font & | new_font, |
xlnt::optional< bool > | applied = {} |
||
) |
Sets the font of this format to new_font. Applied, which defaults to true, determines whether the font should be enabled for cells using this format.
bool xlnt::format::font_applied | ( | ) | const |
Returns true if the font set for this format should be applied to cells using the format.
bool xlnt::format::has_style | ( | ) | const |
Returns true if this format has a corresponding style applied.
class number_format xlnt::format::number_format | ( | ) | const |
Returns the number format of this format.
format xlnt::format::number_format | ( | const xlnt::number_format & | new_number_format, |
xlnt::optional< bool > | applied = {} |
||
) |
Sets the number format of this format to new_number_format. Applied, which defaults to true, determines whether the number format should be enabled for cells using this format.
bool xlnt::format::number_format_applied | ( | ) | const |
Returns true if the number_format set for this format should be applied to cells using the format.
bool xlnt::format::pivot_button | ( | ) | const |
Returns true if the pivot table interface is enabled for this format.
void xlnt::format::pivot_button | ( | bool | show | ) |
If show is true, a pivot table interface will be displayed for cells using this format.
class protection xlnt::format::protection | ( | ) | const |
Returns the protection of this format.
format xlnt::format::protection | ( | const xlnt::protection & | new_protection, |
xlnt::optional< bool > | applied = {} |
||
) |
Sets the protection of this format to new_protection. Applied, which defaults to true, determines whether the protection should be enabled for cells using this format.
bool xlnt::format::protection_applied | ( | ) | const |
Returns true if the protection set for this format should be applied to cells using the format.
bool xlnt::format::quote_prefix | ( | ) | const |
Returns true if this format should add a single-quote prefix for all text values.
void xlnt::format::quote_prefix | ( | bool | quote | ) |
If quote is true, enables a single-quote prefix for all text values in cells using this format (e.g. "abc" will appear as "'abc"). The text will also not be stored in sharedStrings when this is enabled.
format xlnt::format::style | ( | const std::string & | name | ) |
Sets the style of this format to a style with the given name.
Sets the style of this format to new_style.
const class style xlnt::format::style | ( | ) | const |
Returns the style of this format. If it has no style, an invalid_parameters exception will be thrown.
class style xlnt::format::style | ( | ) |
Returns the style of this format. If it has no style, an invalid_parameter exception will be thrown.