OpenXLSX 1.10.0
Loading...
Searching...
No Matches
XLStyles.hpp
Go to the documentation of this file.
1#ifndef OPENXLSX_XLSTYLES_HPP
2#define OPENXLSX_XLSTYLES_HPP
3
4#ifdef _MSC_VER // conditionally enable MSVC specific pragmas to avoid other compilers warning about unknown pragmas
5# pragma warning(push)
6# pragma warning(disable : 4251)
7# pragma warning(disable : 4275)
8#endif // _MSC_VER
9
10// ===== External Includes ===== //
11#include <cstdint> // uint32_t etc
12#include <optional>
13#include <string>
14#include <string_view> // std::string_view
15#include <unordered_map>
16#include <vector>
17
18// ===== OpenXLSX Includes ===== //
19#include "OpenXLSX-Exports.hpp"
20#include "XLColor.hpp"
21#include "XLXmlFile.hpp"
22#include "XLXmlParser.hpp"
23
24namespace OpenXLSX
25{
26 using namespace std::literals::string_view_literals; // enables sv suffix only
27
28 // Forward declaration to avoid circular includes (XLStyle.hpp uses enums from this header)
29 struct XLStyle;
30
31 using XLStyleIndex = size_t; // custom data type for XLStyleIndex
32
33 constexpr const uint32_t XLInvalidUInt16 = 0xffff; // used to signal "value not defined" for uint16_t return types
34 constexpr const uint32_t XLInvalidUInt32 = 0xffffffff; // used to signal "value not defined" for uint32_t return types
35 constexpr const uint32_t XLDeleteProperty = XLInvalidUInt32; // when 0 or "" is not the same as "property does not exist", this value
36 // // can be passed to setter functions to delete the property from XML
37 // // currently supported in: XLDataBarColor::setTheme
38
39 constexpr const bool XLPermitXfID = true; // use with XLCellFormat constructor to enable xfId() getter and setXfId() setter
40
41 constexpr const bool XLCreateIfMissing = true; // use with XLCellFormat::alignment(XLCreateIfMissing)
42 constexpr const bool XLDoNotCreate = false; // use with XLCellFormat::alignment(XLDoNotCreate)
43
44 constexpr const bool XLForceFillType = true;
45
46 constexpr const char* XLDefaultStylesPrefix = "\n\t"; // indentation to use for newly created root level style node tags
47 constexpr const char* XLDefaultStyleEntriesPrefix = "\n\t\t"; // indentation to use for newly created style entry nodes
48
49 constexpr const XLStyleIndex XLDefaultCellFormat = 0; // default cell format index in xl/styles.xml:<styleSheet>:<cellXfs>
50
51 // ===== As pugixml attributes are not guaranteed to support value range of XLStyleIndex, use 32 bit unsigned int
52 constexpr const XLStyleIndex XLInvalidStyleIndex = XLInvalidUInt32; // as a function return value, indicates no valid index
53
54 constexpr const uint32_t XLDefaultFontSize = 12; //
55 constexpr const char* XLDefaultFontColor = "ff000000"; // default font color
56 constexpr const char* XLDefaultFontColorTheme = ""; // Theme color ID from theme1.xml (e.g., "1" for dark1)
57 constexpr const char* XLDefaultFontName = "Arial"; //
58 constexpr const uint32_t XLDefaultFontFamily = 0; // Font Family (0 = N/A, 1 = Roman, 2 = Swiss, 3 = Modern)
59 constexpr const uint32_t XLDefaultFontCharset = 1; // Character set (0 = ANSI, 1 = Default, 2 = Symbol)
60
61 constexpr const char* XLDefaultLineStyle = ""; // empty string = line not set
62
63 // forward declarations of all classes in this header
64 class XLNumberFormat;
65 class XLNumberFormats;
66 class XLFont;
67 class XLFonts;
68 class XLFill;
69 class XLFills;
70 class XLLine;
71 class XLBorder;
72 class XLBorders;
73 class XLAlignment;
74 class XLCellFormat;
75 class XLCellFormats;
76 class XLCellStyle;
77 class XLCellStyles;
78 class XLStyles;
79
88
89 enum XLFontSchemeStyle : uint8_t {
90 XLFontSchemeNone = 0, // <scheme val="none"/>
91 XLFontSchemeMajor = 1, // <scheme val="major"/>
92 XLFontSchemeMinor = 2, // <scheme val="minor"/>
93 XLFontSchemeInvalid = 255 // all other values
94 };
95
96 enum XLVerticalAlignRunStyle : uint8_t {
97 XLBaseline = 0, // <vertAlign val="baseline"/>
98 XLSubscript = 1, // <vertAlign val="subscript"/>
99 XLSuperscript = 2, // <vertAlign val="superscript"/>
101 };
102
103 enum XLFillType : uint8_t {
104 XLGradientFill = 0, // <gradientFill />
105 XLPatternFill = 1, // <patternFill />
106 XLFillTypeInvalid = 255, // any child of <fill> that is not one of the above
107 };
108
110
111 enum XLPatternType : uint8_t {
112 XLPatternNone = 0, // "none"
113 XLPatternSolid = 1, // "solid"
114 XLPatternMediumGray = 2, // "mediumGray"
115 XLPatternDarkGray = 3, // "darkGray"
116 XLPatternLightGray = 4, // "lightGray"
117 XLPatternDarkHorizontal = 5, // "darkHorizontal"
118 XLPatternDarkVertical = 6, // "darkVertical"
119 XLPatternDarkDown = 7, // "darkDown"
120 XLPatternDarkUp = 8, // "darkUp"
121 XLPatternDarkGrid = 9, // "darkGrid"
122 XLPatternDarkTrellis = 10, // "darkTrellis"
123 XLPatternLightHorizontal = 11, // "lightHorizontal"
124 XLPatternLightVertical = 12, // "lightVertical"
125 XLPatternLightDown = 13, // "lightDown"
126 XLPatternLightUp = 14, // "lightUp"
127 XLPatternLightGrid = 15, // "lightGrid"
128 XLPatternLightTrellis = 16, // "lightTrellis"
129 XLPatternGray125 = 17, // "gray125"
130 XLPatternGray0625 = 18, // "gray0625"
131 XLPatternTypeInvalid = 255 // any patternType that is not one of the above
132 };
133 constexpr const XLFillType XLDefaultFillType = XLPatternFill; // node name for the pattern description is derived from this
134 constexpr const XLPatternType XLDefaultPatternType = XLPatternNone; // attribute patternType default value: no fill
135 constexpr const char* XLDefaultPatternFgColor = "ffffffff"; // child node fgcolor attribute rgb value
136 constexpr const char* XLDefaultPatternBgColor = "ff000000"; // child node bgcolor attribute rgb value
137
148
166
167 enum XLAlignmentStyle : uint8_t {
168 XLAlignGeneral = 0, // value="general", horizontal only
169 XLAlignLeft = 1, // value="left", horizontal only
170 XLAlignRight = 2, // value="right", horizontal only
171 XLAlignCenter = 3, // value="center", both
172 XLAlignTop = 4, // value="top", vertical only
173 XLAlignBottom = 5, // value="bottom", vertical only
174 XLAlignFill = 6, // value="fill", horizontal only
175 XLAlignJustify = 7, // value="justify", both
176 XLAlignCenterContinuous = 8, // value="centerContinuous", horizontal only
177 XLAlignDistributed = 9, // value="distributed", both
178 XLAlignInvalid = 255 // all other values
179 };
180
182
183 // XLNumberFormats Class
184
188 class OPENXLSX_EXPORT XLNumberFormat
189 {
190 friend class XLNumberFormats; // for access to m_numberFormatNode in XLNumberFormats::create
191 public: // ---------- Public Member Functions ---------- //
196
201 explicit XLNumberFormat(const XMLNode& node);
202
207 XLNumberFormat(const XLNumberFormat& other);
208
213 XLNumberFormat(XLNumberFormat&& other) noexcept = default;
214
219
225 XLNumberFormat& operator=(const XLNumberFormat& other);
226
232 XLNumberFormat& operator=(XLNumberFormat&& other) noexcept = default;
233
238 uint32_t numberFormatId() const;
239
244 std::string formatCode() const;
245
251 bool setNumberFormatId(uint32_t newNumberFormatId);
252 bool setFormatCode(std::string_view newFormatCode);
253
258 std::string summary() const;
259
260 private: // ---------- Private Member Variables ---------- //
261 std::unique_ptr<XMLNode> m_numberFormatNode;
262 };
263
267 class OPENXLSX_EXPORT XLNumberFormats
268 {
269 public: // ---------- Public Member Functions ---------- //
274
279 explicit XLNumberFormats(const XMLNode& node);
280
285 XLNumberFormats(const XLNumberFormats& other);
286
292
297
303 XLNumberFormats& operator=(const XLNumberFormats& other);
304
310 XLNumberFormats& operator=(XLNumberFormats&& other) noexcept = default;
311
316 size_t count() const;
317
324 XLNumberFormat numberFormatByIndex(XLStyleIndex index) const;
325
329 XLNumberFormat operator[](XLStyleIndex index) const { return numberFormatByIndex(index); }
330
337 XLNumberFormat numberFormatById(uint32_t numberFormatId) const;
338
345 uint32_t numberFormatIdFromIndex(XLStyleIndex index) const;
346
352 uint32_t createNumberFormat(std::string_view formatCode);
353
358 uint32_t getFreeNumberFormatId() const;
359
366 XLStyleIndex create(XLNumberFormat copyFrom = XLNumberFormat{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
367
368 private: // ---------- Private Member Variables ---------- //
369 std::unique_ptr<XMLNode> m_numberFormatsNode;
370 std::vector<XLNumberFormat> m_numberFormats;
371 };
372
373 // XLFonts Class
374
378 class OPENXLSX_EXPORT XLFont
379 {
380 friend class XLFonts; // for access to m_fontNode in XLFonts::create
381 friend class XLStyles;
382 public: // ---------- Public Member Functions ---------- //
386 XLFont();
387
392 explicit XLFont(const XMLNode& node);
393
398 XLFont(const XLFont& other);
399
404 XLFont(XLFont&& other) noexcept = default;
405
410
416 XLFont& operator=(const XLFont& other);
417
423 XLFont& operator=(XLFont&& other) noexcept = default;
424
429 std::string fontName() const;
430
435 size_t fontCharset() const;
436
441 size_t fontFamily() const;
442
447 size_t fontSize() const;
448
453 XLColor fontColor() const;
454
459 bool bold() const;
460
465 bool italic() const;
466
471 bool strikethrough() const;
472
477 XLUnderlineStyle underline() const;
478
483 XLFontSchemeStyle scheme() const;
484
489 XLVerticalAlignRunStyle vertAlign() const;
490
495 bool outline() const;
496
501 bool shadow() const;
502
507 bool condense() const;
508
513 bool extend() const;
514
520 XLFont& setFontName(std::string_view newName);
521 XLFont& setFontCharset(size_t newCharset);
522 XLFont& setFontFamily(size_t newFamily);
523 XLFont& setFontSize(size_t newSize);
524 XLFont& setFontColor(XLColor newColor);
525 XLFont& setBold(bool set = true);
526 XLFont& setItalic(bool set = true);
527 XLFont& setStrikethrough(bool set = true);
528 XLFont& setUnderline(XLUnderlineStyle style = XLUnderlineSingle);
529 XLFont& setScheme(XLFontSchemeStyle newScheme);
530 XLFont& setVertAlign(XLVerticalAlignRunStyle newVertAlign);
531 XLFont& setOutline(bool set = true);
532 XLFont& setShadow(bool set = true);
533 XLFont& setCondense(bool set = true);
534 XLFont& setExtend(bool set = true);
535
540 std::string summary() const;
541
542 private: // ---------- Private Member Variables ---------- //
543 std::unique_ptr<XMLNode> m_fontNode;
544 };
545
549 class OPENXLSX_EXPORT XLFonts
550 {
551 public: // ---------- Public Member Functions ---------- //
555 XLFonts();
556
561 explicit XLFonts(const XMLNode& node);
562
567 XLFonts(const XLFonts& other);
568
573 XLFonts(XLFonts&& other);
574
578 ~XLFonts();
579
585 XLFonts& operator=(const XLFonts& other);
586
592 XLFonts& operator=(XLFonts&& other) noexcept = default;
593
598 size_t count() const;
599
605 XLFont fontByIndex(XLStyleIndex index) const;
606
612 XLFont operator[](XLStyleIndex index) const { return fontByIndex(index); }
613
620 XLStyleIndex create(XLFont copyFrom = XLFont{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
621
630 XLStyleIndex findOrCreate(XLFont copyFrom, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
631
632 private: // ---------- Private Member Variables ---------- //
633 std::unique_ptr<XMLNode> m_fontsNode;
634 std::vector<XLFont> m_fonts;
635 mutable std::unordered_map<std::string, XLStyleIndex> m_fingerprintCache;
636 };
637
638 // XLDataBarColor Class
639
643 class OPENXLSX_EXPORT XLDataBarColor
644 {
645 public:
650
655 explicit XLDataBarColor(const XMLNode& node);
656
661 XLDataBarColor(const XLDataBarColor& other);
662
667 XLDataBarColor(XLDataBarColor&& other) noexcept = default;
668
672 ~XLDataBarColor() = default;
673
679 XLDataBarColor& operator=(const XLDataBarColor& other);
680
686 XLDataBarColor& operator=(XLDataBarColor&& other) noexcept = default;
687
692 XLColor rgb() const;
693
698 double tint() const;
699
703 bool automatic() const; // <color auto="true" />
704 uint32_t indexed() const; // <color indexed="1" />
705 uint32_t theme() const; // <color theme="1" />
706
712 bool setRgb(XLColor newColor);
713 bool set(XLColor newColor) { return setRgb(newColor); } // alias for setRgb
714 bool setTint(double newTint);
715 bool setAutomatic(bool set = true);
716 bool setIndexed(uint32_t newIndex);
717 bool setTheme(uint32_t newTheme);
718
723 std::string summary() const;
724
725 private: // ---------- Private Member Variables ---------- //
726 std::unique_ptr<XMLNode> m_colorNode;
727 };
728
729 // XLFills Class
730
734 class OPENXLSX_EXPORT XLGradientStop
735 {
736 friend class XLGradientStops; // for access to m_stopNode in XLGradientStops::create
737 public: // ---------- Public Member Functions ----------- //
742
747 explicit XLGradientStop(const XMLNode& node);
748
753 XLGradientStop(const XLGradientStop& other);
754
759 XLGradientStop(XLGradientStop&& other) noexcept = default;
760
764 ~XLGradientStop() = default;
765
771 XLGradientStop& operator=(const XLGradientStop& other);
772
778 XLGradientStop& operator=(XLGradientStop&& other) noexcept = default;
779
784 XLDataBarColor color() const; // <stop><color /></stop>
785 double position() const; // <stop position="1.2" />
786
793 bool setPosition(double newPosition);
794
799 std::string summary() const;
800
801 private: // ---------- Private Member Variables ---------- //
802 std::unique_ptr<XMLNode> m_stopNode;
803 };
804
808 class OPENXLSX_EXPORT XLGradientStops
809 {
810 public: // ---------- Public Member Functions ---------- //
815
820 explicit XLGradientStops(const XMLNode& node);
821
826 XLGradientStops(const XLGradientStops& other);
827
833
838
844 XLGradientStops& operator=(const XLGradientStops& other);
845
851 XLGradientStops& operator=(XLGradientStops&& other) noexcept = default;
852
857 size_t count() const;
858
864 XLGradientStop stopByIndex(XLStyleIndex index) const;
865
871 XLGradientStop operator[](XLStyleIndex index) const { return stopByIndex(index); }
872
879 XLStyleIndex create(XLGradientStop copyFrom = XLGradientStop{}, std::string_view styleEntriesPrefix = "");
880
881 std::string summary() const;
882
883 private:
884 std::unique_ptr<XMLNode> m_gradientNode;
885 std::vector<XLGradientStop> m_gradientStops;
886 };
887
891 class OPENXLSX_EXPORT XLFill
892 {
893 friend class XLFills; // for access to m_fillNode in XLFills::create
894 friend class XLStyles;
895 public: // ---------- Public Member Functions ---------- //
899 XLFill();
900
905 explicit XLFill(const XMLNode& node);
906
911 XLFill(const XLFill& other);
912
917 XLFill(XLFill&& other) noexcept = default;
918
923
929 XLFill& operator=(const XLFill& other);
930
936 XLFill& operator=(XLFill&& other) noexcept = default;
937
942 XLFillType fillType() const;
943
950 bool setFillType(XLFillType newFillType, bool force = false);
951
952 private: // ---------- Switch to private context for two Methods --------- //
958 void throwOnFillType(XLFillType typeToThrowOn, const char* functionName) const;
959
967 XMLNode getValidFillDescription(XLFillType fillTypeIfEmpty, const char* functionName);
968
969 public: // ---------- Switch back to public context ---------------------- //
974 XLGradientType gradientType(); // <gradientFill type="path" />
975 double degree();
976 double left();
977 double right();
978 double top();
979 double bottom();
980 XLGradientStops stops();
981
986 XLPatternType patternType();
987 XLColor color();
988 XLColor backgroundColor();
989
997 bool setGradientType(XLGradientType newType);
998 bool setDegree(double newDegree);
999 bool setLeft(double newLeft);
1000 bool setRight(double newRight);
1001 bool setTop(double newTop);
1002 bool setBottom(double newBottom);
1003
1009 XLFill& setPatternType(XLPatternType newPatternType);
1010 XLFill& setColor(XLColor newColor);
1011 XLFill& setBackgroundColor(XLColor newBgColor);
1012
1017 std::string summary();
1018
1019 private: // ---------- Private Member Variables ---------- //
1020 std::unique_ptr<XMLNode> m_fillNode;
1021 };
1022
1026 class OPENXLSX_EXPORT XLFills
1027 {
1028 public: // ---------- Public Member Functions ---------- //
1032 XLFills();
1033
1038 explicit XLFills(const XMLNode& node);
1039
1044 XLFills(const XLFills& other);
1045
1050 XLFills(XLFills&& other);
1051
1055 ~XLFills();
1056
1062 XLFills& operator=(const XLFills& other);
1063
1069 XLFills& operator=(XLFills&& other) noexcept = default;
1070
1075 size_t count() const;
1076
1082 XLFill fillByIndex(XLStyleIndex index) const;
1083
1089 XLFill operator[](XLStyleIndex index) const { return fillByIndex(index); }
1090
1097 XLStyleIndex create(XLFill copyFrom = XLFill{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1098
1103 XLStyleIndex findOrCreate(XLFill copyFrom, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1104
1105 private: // ---------- Private Member Variables ---------- //
1106 std::unique_ptr<XMLNode> m_fillsNode;
1107 std::vector<XLFill> m_fills;
1108 mutable std::unordered_map<std::string, XLStyleIndex> m_fingerprintCache;
1109 };
1110
1111 // XLBorders Class
1112
1116 class OPENXLSX_EXPORT XLLine
1117 {
1118 public: // ---------- Public Member Functions ---------- //
1122 XLLine();
1123
1128 explicit XLLine(const XMLNode& node);
1129
1134 XLLine(const XLLine& other);
1135
1140 XLLine(XLLine&& other) noexcept = default;
1141
1146
1152 XLLine& operator=(const XLLine& other);
1153
1159 XLLine& operator=(XLLine&& other) noexcept = default;
1160
1165 XLLineStyle style() const;
1166
1171 explicit operator bool() const;
1172
1174 color() const; // <line><color /></line> where node can be left, right, top, bottom, diagonal, vertical, horizontal
1175
1186 std::string summary() const;
1187
1188 private: // ---------- Private Member Variables ---------- //
1189 std::unique_ptr<XMLNode> m_lineNode;
1190 };
1191
1195 class OPENXLSX_EXPORT XLBorder
1196 {
1197 friend class XLBorders; // for access to m_borderNode in XLBorders::create
1198 friend class XLStyles;
1199 public: // ---------- Public Member Functions ---------- //
1203 XLBorder();
1204
1209 explicit XLBorder(const XMLNode& node);
1210
1215 XLBorder(const XLBorder& other);
1216
1221 XLBorder(XLBorder&& other) noexcept = default;
1222
1227
1233 XLBorder& operator=(const XLBorder& other);
1234
1240 XLBorder& operator=(XLBorder&& other) noexcept = default;
1241
1246 bool diagonalUp() const;
1247
1252 bool diagonalDown() const;
1253
1258 bool outline() const;
1259
1264 XLLine left() const;
1265
1270 XLLine right() const;
1271
1276 XLLine top() const;
1277
1282 XLLine bottom() const;
1283
1288 XLLine diagonal() const;
1289
1294 XLLine vertical() const;
1295
1300 XLLine horizontal() const;
1301
1308 XLBorder& setDiagonalUp(bool set = true);
1309 XLBorder& setDiagonalDown(bool set = true);
1310 XLBorder& setOutline(bool set = true);
1311 bool setLine(XLLineType lineType, XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1312 bool setLeft(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1313 bool setRight(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1314 bool setTop(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1315 bool setBottom(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1316 bool setDiagonal(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1317 bool setVertical(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1318 bool setHorizontal(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1319
1324 std::string summary() const;
1325
1326 private: // ---------- Private Member Variables ---------- //
1327 std::unique_ptr<XMLNode> m_borderNode;
1328 inline static const std::vector<std::string_view> m_nodeOrder =
1329 {"left", "right", "top", "bottom", "diagonal", "vertical", "horizontal"};
1330 };
1331
1335 class OPENXLSX_EXPORT XLBorders
1336 {
1337 public: // ---------- Public Member Functions ---------- //
1341 XLBorders();
1342
1347 explicit XLBorders(const XMLNode& node);
1348
1353 XLBorders(const XLBorders& other);
1354
1359 XLBorders(XLBorders&& other);
1360
1364 ~XLBorders();
1365
1371 XLBorders& operator=(const XLBorders& other);
1372
1378 XLBorders& operator=(XLBorders&& other) noexcept = default;
1379
1384 size_t count() const;
1385
1391 XLBorder borderByIndex(XLStyleIndex index) const;
1392
1398 XLBorder operator[](XLStyleIndex index) const { return borderByIndex(index); }
1399
1406 XLStyleIndex create(XLBorder copyFrom = XLBorder{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1407
1412 XLStyleIndex findOrCreate(XLBorder copyFrom, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1413
1414 private: // ---------- Private Member Variables ---------- //
1415 std::unique_ptr<XMLNode> m_bordersNode;
1416 std::vector<XLBorder> m_borders;
1417 mutable std::unordered_map<std::string, XLStyleIndex> m_fingerprintCache;
1418 };
1419
1420 // XLCellFormats Class
1421
1425 class OPENXLSX_EXPORT XLAlignment
1426 {
1427 friend class XLStyles;
1428 public: // ---------- Public Member Functions ---------- //
1432 XLAlignment();
1433
1438 explicit XLAlignment(const XMLNode& node);
1439
1444 XLAlignment(const XLAlignment& other);
1445
1450 XLAlignment(XLAlignment&& other) noexcept = default;
1451
1456
1462 XLAlignment& operator=(const XLAlignment& other);
1463
1469 XLAlignment& operator=(XLAlignment&& other) noexcept = default;
1470
1475 XLAlignmentStyle horizontal() const;
1476
1481 XLAlignmentStyle vertical() const;
1482
1488 uint16_t textRotation() const;
1489
1494 bool wrapText() const;
1495
1500 uint32_t indent() const;
1501
1507 int32_t relativeIndent() const;
1508
1513 bool justifyLastLine() const;
1514
1519 bool shrinkToFit() const;
1520
1525 uint32_t readingOrder() const;
1526
1532 bool setHorizontal(XLAlignmentStyle newStyle);
1533 bool setVertical(XLAlignmentStyle newStyle);
1543 bool setTextRotation(uint16_t newRotation);
1544 bool setWrapText(bool set = true);
1545 bool setIndent(uint32_t newIndent);
1546 bool setRelativeIndent(int32_t newIndent);
1547 bool setJustifyLastLine(bool set = true);
1548 bool setShrinkToFit(bool set = true);
1549 bool setReadingOrder(
1550 uint32_t newReadingOrder); // can be used with XLReadingOrderContextual, XLReadingOrderLeftToRight, XLReadingOrderRightToLeft
1551
1556 std::string summary() const;
1557
1558 private: // ---------- Private Member Variables ---------- //
1559 std::unique_ptr<XMLNode> m_alignmentNode;
1560 };
1561
1565 class OPENXLSX_EXPORT XLCellFormat
1566 {
1567 friend class XLCellFormats; // for access to m_cellFormatNode in XLCellFormats::create
1568 friend class XLStyles;
1569 public: // ---------- Public Member Functions ---------- //
1573 XLCellFormat();
1574
1580 explicit XLCellFormat(const XMLNode& node, bool permitXfId);
1581
1586 XLCellFormat(const XLCellFormat& other);
1587
1592 XLCellFormat(XLCellFormat&& other) noexcept = default;
1593
1598
1604 XLCellFormat& operator=(const XLCellFormat& other);
1605
1611 XLCellFormat& operator=(XLCellFormat&& other) noexcept = default;
1612
1617 uint32_t numberFormatId() const;
1618
1623 XLStyleIndex fontIndex() const;
1624
1629 XLStyleIndex fillIndex() const;
1630
1635 XLStyleIndex borderIndex() const;
1636
1643 XLStyleIndex xfId() const;
1644
1649 bool applyNumberFormat() const;
1650
1655 bool applyFont() const;
1656
1661 bool applyFill() const;
1662
1667 bool applyBorder() const;
1668
1673 bool applyAlignment() const;
1674
1679 bool applyProtection() const;
1680
1687 bool quotePrefix() const;
1688
1695 bool pivotButton() const;
1696
1701 bool locked() const;
1702
1707 bool hidden() const;
1708
1714 XLAlignment alignment(bool createIfMissing = false) const;
1715
1719 XLUnsupportedElement extLst() const { return XLUnsupportedElement{}; } // <xf><extLst>...</extLst></xf>
1720
1726 XLCellFormat& setNumberFormatId(uint32_t newNumFmtId);
1727 XLCellFormat& setFontIndex(XLStyleIndex newFontIndex);
1728 XLCellFormat& setFillIndex(XLStyleIndex newFillIndex);
1729 XLCellFormat& setBorderIndex(XLStyleIndex newBorderIndex);
1730 XLCellFormat& setXfId(XLStyleIndex newXfId); // NOTE: throws when invoked from cellStyleFormats
1731 XLCellFormat& setApplyNumberFormat(bool set = true);
1732 XLCellFormat& setApplyFont(bool set = true);
1733 XLCellFormat& setApplyFill(bool set = true);
1734 XLCellFormat& setApplyBorder(bool set = true);
1735 XLCellFormat& setApplyAlignment(bool set = true);
1736 XLCellFormat& setApplyProtection(bool set = true);
1737 XLCellFormat& setQuotePrefix(bool set = true);
1738 XLCellFormat& setPivotButton(bool set = true);
1739 XLCellFormat& setLocked(bool set = true);
1740 XLCellFormat& setHidden(bool set = true);
1744 XLCellFormat& setExtLst(XLUnsupportedElement const& newExtLst);
1745
1750 std::string summary() const;
1751
1752 private: // ---------- Private Member Variables ---------- //
1753 std::unique_ptr<XMLNode> m_cellFormatNode;
1754 bool m_permitXfId{false};
1755 inline static const std::vector<std::string_view> m_nodeOrder = {"alignment", "protection"};
1756 };
1757
1761 class OPENXLSX_EXPORT XLCellFormats
1762 {
1763 public: // ---------- Public Member Functions ---------- //
1767 XLCellFormats();
1768
1774 explicit XLCellFormats(const XMLNode& node, bool permitXfId = false);
1775
1780 XLCellFormats(const XLCellFormats& other);
1781
1787
1792
1798 XLCellFormats& operator=(const XLCellFormats& other);
1799
1805 XLCellFormats& operator=(XLCellFormats&& other) noexcept = default;
1806
1811 size_t count() const;
1812
1818 XLCellFormat cellFormatByIndex(XLStyleIndex index) const;
1819
1825 XLCellFormat operator[](XLStyleIndex index) const { return cellFormatByIndex(index); }
1826
1834 XLStyleIndex create(XLCellFormat copyFrom = XLCellFormat{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1835
1841 XLStyleIndex findOrCreate(XLCellFormat copyFrom, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1842
1843 private: // ---------- Private Member Variables ---------- //
1844 std::unique_ptr<XMLNode> m_cellFormatsNode;
1845 std::vector<XLCellFormat> m_cellFormats;
1846 bool m_permitXfId{false};
1847 mutable std::unordered_map<std::string, XLStyleIndex> m_fingerprintCache;
1848 };
1849
1850 // XLCellStyles Class
1851
1855 class OPENXLSX_EXPORT XLCellStyle
1856 {
1857 friend class XLCellStyles; // for access to m_cellStyleNode in XLCellStyles::create
1858
1859 public: // ---------- Public Member Functions ---------- //
1863 XLCellStyle();
1864
1869 explicit XLCellStyle(const XMLNode& node);
1870
1875 XLCellStyle(const XLCellStyle& other);
1876
1881 XLCellStyle(XLCellStyle&& other) noexcept = default;
1882
1887
1893 XLCellStyle& operator=(const XLCellStyle& other);
1894
1900 XLCellStyle& operator=(XLCellStyle&& other) noexcept = default;
1901
1906 bool empty() const;
1907
1912 std::string name() const;
1913
1918 XLStyleIndex xfId() const;
1919
1925 uint32_t builtinId() const;
1926
1932 uint32_t outlineStyle() const;
1933
1938 bool hidden() const;
1939
1944 bool customBuiltin() const;
1945
1949 XLUnsupportedElement extLst() const { return XLUnsupportedElement{}; } // <cellStyle><extLst>...</extLst></cellStyle>
1950
1956 bool setName(std::string_view newName);
1957 bool setXfId(XLStyleIndex newXfId);
1958 bool setBuiltinId(uint32_t newBuiltinId);
1959 bool setOutlineStyle(uint32_t newOutlineStyle);
1960 bool setHidden(bool set = true);
1961 bool setCustomBuiltin(bool set = true);
1965 bool setExtLst(XLUnsupportedElement const& newExtLst);
1966
1971 std::string summary() const;
1972
1973 private: // ---------- Private Member Variables ---------- //
1974 std::unique_ptr<XMLNode> m_cellStyleNode;
1975 };
1976
1980 class OPENXLSX_EXPORT XLCellStyles
1981 {
1982 public: // ---------- Public Member Functions ---------- //
1986 XLCellStyles();
1987
1992 explicit XLCellStyles(const XMLNode& node);
1993
1998 XLCellStyles(const XLCellStyles& other);
1999
2004 XLCellStyles(XLCellStyles&& other);
2005
2009 ~XLCellStyles();
2010
2016 XLCellStyles& operator=(const XLCellStyles& other);
2017
2023 XLCellStyles& operator=(XLCellStyles&& other) noexcept = default;
2024
2029 size_t count() const;
2030
2035 XLCellStyle cellStyleByIndex(XLStyleIndex index) const;
2036
2042 XLCellStyle operator[](XLStyleIndex index) const { return cellStyleByIndex(index); }
2043
2050 XLStyleIndex create(XLCellStyle copyFrom = XLCellStyle{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
2051
2052 private: // ---------- Private Member Variables ---------- //
2053 std::unique_ptr<XMLNode> m_cellStylesNode;
2054 std::vector<XLCellStyle> m_cellStyles;
2055 };
2056
2057 // XLDxfs Class
2058
2062 class OPENXLSX_EXPORT XLDxf
2063 {
2064 friend class XLDxfs;
2065
2066 public:
2070 XLDxf();
2071
2076 explicit XLDxf(const XMLNode& node);
2077
2082 XLDxf(const XLDxf& other);
2083
2088 XLDxf(XLDxf&& other) noexcept;
2089
2094
2100 XLDxf& operator=(const XLDxf& other);
2101
2107 XLDxf& operator=(XLDxf&& other) noexcept;
2108
2113 bool empty() const;
2114
2119 XLFont font() const;
2120 XLNumberFormat numFmt() const;
2121 XLFill fill() const;
2122 XLAlignment alignment() const;
2123 XLBorder border() const;
2124
2128 bool hasFont() const;
2129 bool hasNumFmt() const;
2130 bool hasFill() const;
2131 bool hasAlignment() const;
2132 bool hasBorder() const;
2133
2137 void clearFont();
2138 void clearNumFmt();
2139 void clearFill();
2140 void clearAlignment();
2141 void clearBorder();
2142
2147
2151 bool setExtLst(XLUnsupportedElement const& newExtLst);
2152
2157 std::string summary() const;
2158
2162 XMLNode node() const { return m_dxfNode; }
2163
2164 private:
2165 std::unique_ptr<XMLDocument> m_xmlDocument;
2166 mutable XMLNode m_dxfNode;
2167 };
2168
2173
2177 class OPENXLSX_EXPORT XLDxfs
2178 {
2179 public:
2183 XLDxfs();
2184
2189 explicit XLDxfs(const XMLNode& node);
2190
2195 XLDxfs(const XLDxfs& other);
2196
2201 XLDxfs(XLDxfs&& other);
2202
2206 ~XLDxfs();
2207
2213 XLDxfs& operator=(const XLDxfs& other);
2214
2220 XLDxfs& operator=(XLDxfs&& other) noexcept;
2221
2226 size_t count() const;
2227
2232 XLDxf dxfByIndex(XLStyleIndex index) const;
2233
2239 XLDxf operator[](XLStyleIndex index) const { return dxfByIndex(index); }
2240
2247 XLStyleIndex create(XLDxf copyFrom = XLDxf{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
2248
2249 private:
2250 mutable XMLNode m_dxfsNode;
2251 std::vector<XLDxf> m_dxfs;
2252 };
2253
2258
2259 // XLStyles Class
2260
2264 class OPENXLSX_EXPORT XLStyles : public XLXmlFile
2265 {
2266 public: // ---------- Public Member Functions ---------- //
2270 XLStyles();
2271
2279 explicit XLStyles(gsl::not_null<XLXmlData*> xmlData,
2280 bool suppressWarnings = false,
2281 std::string_view stylesPrefix = XLDefaultStylesPrefix);
2282
2286 ~XLStyles();
2287
2292 XLStyles(XLStyles&& other) noexcept;
2293
2298 XLStyles(const XLStyles& other);
2299
2305 XLStyles& operator=(XLStyles&& other) noexcept;
2306
2312 XLStyles& operator=(const XLStyles& other);
2313
2319 uint32_t createNumberFormat(std::string_view formatCode);
2320
2325 XLNumberFormats& numberFormats() const;
2326
2331 XLFonts& fonts() const;
2332
2337 XLFills& fills() const;
2338
2343 XLBorders& borders() const;
2344
2349 XLCellFormats& cellStyleFormats() const;
2350
2355 XLCellFormats& cellFormats() const;
2356
2361 XLCellStyles& cellStyles() const;
2362
2367 XLDxfs& dxfs() const;
2368
2372 XLDxfs& diffCellFormats() const { return dxfs(); }
2373
2379 XLStyleIndex addDxf(const XLDxf& dxf);
2380
2390 XLStyleIndex addNamedStyle(std::string_view name,
2391 std::optional<XLStyleIndex> fontId = std::nullopt,
2392 std::optional<XLStyleIndex> fillId = std::nullopt,
2393 std::optional<XLStyleIndex> borderId = std::nullopt,
2394 std::optional<XLStyleIndex> numFmtId = std::nullopt);
2395
2401 XLStyleIndex namedStyle(std::string_view name) const;
2402
2413 XLStyleIndex findOrCreateStyle(const XLStyle& style);
2414
2415 // ---------- Protected Member Functions ---------- //
2416 private:
2417 bool m_suppressWarnings; // if true, will suppress output of warnings where supported
2418 std::unique_ptr<XLNumberFormats> m_numberFormats; // handle to the underlying number formats
2419 std::unique_ptr<XLFonts> m_fonts; // handle to the underlying fonts
2420 std::unique_ptr<XLFills> m_fills; // handle to the underlying fills
2421 std::unique_ptr<XLBorders> m_borders; // handle to the underlying border descriptions
2422 std::unique_ptr<XLCellFormats> m_cellStyleFormats; // handle to the underlying cell style formats descriptions
2423 std::unique_ptr<XLCellFormats> m_cellFormats; // handle to the underlying cell formats descriptions
2424 std::unique_ptr<XLCellStyles> m_cellStyles; // handle to the underlying cell styles
2425 std::unique_ptr<XLDxfs> m_dxfs; // handle to the underlying differential cell formats
2426 };
2427} // namespace OpenXLSX
2428
2429#ifdef _MSC_VER // conditionally enable MSVC specific pragmas to avoid other compilers warning about unknown pragmas
2430# pragma warning(pop)
2431#endif // _MSC_VER
2432
2433#endif // OPENXLSX_XLSTYLES_HPP
Definition XLXmlParser.hpp:84
An encapsulation of an alignment item.
Definition XLStyles.hpp:1426
XLAlignment & operator=(XLAlignment &&other) noexcept=default
Move assignment operator.
XLAlignment(XLAlignment &&other) noexcept=default
Move Constructor.
An encapsulation of a border item.
Definition XLStyles.hpp:1196
XLBorder & operator=(XLBorder &&other) noexcept=default
Move assignment operator.
XLBorder(XLBorder &&other) noexcept=default
Move Constructor.
An encapsulation of the XLSX borders.
Definition XLStyles.hpp:1336
XLBorders & operator=(XLBorders &&other) noexcept=default
Move assignment operator.
XLBorder operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to borderByIndex.
Definition XLStyles.hpp:1398
An encapsulation of a cell format item.
Definition XLStyles.hpp:1566
XLUnsupportedElement extLst() const
Unsupported getter.
Definition XLStyles.hpp:1719
XLCellFormat(XLCellFormat &&other) noexcept=default
Move Constructor.
XLCellFormat & operator=(XLCellFormat &&other) noexcept=default
Move assignment operator.
An encapsulation of the XLSX cell style formats.
Definition XLStyles.hpp:1762
XLCellFormat operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to cellFormatByIndex.
Definition XLStyles.hpp:1825
XLCellFormats & operator=(XLCellFormats &&other) noexcept=default
Move assignment operator.
An encapsulation of a cell style item.
Definition XLStyles.hpp:1856
XLUnsupportedElement extLst() const
Unsupported getter.
Definition XLStyles.hpp:1949
XLCellStyle & operator=(XLCellStyle &&other) noexcept=default
Move assignment operator.
XLCellStyle(XLCellStyle &&other) noexcept=default
Move Constructor.
An encapsulation of the XLSX cell styles.
Definition XLStyles.hpp:1981
XLCellStyles & operator=(XLCellStyles &&other) noexcept=default
Move assignment operator.
XLCellStyle operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to cellStyleByIndex.
Definition XLStyles.hpp:2042
Definition XLColor.hpp:22
An encapsulation of an XLSX Data Bar Color (CT_Color) item.
Definition XLStyles.hpp:644
bool set(XLColor newColor)
Definition XLStyles.hpp:713
XLDataBarColor & operator=(XLDataBarColor &&other) noexcept=default
Move assignment operator.
XLDataBarColor(XLDataBarColor &&other) noexcept=default
Move Constructor.
An encapsulation of a differential cell format item (DXF)
Definition XLStyles.hpp:2063
XLUnsupportedElement extLst() const
Unsupported getter.
Definition XLStyles.hpp:2146
~XLDxf()
Destructor.
XMLNode node() const
Access the underlying XML node.
Definition XLStyles.hpp:2162
An encapsulation of the XLSX differential cell formats (dxfs)
Definition XLStyles.hpp:2178
XLDxf operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to dxfByIndex.
Definition XLStyles.hpp:2239
An encapsulation of a fill item.
Definition XLStyles.hpp:892
XLFill(XLFill &&other) noexcept=default
Move Constructor.
XLFill & operator=(XLFill &&other) noexcept=default
Move assignment operator.
An encapsulation of the XLSX fills.
Definition XLStyles.hpp:1027
XLFill operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to fillByIndex.
Definition XLStyles.hpp:1089
XLFills & operator=(XLFills &&other) noexcept=default
Move assignment operator.
An encapsulation of a font item.
Definition XLStyles.hpp:379
XLFont(XLFont &&other) noexcept=default
Move Constructor.
XLFont & operator=(XLFont &&other) noexcept=default
Move assignment operator.
An encapsulation of the XLSX fonts.
Definition XLStyles.hpp:550
XLFonts & operator=(XLFonts &&other) noexcept=default
Move assignment operator.
XLFont operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to fontByIndex.
Definition XLStyles.hpp:612
An encapsulation of an fill::gradientFill::stop item.
Definition XLStyles.hpp:735
XLGradientStop & operator=(XLGradientStop &&other) noexcept=default
Move assignment operator.
XLGradientStop(XLGradientStop &&other) noexcept=default
Move Constructor.
An encapsulation of an array of fill::gradientFill::stop items.
Definition XLStyles.hpp:809
XLGradientStops & operator=(XLGradientStops &&other) noexcept=default
Move assignment operator.
XLGradientStop operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to stopByIndex.
Definition XLStyles.hpp:871
An encapsulation of a line item.
Definition XLStyles.hpp:1117
XLLine(XLLine &&other) noexcept=default
Move Constructor.
XLLine & operator=(XLLine &&other) noexcept=default
Move assignment operator.
An encapsulation of a number format (numFmt) item.
Definition XLStyles.hpp:189
XLNumberFormat & operator=(XLNumberFormat &&other) noexcept=default
Move assignment operator.
XLNumberFormat(XLNumberFormat &&other) noexcept=default
Move Constructor.
An encapsulation of the XLSX number formats (numFmts)
Definition XLStyles.hpp:268
XLNumberFormat operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to numberFormatByIndex.
Definition XLStyles.hpp:329
XLNumberFormats & operator=(XLNumberFormats &&other) noexcept=default
Move assignment operator.
An encapsulation of the styles file (xl/styles.xml) in an Excel document package.
Definition XLStyles.hpp:2265
XLDxfs & diffCellFormats() const
Backward compatibility alias for dxfs()
Definition XLStyles.hpp:2372
The XLUnsupportedElement class provides a stub implementation that can be used as function parameter ...
Definition XLXmlFile.hpp:28
The XLXmlFile class provides an interface for derived classes to use. It functions as an ancestor to ...
Definition XLXmlFile.hpp:42
Definition IZipArchive.hpp:18
XLFillType
Definition XLStyles.hpp:103
@ XLPatternFill
Definition XLStyles.hpp:105
@ XLGradientFill
Definition XLStyles.hpp:104
@ XLFillTypeInvalid
Definition XLStyles.hpp:106
XLAlignmentStyle
Definition XLStyles.hpp:167
@ XLAlignInvalid
Definition XLStyles.hpp:178
@ XLAlignRight
Definition XLStyles.hpp:170
@ XLAlignBottom
Definition XLStyles.hpp:173
@ XLAlignLeft
Definition XLStyles.hpp:169
@ XLAlignCenterContinuous
Definition XLStyles.hpp:176
@ XLAlignGeneral
Definition XLStyles.hpp:168
@ XLAlignJustify
Definition XLStyles.hpp:175
@ XLAlignFill
Definition XLStyles.hpp:174
@ XLAlignDistributed
Definition XLStyles.hpp:177
@ XLAlignCenter
Definition XLStyles.hpp:171
@ XLAlignTop
Definition XLStyles.hpp:172
XLLineType
Definition XLStyles.hpp:138
@ XLLineLeft
Definition XLStyles.hpp:139
@ XLLineBottom
Definition XLStyles.hpp:142
@ XLLineVertical
Definition XLStyles.hpp:144
@ XLLineDiagonal
Definition XLStyles.hpp:143
@ XLLineRight
Definition XLStyles.hpp:140
@ XLLineHorizontal
Definition XLStyles.hpp:145
@ XLLineInvalid
Definition XLStyles.hpp:146
@ XLLineTop
Definition XLStyles.hpp:141
XLPatternType
Definition XLStyles.hpp:111
@ XLPatternNone
Definition XLStyles.hpp:112
@ XLPatternLightDown
Definition XLStyles.hpp:125
@ XLPatternGray0625
Definition XLStyles.hpp:130
@ XLPatternDarkGray
Definition XLStyles.hpp:115
@ XLPatternTypeInvalid
Definition XLStyles.hpp:131
@ XLPatternLightHorizontal
Definition XLStyles.hpp:123
@ XLPatternDarkDown
Definition XLStyles.hpp:119
@ XLPatternDarkHorizontal
Definition XLStyles.hpp:117
@ XLPatternSolid
Definition XLStyles.hpp:113
@ XLPatternDarkUp
Definition XLStyles.hpp:120
@ XLPatternDarkGrid
Definition XLStyles.hpp:121
@ XLPatternGray125
Definition XLStyles.hpp:129
@ XLPatternLightVertical
Definition XLStyles.hpp:124
@ XLPatternLightUp
Definition XLStyles.hpp:126
@ XLPatternDarkTrellis
Definition XLStyles.hpp:122
@ XLPatternDarkVertical
Definition XLStyles.hpp:118
@ XLPatternLightGray
Definition XLStyles.hpp:116
@ XLPatternLightGrid
Definition XLStyles.hpp:127
@ XLPatternLightTrellis
Definition XLStyles.hpp:128
@ XLPatternMediumGray
Definition XLStyles.hpp:114
XLUnderlineStyle
Definition XLStyles.hpp:80
@ XLUnderlineSingleAccounting
Definition XLStyles.hpp:84
@ XLUnderlineDoubleAccounting
Definition XLStyles.hpp:85
@ XLUnderlineSingle
Definition XLStyles.hpp:82
@ XLUnderlineNone
Definition XLStyles.hpp:81
@ XLUnderlineInvalid
Definition XLStyles.hpp:86
@ XLUnderlineDouble
Definition XLStyles.hpp:83
constexpr const char * XLDefaultPatternBgColor
Definition XLStyles.hpp:136
constexpr const uint32_t XLDefaultFontSize
Definition XLStyles.hpp:54
XLGradientType
Definition XLStyles.hpp:109
@ XLGradientLinear
Definition XLStyles.hpp:109
@ XLGradientTypeInvalid
Definition XLStyles.hpp:109
@ XLGradientPath
Definition XLStyles.hpp:109
constexpr const char * XLDefaultLineStyle
Definition XLStyles.hpp:61
constexpr const XLStyleIndex XLDefaultCellFormat
Definition XLStyles.hpp:49
constexpr const uint32_t XLDefaultFontCharset
Definition XLStyles.hpp:59
constexpr const bool XLCreateIfMissing
Definition XLStyles.hpp:41
constexpr const XLFillType XLDefaultFillType
Definition XLStyles.hpp:133
size_t XLStyleIndex
Definition XLStyles.hpp:31
constexpr const char * XLDefaultPatternFgColor
Definition XLStyles.hpp:135
constexpr const char * XLDefaultStyleEntriesPrefix
Definition XLStyles.hpp:47
constexpr const char * XLDefaultFontColor
Definition XLStyles.hpp:55
constexpr const char * XLDefaultFontName
Definition XLStyles.hpp:57
constexpr const bool XLDoNotCreate
Definition XLStyles.hpp:42
constexpr const char * XLDefaultStylesPrefix
Definition XLStyles.hpp:46
constexpr const uint32_t XLInvalidUInt32
Definition XLStyles.hpp:34
XLFontSchemeStyle
Definition XLStyles.hpp:89
@ XLFontSchemeInvalid
Definition XLStyles.hpp:93
@ XLFontSchemeNone
Definition XLStyles.hpp:90
@ XLFontSchemeMinor
Definition XLStyles.hpp:92
@ XLFontSchemeMajor
Definition XLStyles.hpp:91
XLReadingOrder
Definition XLStyles.hpp:181
@ XLReadingOrderLeftToRight
Definition XLStyles.hpp:181
@ XLReadingOrderContextual
Definition XLStyles.hpp:181
@ XLReadingOrderRightToLeft
Definition XLStyles.hpp:181
constexpr const bool XLForceFillType
Definition XLStyles.hpp:44
XLVerticalAlignRunStyle
Definition XLStyles.hpp:96
@ XLSubscript
Definition XLStyles.hpp:98
@ XLBaseline
Definition XLStyles.hpp:97
@ XLVerticalAlignRunInvalid
Definition XLStyles.hpp:100
@ XLSuperscript
Definition XLStyles.hpp:99
XLLineStyle
Definition XLStyles.hpp:149
@ XLLineStyleNone
Definition XLStyles.hpp:150
@ XLLineStyleMediumDashDotDot
Definition XLStyles.hpp:162
@ XLLineStyleDashDot
Definition XLStyles.hpp:159
@ XLLineStyleMediumDashed
Definition XLStyles.hpp:158
@ XLLineStyleDotted
Definition XLStyles.hpp:154
@ XLLineStyleSlantDashDot
Definition XLStyles.hpp:163
@ XLLineStyleDouble
Definition XLStyles.hpp:156
@ XLLineStyleInvalid
Definition XLStyles.hpp:164
@ XLLineStyleThick
Definition XLStyles.hpp:155
@ XLLineStyleThin
Definition XLStyles.hpp:151
@ XLLineStyleMediumDashDot
Definition XLStyles.hpp:160
@ XLLineStyleDashed
Definition XLStyles.hpp:153
@ XLLineStyleDashDotDot
Definition XLStyles.hpp:161
@ XLLineStyleMedium
Definition XLStyles.hpp:152
@ XLLineStyleHair
Definition XLStyles.hpp:157
constexpr const uint32_t XLInvalidUInt16
Definition XLStyles.hpp:33
constexpr const uint32_t XLDeleteProperty
Definition XLStyles.hpp:35
constexpr const XLStyleIndex XLInvalidStyleIndex
Definition XLStyles.hpp:52
constexpr const XLPatternType XLDefaultPatternType
Definition XLStyles.hpp:134
constexpr const uint32_t XLDefaultFontFamily
Definition XLStyles.hpp:58
constexpr const char * XLDefaultFontColorTheme
Definition XLStyles.hpp:56
constexpr const bool XLPermitXfID
Definition XLStyles.hpp:39
A high-level, human-ergonomic structure representing the styling of a cell or range....
Definition XLStyle.hpp:19