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.
|
| void | compactStyles () |
| | Compact and deduplicate all styles in the stylesheet.
|
| | 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.
|
| XLPackageServices & | package () |
| | Narrow package-services port (archive, managed XML parts, relationships, content types).
|
| const XLPackageServices & | package () const |
| XLPackagePartFactory & | partFactory () |
| | Narrow package-part factory port (chart / drawing / image / slicer / sheet accessories).
|
| const XLPackagePartFactory & | partFactory () const |
| const XLSharedStringTable & | sharedStringTable () const |
| | Read-only shared string table (SST) port.
|
| const XLSharedStrings & | sharedStrings () const |
| | Full workbook SST (including getOrCreate / append).
|
| 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.
|
| const XLXmlData * | xmlDataPart () const noexcept |
| | Access the underlying XLXmlData pointer.
|
| XLXmlData * | xmlDataPart () noexcept |
An encapsulation of the styles file (xl/styles.xml) in an Excel document package.
| void XLStyles::compactStyles |
( |
| ) |
|
Compact and deduplicate all styles in the stylesheet.
Merges identical cellXfs, cleans up unreferenced fonts, fills, and borders while strictly preserving ECMA-376 invariants (fills 0/1, font 0, border 0, cellXf 0).