|
xlnt - community edition
|
Describes the formatting of a particular cell. More...
#include <format.hpp>
Public Member Functions | |
| class alignment | alignment () const |
| Returns a copy of the alignment of this format. If no alignment has been set (has_alignment() returns false), a default-constructed alignment will be returned. 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. Returns a wrapper pointing to this format. More... | |
| bool | has_alignment () const |
| Returns true if an alignment has been set for 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 a copy of the border of this format. If no border has been set (has_border() returns false), a default-constructed border will be returned. 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. Returns a wrapper pointing to this format. More... | |
| bool | has_border () const |
| Returns true if a border has been set for 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 a copy of the fill of this format. If no fill has been set (has_fill() returns false), a default-constructed fill will be returned. 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. Returns a wrapper pointing to this format. More... | |
| bool | has_fill () const |
| Returns true if a fill has been set for 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 a copy of the font of this format. If no font has been set (has_font() returns false), a default-constructed font will be returned. 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. Returns a wrapper pointing to this format. More... | |
| bool | has_font () const |
| Returns true if a font has been set for 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 a copy of the number format of this format. If no number format has been set (has_number_format() returns false), a default-constructed number format will be returned. 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. Returns a wrapper pointing to this format. More... | |
| bool | has_number_format () const |
| Returns true if a number format has been set for 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 a copy of the protection of this format. If no protection has been set (has_protection() returns false), a default-constructed protection will be returned. More... | |
| bool | has_protection () const |
| Returns true if protection has been set for 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. Returns a wrapper pointing to 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. Returns a wrapper pointing to this format. More... | |
| format & | style (const class style &new_style) |
| Sets the style of this format to new_style. Returns a wrapper pointing to this format. More... | |
| class style | style () |
| Returns a wrapper pointing to the style of this format. Assumes that the style exists (please call has_style() to check). If this format has no style, an invalid_attribute exception will be thrown. More... | |
| const class style | style () const |
| Returns a wrapper pointing to the style of this format. Assumes that the style exists (please call has_style() to check). If this format has no style, an invalid_attribute exception will be thrown. More... | |
Friends | |
| struct | detail::stylesheet |
| class | detail::xlsx_producer |
| class | detail::xlsx_consumer |
| class | cell |
| class | workbook |
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. Returns a wrapper pointing to this format.
| class alignment xlnt::format::alignment | ( | ) | const |
Returns a copy of the alignment of this format. If no alignment has been set (has_alignment() returns false), a default-constructed alignment will be returned.
| 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 a copy of the border of this format. If no border has been set (has_border() returns false), a default-constructed border will be returned.
| 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. Returns a wrapper pointing to 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 a copy of the fill of this format. If no fill has been set (has_fill() returns false), a default-constructed fill will be returned.
| 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. Returns a wrapper pointing to 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 a copy of the font of this format. If no font has been set (has_font() returns false), a default-constructed font will be returned.
| 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. Returns a wrapper pointing to 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_alignment | ( | ) | const |
Returns true if an alignment has been set for this format.
| bool xlnt::format::has_border | ( | ) | const |
Returns true if a border has been set for this format.
| bool xlnt::format::has_fill | ( | ) | const |
Returns true if a fill has been set for this format.
| bool xlnt::format::has_font | ( | ) | const |
Returns true if a font has been set for this format.
| bool xlnt::format::has_number_format | ( | ) | const |
Returns true if a number format has been set for this format.
| bool xlnt::format::has_protection | ( | ) | const |
Returns true if protection has been set for this 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 a copy of the number format of this format. If no number format has been set (has_number_format() returns false), a default-constructed number format will be returned.
| 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. Returns a wrapper pointing to 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 a copy of the protection of this format. If no protection has been set (has_protection() returns false), a default-constructed protection will be returned.
| 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. Returns a wrapper pointing to 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. Returns a wrapper pointing to this format.
Sets the style of this format to new_style. Returns a wrapper pointing to this format.
| class style xlnt::format::style | ( | ) |
Returns a wrapper pointing to the style of this format. Assumes that the style exists (please call has_style() to check). If this format has no style, an invalid_attribute exception will be thrown.
| const class style xlnt::format::style | ( | ) | const |
Returns a wrapper pointing to the style of this format. Assumes that the style exists (please call has_style() to check). If this format has no style, an invalid_attribute exception will be thrown.
1.8.13