|
OpenXLSX 1.9.1
|
An encapsulation of the XLSX cell style formats. More...
#include <XLStyles.hpp>
Public Member Functions | |
| XLCellFormats () | |
| XLCellFormats (const XMLNode &node, bool permitXfId=false) | |
| Constructor. New items should only be created through an XLStyles object. | |
| XLCellFormats (const XLCellFormats &other) | |
| Copy Constructor. | |
| XLCellFormats (XLCellFormats &&other) | |
| Move Constructor. | |
| ~XLCellFormats () | |
| XLCellFormats & | operator= (const XLCellFormats &other) |
| Copy assignment operator. | |
| XLCellFormats & | operator= (XLCellFormats &&other) noexcept=default |
| Move assignment operator. | |
| size_t | count () const |
| Get the count of cell style format descriptions. | |
| XLCellFormat | cellFormatByIndex (XLStyleIndex index) const |
| Get the cell style format description identified by index. | |
| XLCellFormat | operator[] (XLStyleIndex index) const |
| Operator overload: allow [] as shortcut access to cellFormatByIndex. | |
| XLStyleIndex | create (XLCellFormat copyFrom=XLCellFormat{}, std::string_view styleEntriesPrefix=XLDefaultStyleEntriesPrefix) |
| Append a new XLCellFormat, based on copyFrom, and return its index in cellXfs (for XLStyles::cellFormats) or cellStyleXfs (for XLStyles::cellStyleFormats) | |
| XLStyleIndex | findOrCreate (XLCellFormat copyFrom, std::string_view styleEntriesPrefix=XLDefaultStyleEntriesPrefix) |
| Find an existing cell format matching copyFrom's properties, or create a new one. | |
An encapsulation of the XLSX cell style formats.
| XLCellFormats::XLCellFormats | ( | ) |
|
explicit |
Constructor. New items should only be created through an XLStyles object.
| node | An XMLNode object with the cell formats (cellXfs or cellStyleXfs) item. If no input is provided, a null node is used. |
| permitXfId | Pass-through to XLCellFormat constructor: true (XLPermitXfID) -> setter setXfId is enabled, otherwise throws |
| XLCellFormats::XLCellFormats | ( | const XLCellFormats & | other | ) |
Copy Constructor.
| other | Object to be copied. |
| XLCellFormats::XLCellFormats | ( | XLCellFormats && | other | ) |
Move Constructor.
| other | Object to be moved. |
| XLCellFormats::~XLCellFormats | ( | ) |
| XLCellFormat XLCellFormats::cellFormatByIndex | ( | XLStyleIndex | index | ) | const |
Get the cell style format description identified by index.
| index | The index within the XML sequence |
| size_t XLCellFormats::count | ( | ) | const |
Get the count of cell style format descriptions.
| XLStyleIndex XLCellFormats::create | ( | XLCellFormat | copyFrom = XLCellFormat{}, |
| std::string_view | styleEntriesPrefix = XLDefaultStyleEntriesPrefix |
||
| ) |
Append a new XLCellFormat, based on copyFrom, and return its index in cellXfs (for XLStyles::cellFormats) or cellStyleXfs (for XLStyles::cellStyleFormats)
| copyFrom | Can provide an XLCellFormat to use as template for the new style |
| styleEntriesPrefix | Prefix the newly created cell style XMLNode with this pugi::node_pcdata text |
| XLStyleIndex XLCellFormats::findOrCreate | ( | XLCellFormat | copyFrom, |
| std::string_view | styleEntriesPrefix = XLDefaultStyleEntriesPrefix |
||
| ) |
Find an existing cell format matching copyFrom's properties, or create a new one.
Uses a canonical XML fingerprint for O(1) cache lookups after the first call. This is the key deduplication point for bulk formatting operations.
| XLCellFormats & XLCellFormats::operator= | ( | const XLCellFormats & | other | ) |
Copy assignment operator.
| other | Right hand side of assignment operation. |
|
defaultnoexcept |
Move assignment operator.
| other | Right hand side of assignment operation. |
|
inline |
Operator overload: allow [] as shortcut access to cellFormatByIndex.
| index | The index within the XML sequence |