An encapsulation of the XLSX fonts.
More...
#include <XLStyles_Fonts.hpp>
An encapsulation of the XLSX fonts.
◆ XLFonts() [1/4]
◆ XLFonts() [2/4]
| XLFonts::XLFonts |
( |
const XMLNode & | node | ) |
|
|
explicit |
Constructor. New items should only be created through an XLStyles object.
- Parameters
-
| node | An XMLNode object with the styles item. If no input is provided, a null node is used. |
◆ XLFonts() [3/4]
| XLFonts::XLFonts |
( |
const XLFonts & | other | ) |
|
Copy Constructor.
- Parameters
-
| other | Object to be copied. |
◆ XLFonts() [4/4]
| XLFonts::XLFonts |
( |
XLFonts && | other | ) |
|
Move Constructor.
- Parameters
-
◆ ~XLFonts()
◆ count()
| size_t XLFonts::count |
( |
| ) |
const |
Get the count of fonts.
- Returns
- The amount of font entries
◆ create()
Append a new XLFont, based on copyFrom, and return its index in fonts node.
- Parameters
-
| copyFrom | Can provide an XLFont to use as template for the new style |
| styleEntriesPrefix | Prefix the newly created cell style XMLNode with this pugi::node_pcdata text |
- Returns
- The index of the new style as used by operator[]
◆ findOrCreate()
Find an existing font matching copyFrom's properties, or create a new one.
Uses a canonical XML fingerprint for O(1) cache lookups after the first call. Prevents duplicate font entries when the same style is applied to many cells.
- Parameters
-
| copyFrom | The font descriptor to match or create. |
| styleEntriesPrefix | XML indentation prefix for newly created nodes. |
- Returns
- The index of the matching or newly created font.
◆ fontByIndex()
Get the font identified by index.
- Parameters
-
| index | The index within the XML sequence |
- Returns
- An XLFont object
◆ operator=() [1/2]
Copy assignment operator.
- Parameters
-
| other | Right hand side of assignment operation. |
- Returns
- A reference to the lhs object.
◆ operator=() [2/2]
Move assignment operator.
- Parameters
-
| other | Right hand side of assignment operation. |
- Returns
- A reference to lhs object.
◆ operator[]()
Operator overload: allow [] as shortcut access to fontByIndex.
- Parameters
-
| index | The index within the XML sequence |
- Returns
- An XLFont object
The documentation for this class was generated from the following files: