|
OpenXLSX 1.9.1
|
An encapsulation of the XLSX borders. More...
#include <XLStyles.hpp>
Public Member Functions | |
| XLBorders () | |
| XLBorders (const XMLNode &node) | |
| Constructor. New items should only be created through an XLStyles object. | |
| XLBorders (const XLBorders &other) | |
| Copy Constructor. | |
| XLBorders (XLBorders &&other) | |
| Move Constructor. | |
| ~XLBorders () | |
| XLBorders & | operator= (const XLBorders &other) |
| Copy assignment operator. | |
| XLBorders & | operator= (XLBorders &&other) noexcept=default |
| Move assignment operator. | |
| size_t | count () const |
| Get the count of border descriptions. | |
| XLBorder | borderByIndex (XLStyleIndex index) const |
| Get the border description identified by index. | |
| XLBorder | operator[] (XLStyleIndex index) const |
| Operator overload: allow [] as shortcut access to borderByIndex. | |
| XLStyleIndex | create (XLBorder copyFrom=XLBorder{}, std::string_view styleEntriesPrefix=XLDefaultStyleEntriesPrefix) |
| Append a new XLBorder, based on copyFrom, and return its index in borders node. | |
| XLStyleIndex | findOrCreate (XLBorder copyFrom, std::string_view styleEntriesPrefix=XLDefaultStyleEntriesPrefix) |
| Find an existing border matching copyFrom's properties, or create a new one. | |
An encapsulation of the XLSX borders.
| XLBorders::XLBorders | ( | ) |
|
explicit |
Constructor. New items should only be created through an XLStyles object.
| node | An XMLNode object with the borders item. If no input is provided, a null node is used. |
| XLBorders::XLBorders | ( | const XLBorders & | other | ) |
Copy Constructor.
| other | Object to be copied. |
| XLBorders::XLBorders | ( | XLBorders && | other | ) |
Move Constructor.
| other | Object to be moved. |
| XLBorders::~XLBorders | ( | ) |
| XLBorder XLBorders::borderByIndex | ( | XLStyleIndex | index | ) | const |
Get the border description identified by index.
| index | The index within the XML sequence |
| size_t XLBorders::count | ( | ) | const |
Get the count of border descriptions.
| XLStyleIndex XLBorders::create | ( | XLBorder | copyFrom = XLBorder{}, |
| std::string_view | styleEntriesPrefix = XLDefaultStyleEntriesPrefix |
||
| ) |
Append a new XLBorder, based on copyFrom, and return its index in borders node.
| copyFrom | Can provide an XLBorder to use as template for the new style |
| styleEntriesPrefix | Prefix the newly created cell style XMLNode with this pugi::node_pcdata text |
| XLStyleIndex XLBorders::findOrCreate | ( | XLBorder | copyFrom, |
| std::string_view | styleEntriesPrefix = XLDefaultStyleEntriesPrefix |
||
| ) |
Find an existing border matching copyFrom's properties, or create a new one.
Uses a canonical XML fingerprint for O(1) cache lookups after the first call.
Copy assignment operator.
| other | Right hand side of assignment operation. |
Move assignment operator.
| other | Right hand side of assignment operation. |
|
inline |
Operator overload: allow [] as shortcut access to borderByIndex.
| index | The index within the XML sequence |