An encapsulation of the styles file (xl/styles.xml) in an Excel document package.
More...
|
| | XLStyles () |
| |
| | XLStyles (gsl::not_null< XLXmlData * > xmlData, bool suppressWarnings=false, std::string_view stylesPrefix=XLDefaultStylesPrefix) |
| |
| | ~XLStyles () |
| | Destructor.
|
| |
| | XLStyles (XLStyles &&other) noexcept |
| | The move constructor.
|
| |
| | XLStyles (const XLStyles &other) |
| | The copy constructor.
|
| |
| XLStyles & | operator= (XLStyles &&other) noexcept |
| | move assignment
|
| |
| XLStyles & | operator= (const XLStyles &other) |
| | copy assignment
|
| |
| uint32_t | createNumberFormat (std::string_view formatCode) |
| | Create a new custom number format with a unique ID and format code.
|
| |
| XLNumberFormats & | numberFormats () const |
| | Get the number formats object.
|
| |
| XLFonts & | fonts () const |
| | Get the fonts object.
|
| |
| XLFills & | fills () const |
| | Get the fills object.
|
| |
| XLBorders & | borders () const |
| | Get the borders object.
|
| |
| XLCellFormats & | cellStyleFormats () const |
| | Get the cell style formats object.
|
| |
| XLCellFormats & | cellFormats () const |
| | Get the cell formats object.
|
| |
| XLCellStyles & | cellStyles () const |
| | Get the cell styles object.
|
| |
| XLDxfs & | dxfs () const |
| | Get the differential cell formats object (dxfs)
|
| |
| XLDxfs & | diffCellFormats () const |
| | Backward compatibility alias for dxfs()
|
| |
| XLStyleIndex | addDxf (const XLDxf &dxf) |
| | Add a differential cell format (DXF) to the styles and return its index.
|
| |
| XLStyleIndex | addNamedStyle (std::string_view name, std::optional< XLStyleIndex > fontId=std::nullopt, std::optional< XLStyleIndex > fillId=std::nullopt, std::optional< XLStyleIndex > borderId=std::nullopt, std::optional< XLStyleIndex > numFmtId=std::nullopt) |
| | Add a named style with the given properties and return the index to be used in cells.
|
| |
| XLStyleIndex | namedStyle (std::string_view name) const |
| | Look up a named style by name and return its index for cell formatting.
|
| |
| XLStyleIndex | findOrCreateStyle (const XLStyle &style) |
| | Apply an XLStyle descriptor, deduplicating every sub-pool entry (font, fill, border, numFmt, cellXf) and returning the cellXfs index.
|
| |
| | XLXmlFile ()=default |
| | Default constructor.
|
| |
| std::string | xmlData (XLXmlSavingDeclaration savingDeclaration=XLXmlSavingDeclaration{}) const |
| | Method for getting the XML data represented by the object.
|
| |
| | XLXmlFile (XLXmlData *xmlData) |
| | Constructor. Creates an object based on the xmlData input.
|
| |
| | XLXmlFile (const XLXmlFile &other)=default |
| | Copy constructor. Default implementation used.
|
| |
| | XLXmlFile (XLXmlFile &&other) noexcept=default |
| | Move constructor. Default implementation used.
|
| |
| | ~XLXmlFile ()=default |
| | Destructor. Default implementation used.
|
| |
| bool | valid () const |
| | check whether class is linked to a valid XML file
|
| |
| XLXmlFile & | operator= (const XLXmlFile &other)=default |
| | The copy assignment operator. The default implementation has been used.
|
| |
| XLXmlFile & | operator= (XLXmlFile &&other) noexcept=default |
| | The move assignment operator. The default implementation has been used.
|
| |
| XLDocument & | parentDoc () |
| | This function provides access to the parent XLDocument object.
|
| |
| const XLDocument & | parentDoc () const |
| | This function provides access to the parent XLDocument object.
|
| |
| XMLDocument & | xmlDocument () |
| | This function provides access to the underlying XMLDocument object.
|
| |
| const XMLDocument & | xmlDocument () const |
| | This function provides access to the underlying XMLDocument object.
|
| |
| std::string | getXmlPath () const |
| | Retrieve the path of the XML data in the .xlsx zip archive via m_xmlData->getXmlPath.
|
| |
An encapsulation of the styles file (xl/styles.xml) in an Excel document package.
Apply an XLStyle descriptor, deduplicating every sub-pool entry (font, fill, border, numFmt, cellXf) and returning the cellXfs index.
This is the primary high-level entry point for bulk formatting: call it once per distinct visual style; pass the returned index to every cell that should share that style. Repeated calls with an identical descriptor return the same index in O(1) time.
- Parameters
-
| style | A fully populated XLStyle descriptor. |
- Returns
- The XLStyleIndex (in cellXfs) suitable for the cell's 's' attribute.