OpenXLSX 1.9.1
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 public: // ---------- Public Member Functions ---------- //
385 XLFont();
386
391 explicit XLFont(const XMLNode& node);
392
397 XLFont(const XLFont& other);
398
403 XLFont(XLFont&& other) noexcept = default;
404
409
415 XLFont& operator=(const XLFont& other);
416
422 XLFont& operator=(XLFont&& other) noexcept = default;
423
428 std::string fontName() const;
429
434 size_t fontCharset() const;
435
440 size_t fontFamily() const;
441
446 size_t fontSize() const;
447
452 XLColor fontColor() const;
453
458 bool bold() const;
459
464 bool italic() const;
465
470 bool strikethrough() const;
471
476 XLUnderlineStyle underline() const;
477
482 XLFontSchemeStyle scheme() const;
483
488 XLVerticalAlignRunStyle vertAlign() const;
489
494 bool outline() const;
495
500 bool shadow() const;
501
506 bool condense() const;
507
512 bool extend() const;
513
519 XLFont& setFontName(std::string_view newName);
520 XLFont& setFontCharset(size_t newCharset);
521 XLFont& setFontFamily(size_t newFamily);
522 XLFont& setFontSize(size_t newSize);
523 XLFont& setFontColor(XLColor newColor);
524 XLFont& setBold(bool set = true);
525 XLFont& setItalic(bool set = true);
526 XLFont& setStrikethrough(bool set = true);
527 XLFont& setUnderline(XLUnderlineStyle style = XLUnderlineSingle);
528 XLFont& setScheme(XLFontSchemeStyle newScheme);
529 XLFont& setVertAlign(XLVerticalAlignRunStyle newVertAlign);
530 XLFont& setOutline(bool set = true);
531 XLFont& setShadow(bool set = true);
532 XLFont& setCondense(bool set = true);
533 XLFont& setExtend(bool set = true);
534
539 std::string summary() const;
540
541 private: // ---------- Private Member Variables ---------- //
542 std::unique_ptr<XMLNode> m_fontNode;
543 };
544
548 class OPENXLSX_EXPORT XLFonts
549 {
550 public: // ---------- Public Member Functions ---------- //
554 XLFonts();
555
560 explicit XLFonts(const XMLNode& node);
561
566 XLFonts(const XLFonts& other);
567
572 XLFonts(XLFonts&& other);
573
577 ~XLFonts();
578
584 XLFonts& operator=(const XLFonts& other);
585
591 XLFonts& operator=(XLFonts&& other) noexcept = default;
592
597 size_t count() const;
598
604 XLFont fontByIndex(XLStyleIndex index) const;
605
611 XLFont operator[](XLStyleIndex index) const { return fontByIndex(index); }
612
619 XLStyleIndex create(XLFont copyFrom = XLFont{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
620
629 XLStyleIndex findOrCreate(XLFont copyFrom, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
630
631 private: // ---------- Private Member Variables ---------- //
632 std::unique_ptr<XMLNode> m_fontsNode;
633 std::vector<XLFont> m_fonts;
634 mutable std::unordered_map<std::string, XLStyleIndex> m_fingerprintCache;
635 };
636
637 // XLDataBarColor Class
638
642 class OPENXLSX_EXPORT XLDataBarColor
643 {
644 public:
649
654 explicit XLDataBarColor(const XMLNode& node);
655
660 XLDataBarColor(const XLDataBarColor& other);
661
666 XLDataBarColor(XLDataBarColor&& other) noexcept = default;
667
671 ~XLDataBarColor() = default;
672
678 XLDataBarColor& operator=(const XLDataBarColor& other);
679
685 XLDataBarColor& operator=(XLDataBarColor&& other) noexcept = default;
686
691 XLColor rgb() const;
692
697 double tint() const;
698
702 bool automatic() const; // <color auto="true" />
703 uint32_t indexed() const; // <color indexed="1" />
704 uint32_t theme() const; // <color theme="1" />
705
711 bool setRgb(XLColor newColor);
712 bool set(XLColor newColor) { return setRgb(newColor); } // alias for setRgb
713 bool setTint(double newTint);
714 bool setAutomatic(bool set = true);
715 bool setIndexed(uint32_t newIndex);
716 bool setTheme(uint32_t newTheme);
717
722 std::string summary() const;
723
724 private: // ---------- Private Member Variables ---------- //
725 std::unique_ptr<XMLNode> m_colorNode;
726 };
727
728 // XLFills Class
729
733 class OPENXLSX_EXPORT XLGradientStop
734 {
735 friend class XLGradientStops; // for access to m_stopNode in XLGradientStops::create
736 public: // ---------- Public Member Functions ----------- //
741
746 explicit XLGradientStop(const XMLNode& node);
747
752 XLGradientStop(const XLGradientStop& other);
753
758 XLGradientStop(XLGradientStop&& other) noexcept = default;
759
763 ~XLGradientStop() = default;
764
770 XLGradientStop& operator=(const XLGradientStop& other);
771
777 XLGradientStop& operator=(XLGradientStop&& other) noexcept = default;
778
783 XLDataBarColor color() const; // <stop><color /></stop>
784 double position() const; // <stop position="1.2" />
785
792 bool setPosition(double newPosition);
793
798 std::string summary() const;
799
800 private: // ---------- Private Member Variables ---------- //
801 std::unique_ptr<XMLNode> m_stopNode;
802 };
803
807 class OPENXLSX_EXPORT XLGradientStops
808 {
809 public: // ---------- Public Member Functions ---------- //
814
819 explicit XLGradientStops(const XMLNode& node);
820
825 XLGradientStops(const XLGradientStops& other);
826
832
837
843 XLGradientStops& operator=(const XLGradientStops& other);
844
850 XLGradientStops& operator=(XLGradientStops&& other) noexcept = default;
851
856 size_t count() const;
857
863 XLGradientStop stopByIndex(XLStyleIndex index) const;
864
870 XLGradientStop operator[](XLStyleIndex index) const { return stopByIndex(index); }
871
878 XLStyleIndex create(XLGradientStop copyFrom = XLGradientStop{}, std::string_view styleEntriesPrefix = "");
879
880 std::string summary() const;
881
882 private:
883 std::unique_ptr<XMLNode> m_gradientNode;
884 std::vector<XLGradientStop> m_gradientStops;
885 };
886
890 class OPENXLSX_EXPORT XLFill
891 {
892 friend class XLFills; // for access to m_fillNode in XLFills::create
893 public: // ---------- Public Member Functions ----------- //
897 XLFill();
898
903 explicit XLFill(const XMLNode& node);
904
909 XLFill(const XLFill& other);
910
915 XLFill(XLFill&& other) noexcept = default;
916
921
927 XLFill& operator=(const XLFill& other);
928
934 XLFill& operator=(XLFill&& other) noexcept = default;
935
940 XLFillType fillType() const;
941
948 bool setFillType(XLFillType newFillType, bool force = false);
949
950 private: // ---------- Switch to private context for two Methods --------- //
956 void throwOnFillType(XLFillType typeToThrowOn, const char* functionName) const;
957
965 XMLNode getValidFillDescription(XLFillType fillTypeIfEmpty, const char* functionName);
966
967 public: // ---------- Switch back to public context ---------------------- //
972 XLGradientType gradientType(); // <gradientFill type="path" />
973 double degree();
974 double left();
975 double right();
976 double top();
977 double bottom();
978 XLGradientStops stops();
979
984 XLPatternType patternType();
985 XLColor color();
986 XLColor backgroundColor();
987
995 bool setGradientType(XLGradientType newType);
996 bool setDegree(double newDegree);
997 bool setLeft(double newLeft);
998 bool setRight(double newRight);
999 bool setTop(double newTop);
1000 bool setBottom(double newBottom);
1001
1007 XLFill& setPatternType(XLPatternType newPatternType);
1008 XLFill& setColor(XLColor newColor);
1009 XLFill& setBackgroundColor(XLColor newBgColor);
1010
1015 std::string summary();
1016
1017 private: // ---------- Private Member Variables ---------- //
1018 std::unique_ptr<XMLNode> m_fillNode;
1019 };
1020
1024 class OPENXLSX_EXPORT XLFills
1025 {
1026 public: // ---------- Public Member Functions ---------- //
1030 XLFills();
1031
1036 explicit XLFills(const XMLNode& node);
1037
1042 XLFills(const XLFills& other);
1043
1048 XLFills(XLFills&& other);
1049
1053 ~XLFills();
1054
1060 XLFills& operator=(const XLFills& other);
1061
1067 XLFills& operator=(XLFills&& other) noexcept = default;
1068
1073 size_t count() const;
1074
1080 XLFill fillByIndex(XLStyleIndex index) const;
1081
1087 XLFill operator[](XLStyleIndex index) const { return fillByIndex(index); }
1088
1095 XLStyleIndex create(XLFill copyFrom = XLFill{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1096
1101 XLStyleIndex findOrCreate(XLFill copyFrom, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1102
1103 private: // ---------- Private Member Variables ---------- //
1104 std::unique_ptr<XMLNode> m_fillsNode;
1105 std::vector<XLFill> m_fills;
1106 mutable std::unordered_map<std::string, XLStyleIndex> m_fingerprintCache;
1107 };
1108
1109 // XLBorders Class
1110
1114 class OPENXLSX_EXPORT XLLine
1115 {
1116 public: // ---------- Public Member Functions ---------- //
1120 XLLine();
1121
1126 explicit XLLine(const XMLNode& node);
1127
1132 XLLine(const XLLine& other);
1133
1138 XLLine(XLLine&& other) noexcept = default;
1139
1144
1150 XLLine& operator=(const XLLine& other);
1151
1157 XLLine& operator=(XLLine&& other) noexcept = default;
1158
1163 XLLineStyle style() const;
1164
1169 explicit operator bool() const;
1170
1172 color() const; // <line><color /></line> where node can be left, right, top, bottom, diagonal, vertical, horizontal
1173
1184 std::string summary() const;
1185
1186 private: // ---------- Private Member Variables ---------- //
1187 std::unique_ptr<XMLNode> m_lineNode;
1188 };
1189
1193 class OPENXLSX_EXPORT XLBorder
1194 {
1195 friend class XLBorders; // for access to m_borderNode in XLBorders::create
1196 public: // ---------- Public Member Functions ---------- //
1200 XLBorder();
1201
1206 explicit XLBorder(const XMLNode& node);
1207
1212 XLBorder(const XLBorder& other);
1213
1218 XLBorder(XLBorder&& other) noexcept = default;
1219
1224
1230 XLBorder& operator=(const XLBorder& other);
1231
1237 XLBorder& operator=(XLBorder&& other) noexcept = default;
1238
1243 bool diagonalUp() const;
1244
1249 bool diagonalDown() const;
1250
1255 bool outline() const;
1256
1261 XLLine left() const;
1262
1267 XLLine right() const;
1268
1273 XLLine top() const;
1274
1279 XLLine bottom() const;
1280
1285 XLLine diagonal() const;
1286
1291 XLLine vertical() const;
1292
1297 XLLine horizontal() const;
1298
1305 XLBorder& setDiagonalUp(bool set = true);
1306 XLBorder& setDiagonalDown(bool set = true);
1307 XLBorder& setOutline(bool set = true);
1308 bool setLine(XLLineType lineType, XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1309 bool setLeft(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1310 bool setRight(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1311 bool setTop(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1312 bool setBottom(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1313 bool setDiagonal(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1314 bool setVertical(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1315 bool setHorizontal(XLLineStyle lineStyle, XLColor lineColor, double lineTint = 0.0);
1316
1321 std::string summary() const;
1322
1323 private: // ---------- Private Member Variables ---------- //
1324 std::unique_ptr<XMLNode> m_borderNode;
1325 inline static const std::vector<std::string_view> m_nodeOrder =
1326 {"left", "right", "top", "bottom", "diagonal", "vertical", "horizontal"};
1327 };
1328
1332 class OPENXLSX_EXPORT XLBorders
1333 {
1334 public: // ---------- Public Member Functions ---------- //
1338 XLBorders();
1339
1344 explicit XLBorders(const XMLNode& node);
1345
1350 XLBorders(const XLBorders& other);
1351
1356 XLBorders(XLBorders&& other);
1357
1361 ~XLBorders();
1362
1368 XLBorders& operator=(const XLBorders& other);
1369
1375 XLBorders& operator=(XLBorders&& other) noexcept = default;
1376
1381 size_t count() const;
1382
1388 XLBorder borderByIndex(XLStyleIndex index) const;
1389
1395 XLBorder operator[](XLStyleIndex index) const { return borderByIndex(index); }
1396
1403 XLStyleIndex create(XLBorder copyFrom = XLBorder{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1404
1409 XLStyleIndex findOrCreate(XLBorder copyFrom, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1410
1411 private: // ---------- Private Member Variables ---------- //
1412 std::unique_ptr<XMLNode> m_bordersNode;
1413 std::vector<XLBorder> m_borders;
1414 mutable std::unordered_map<std::string, XLStyleIndex> m_fingerprintCache;
1415 };
1416
1417 // XLCellFormats Class
1418
1422 class OPENXLSX_EXPORT XLAlignment
1423 {
1424 public: // ---------- Public Member Functions ---------- //
1428 XLAlignment();
1429
1434 explicit XLAlignment(const XMLNode& node);
1435
1440 XLAlignment(const XLAlignment& other);
1441
1446 XLAlignment(XLAlignment&& other) noexcept = default;
1447
1452
1458 XLAlignment& operator=(const XLAlignment& other);
1459
1465 XLAlignment& operator=(XLAlignment&& other) noexcept = default;
1466
1471 XLAlignmentStyle horizontal() const;
1472
1477 XLAlignmentStyle vertical() const;
1478
1484 uint16_t textRotation() const;
1485
1490 bool wrapText() const;
1491
1496 uint32_t indent() const;
1497
1503 int32_t relativeIndent() const;
1504
1509 bool justifyLastLine() const;
1510
1515 bool shrinkToFit() const;
1516
1521 uint32_t readingOrder() const;
1522
1528 bool setHorizontal(XLAlignmentStyle newStyle);
1529 bool setVertical(XLAlignmentStyle newStyle);
1539 bool setTextRotation(uint16_t newRotation);
1540 bool setWrapText(bool set = true);
1541 bool setIndent(uint32_t newIndent);
1542 bool setRelativeIndent(int32_t newIndent);
1543 bool setJustifyLastLine(bool set = true);
1544 bool setShrinkToFit(bool set = true);
1545 bool setReadingOrder(
1546 uint32_t newReadingOrder); // can be used with XLReadingOrderContextual, XLReadingOrderLeftToRight, XLReadingOrderRightToLeft
1547
1552 std::string summary() const;
1553
1554 private: // ---------- Private Member Variables ---------- //
1555 std::unique_ptr<XMLNode> m_alignmentNode;
1556 };
1557
1561 class OPENXLSX_EXPORT XLCellFormat
1562 {
1563 friend class XLCellFormats; // for access to m_cellFormatNode in XLCellFormats::create
1564
1565 public: // ---------- Public Member Functions ---------- //
1569 XLCellFormat();
1570
1576 explicit XLCellFormat(const XMLNode& node, bool permitXfId);
1577
1582 XLCellFormat(const XLCellFormat& other);
1583
1588 XLCellFormat(XLCellFormat&& other) noexcept = default;
1589
1594
1600 XLCellFormat& operator=(const XLCellFormat& other);
1601
1607 XLCellFormat& operator=(XLCellFormat&& other) noexcept = default;
1608
1613 uint32_t numberFormatId() const;
1614
1619 XLStyleIndex fontIndex() const;
1620
1625 XLStyleIndex fillIndex() const;
1626
1631 XLStyleIndex borderIndex() const;
1632
1639 XLStyleIndex xfId() const;
1640
1645 bool applyNumberFormat() const;
1646
1651 bool applyFont() const;
1652
1657 bool applyFill() const;
1658
1663 bool applyBorder() const;
1664
1669 bool applyAlignment() const;
1670
1675 bool applyProtection() const;
1676
1683 bool quotePrefix() const;
1684
1691 bool pivotButton() const;
1692
1697 bool locked() const;
1698
1703 bool hidden() const;
1704
1710 XLAlignment alignment(bool createIfMissing = false) const;
1711
1715 XLUnsupportedElement extLst() const { return XLUnsupportedElement{}; } // <xf><extLst>...</extLst></xf>
1716
1722 XLCellFormat& setNumberFormatId(uint32_t newNumFmtId);
1723 XLCellFormat& setFontIndex(XLStyleIndex newFontIndex);
1724 XLCellFormat& setFillIndex(XLStyleIndex newFillIndex);
1725 XLCellFormat& setBorderIndex(XLStyleIndex newBorderIndex);
1726 XLCellFormat& setXfId(XLStyleIndex newXfId); // NOTE: throws when invoked from cellStyleFormats
1727 XLCellFormat& setApplyNumberFormat(bool set = true);
1728 XLCellFormat& setApplyFont(bool set = true);
1729 XLCellFormat& setApplyFill(bool set = true);
1730 XLCellFormat& setApplyBorder(bool set = true);
1731 XLCellFormat& setApplyAlignment(bool set = true);
1732 XLCellFormat& setApplyProtection(bool set = true);
1733 XLCellFormat& setQuotePrefix(bool set = true);
1734 XLCellFormat& setPivotButton(bool set = true);
1735 XLCellFormat& setLocked(bool set = true);
1736 XLCellFormat& setHidden(bool set = true);
1740 XLCellFormat& setExtLst(XLUnsupportedElement const& newExtLst);
1741
1746 std::string summary() const;
1747
1748 private: // ---------- Private Member Variables ---------- //
1749 std::unique_ptr<XMLNode> m_cellFormatNode;
1750 bool m_permitXfId{false};
1751 inline static const std::vector<std::string_view> m_nodeOrder = {"alignment", "protection"};
1752 };
1753
1757 class OPENXLSX_EXPORT XLCellFormats
1758 {
1759 public: // ---------- Public Member Functions ---------- //
1763 XLCellFormats();
1764
1770 explicit XLCellFormats(const XMLNode& node, bool permitXfId = false);
1771
1776 XLCellFormats(const XLCellFormats& other);
1777
1783
1788
1794 XLCellFormats& operator=(const XLCellFormats& other);
1795
1801 XLCellFormats& operator=(XLCellFormats&& other) noexcept = default;
1802
1807 size_t count() const;
1808
1814 XLCellFormat cellFormatByIndex(XLStyleIndex index) const;
1815
1821 XLCellFormat operator[](XLStyleIndex index) const { return cellFormatByIndex(index); }
1822
1830 XLStyleIndex create(XLCellFormat copyFrom = XLCellFormat{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1831
1837 XLStyleIndex findOrCreate(XLCellFormat copyFrom, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
1838
1839 private: // ---------- Private Member Variables ---------- //
1840 std::unique_ptr<XMLNode> m_cellFormatsNode;
1841 std::vector<XLCellFormat> m_cellFormats;
1842 bool m_permitXfId{false};
1843 mutable std::unordered_map<std::string, XLStyleIndex> m_fingerprintCache;
1844 };
1845
1846 // XLCellStyles Class
1847
1851 class OPENXLSX_EXPORT XLCellStyle
1852 {
1853 friend class XLCellStyles; // for access to m_cellStyleNode in XLCellStyles::create
1854
1855 public: // ---------- Public Member Functions ---------- //
1859 XLCellStyle();
1860
1865 explicit XLCellStyle(const XMLNode& node);
1866
1871 XLCellStyle(const XLCellStyle& other);
1872
1877 XLCellStyle(XLCellStyle&& other) noexcept = default;
1878
1883
1889 XLCellStyle& operator=(const XLCellStyle& other);
1890
1896 XLCellStyle& operator=(XLCellStyle&& other) noexcept = default;
1897
1902 bool empty() const;
1903
1908 std::string name() const;
1909
1914 XLStyleIndex xfId() const;
1915
1921 uint32_t builtinId() const;
1922
1928 uint32_t outlineStyle() const;
1929
1934 bool hidden() const;
1935
1940 bool customBuiltin() const;
1941
1945 XLUnsupportedElement extLst() const { return XLUnsupportedElement{}; } // <cellStyle><extLst>...</extLst></cellStyle>
1946
1952 bool setName(std::string_view newName);
1953 bool setXfId(XLStyleIndex newXfId);
1954 bool setBuiltinId(uint32_t newBuiltinId);
1955 bool setOutlineStyle(uint32_t newOutlineStyle);
1956 bool setHidden(bool set = true);
1957 bool setCustomBuiltin(bool set = true);
1961 bool setExtLst(XLUnsupportedElement const& newExtLst);
1962
1967 std::string summary() const;
1968
1969 private: // ---------- Private Member Variables ---------- //
1970 std::unique_ptr<XMLNode> m_cellStyleNode;
1971 };
1972
1976 class OPENXLSX_EXPORT XLCellStyles
1977 {
1978 public: // ---------- Public Member Functions ---------- //
1982 XLCellStyles();
1983
1988 explicit XLCellStyles(const XMLNode& node);
1989
1994 XLCellStyles(const XLCellStyles& other);
1995
2000 XLCellStyles(XLCellStyles&& other);
2001
2005 ~XLCellStyles();
2006
2012 XLCellStyles& operator=(const XLCellStyles& other);
2013
2019 XLCellStyles& operator=(XLCellStyles&& other) noexcept = default;
2020
2025 size_t count() const;
2026
2031 XLCellStyle cellStyleByIndex(XLStyleIndex index) const;
2032
2038 XLCellStyle operator[](XLStyleIndex index) const { return cellStyleByIndex(index); }
2039
2046 XLStyleIndex create(XLCellStyle copyFrom = XLCellStyle{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
2047
2048 private: // ---------- Private Member Variables ---------- //
2049 std::unique_ptr<XMLNode> m_cellStylesNode;
2050 std::vector<XLCellStyle> m_cellStyles;
2051 };
2052
2053 // XLDxfs Class
2054
2058 class OPENXLSX_EXPORT XLDxf
2059 {
2060 friend class XLDxfs;
2061
2062 public:
2066 XLDxf();
2067
2072 explicit XLDxf(const XMLNode& node);
2073
2078 XLDxf(const XLDxf& other);
2079
2084 XLDxf(XLDxf&& other) noexcept;
2085
2090
2096 XLDxf& operator=(const XLDxf& other);
2097
2103 XLDxf& operator=(XLDxf&& other) noexcept;
2104
2109 bool empty() const;
2110
2115 XLFont font() const;
2116 XLNumberFormat numFmt() const;
2117 XLFill fill() const;
2118 XLAlignment alignment() const;
2119 XLBorder border() const;
2120
2124 bool hasFont() const;
2125 bool hasNumFmt() const;
2126 bool hasFill() const;
2127 bool hasAlignment() const;
2128 bool hasBorder() const;
2129
2133 void clearFont();
2134 void clearNumFmt();
2135 void clearFill();
2136 void clearAlignment();
2137 void clearBorder();
2138
2143
2147 bool setExtLst(XLUnsupportedElement const& newExtLst);
2148
2153 std::string summary() const;
2154
2158 XMLNode node() const { return m_dxfNode; }
2159
2160 private:
2161 std::unique_ptr<XMLDocument> m_xmlDocument;
2162 mutable XMLNode m_dxfNode;
2163 };
2164
2169
2173 class OPENXLSX_EXPORT XLDxfs
2174 {
2175 public:
2179 XLDxfs();
2180
2185 explicit XLDxfs(const XMLNode& node);
2186
2191 XLDxfs(const XLDxfs& other);
2192
2197 XLDxfs(XLDxfs&& other);
2198
2202 ~XLDxfs();
2203
2209 XLDxfs& operator=(const XLDxfs& other);
2210
2216 XLDxfs& operator=(XLDxfs&& other) noexcept;
2217
2222 size_t count() const;
2223
2228 XLDxf dxfByIndex(XLStyleIndex index) const;
2229
2235 XLDxf operator[](XLStyleIndex index) const { return dxfByIndex(index); }
2236
2243 XLStyleIndex create(XLDxf copyFrom = XLDxf{}, std::string_view styleEntriesPrefix = XLDefaultStyleEntriesPrefix);
2244
2245 private:
2246 mutable XMLNode m_dxfsNode;
2247 std::vector<XLDxf> m_dxfs;
2248 };
2249
2254
2255 // XLStyles Class
2256
2260 class OPENXLSX_EXPORT XLStyles : public XLXmlFile
2261 {
2262 public: // ---------- Public Member Functions ---------- //
2266 XLStyles();
2267
2275 explicit XLStyles(gsl::not_null<XLXmlData*> xmlData,
2276 bool suppressWarnings = false,
2277 std::string_view stylesPrefix = XLDefaultStylesPrefix);
2278
2282 ~XLStyles();
2283
2288 XLStyles(XLStyles&& other) noexcept;
2289
2294 XLStyles(const XLStyles& other);
2295
2301 XLStyles& operator=(XLStyles&& other) noexcept;
2302
2308 XLStyles& operator=(const XLStyles& other);
2309
2315 uint32_t createNumberFormat(std::string_view formatCode);
2316
2321 XLNumberFormats& numberFormats() const;
2322
2327 XLFonts& fonts() const;
2328
2333 XLFills& fills() const;
2334
2339 XLBorders& borders() const;
2340
2345 XLCellFormats& cellStyleFormats() const;
2346
2351 XLCellFormats& cellFormats() const;
2352
2357 XLCellStyles& cellStyles() const;
2358
2363 XLDxfs& dxfs() const;
2364
2368 XLDxfs& diffCellFormats() const { return dxfs(); }
2369
2375 XLStyleIndex addDxf(const XLDxf& dxf);
2376
2386 XLStyleIndex addNamedStyle(std::string_view name,
2387 std::optional<XLStyleIndex> fontId = std::nullopt,
2388 std::optional<XLStyleIndex> fillId = std::nullopt,
2389 std::optional<XLStyleIndex> borderId = std::nullopt,
2390 std::optional<XLStyleIndex> numFmtId = std::nullopt);
2391
2397 XLStyleIndex namedStyle(std::string_view name) const;
2398
2409 XLStyleIndex findOrCreateStyle(const XLStyle& style);
2410
2411 // ---------- Protected Member Functions ---------- //
2412 private:
2413 bool m_suppressWarnings; // if true, will suppress output of warnings where supported
2414 std::unique_ptr<XLNumberFormats> m_numberFormats; // handle to the underlying number formats
2415 std::unique_ptr<XLFonts> m_fonts; // handle to the underlying fonts
2416 std::unique_ptr<XLFills> m_fills; // handle to the underlying fills
2417 std::unique_ptr<XLBorders> m_borders; // handle to the underlying border descriptions
2418 std::unique_ptr<XLCellFormats> m_cellStyleFormats; // handle to the underlying cell style formats descriptions
2419 std::unique_ptr<XLCellFormats> m_cellFormats; // handle to the underlying cell formats descriptions
2420 std::unique_ptr<XLCellStyles> m_cellStyles; // handle to the underlying cell styles
2421 std::unique_ptr<XLDxfs> m_dxfs; // handle to the underlying differential cell formats
2422 };
2423} // namespace OpenXLSX
2424
2425#ifdef _MSC_VER // conditionally enable MSVC specific pragmas to avoid other compilers warning about unknown pragmas
2426# pragma warning(pop)
2427#endif // _MSC_VER
2428
2429#endif // OPENXLSX_XLSTYLES_HPP
XLXmlData * xmlData
Definition XLDocument.cpp:1422
Definition XLXmlParser.hpp:84
An encapsulation of an alignment item.
Definition XLStyles.hpp:1423
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:1194
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:1333
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:1395
An encapsulation of a cell format item.
Definition XLStyles.hpp:1562
XLUnsupportedElement extLst() const
Unsupported getter.
Definition XLStyles.hpp:1715
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:1758
XLCellFormat operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to cellFormatByIndex.
Definition XLStyles.hpp:1821
XLCellFormats & operator=(XLCellFormats &&other) noexcept=default
Move assignment operator.
An encapsulation of a cell style item.
Definition XLStyles.hpp:1852
XLUnsupportedElement extLst() const
Unsupported getter.
Definition XLStyles.hpp:1945
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:1977
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:2038
Definition XLColor.hpp:22
An encapsulation of an XLSX Data Bar Color (CT_Color) item.
Definition XLStyles.hpp:643
bool set(XLColor newColor)
Definition XLStyles.hpp:712
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:2059
XLUnsupportedElement extLst() const
Unsupported getter.
Definition XLStyles.hpp:2142
~XLDxf()
Destructor.
XMLNode node() const
Access the underlying XML node.
Definition XLStyles.hpp:2158
An encapsulation of the XLSX differential cell formats (dxfs)
Definition XLStyles.hpp:2174
XLDxf operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to dxfByIndex.
Definition XLStyles.hpp:2235
An encapsulation of a fill item.
Definition XLStyles.hpp:891
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:1025
XLFill operator[](XLStyleIndex index) const
Operator overload: allow [] as shortcut access to fillByIndex.
Definition XLStyles.hpp:1087
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:549
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:611
An encapsulation of an fill::gradientFill::stop item.
Definition XLStyles.hpp:734
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:808
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:870
An encapsulation of a line item.
Definition XLStyles.hpp:1115
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:2261
XLDxfs & diffCellFormats() const
Backward compatibility alias for dxfs()
Definition XLStyles.hpp:2368
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