OpenWord 1.0.0
Modern C++17 library for parsing, manipulating, and saving DOCX files.
Loading...
Searching...
No Matches
Document.h
Go to the documentation of this file.
1#pragma once
2
3#include "Validator.h"
4
5#include <gsl/gsl>
6#include <map>
7#include <memory>
8#include <string>
9#include <variant>
10#include <vector>
11
12namespace openword {
13
14class Paragraph;
15class Table;
16
18
19class Section;
20
21using BlockElement = std::variant<Paragraph, Table, Section>;
22
23enum class HighlightColor {
24 Yellow,
25 Green,
26 Cyan,
27 Magenta,
28 Blue,
29 Red,
34 DarkRed,
38 Black,
40};
41
42struct Color {
43 uint8_t r{0};
44 uint8_t g{0};
45 uint8_t b{0};
46 bool is_auto{true};
47
48 Color() = default;
49 Color(uint8_t red, uint8_t green, uint8_t blue) : r(red), g(green), b(blue), is_auto(false) {}
50
51 static Color Auto() { return Color(); }
52 std::string hex() const;
53};
54
56
58
59struct Margins {
60 int top = 1440;
61 int right = 1440;
62 int bottom = 1440;
63 int left = 1440;
64 int header = 720;
65 int footer = 720;
66 int gutter = 0;
67};
68
69enum class ListType { None, Bullet, Numbered };
70
72
76 int size = 4; // 1/8 points
77 std::string color = "auto";
78};
79
81enum class HeightRule { Auto, AtLeast, Exact };
82
84 enum class Type { Text, Integer, Boolean, Double, Date };
86 std::string value; // String representation
87};
88
89struct Metadata {
90 // --- Core Properties (Summary tab) ---
91 std::string title;
92 std::string subject;
93 std::string author; // Creator
94 std::string keywords;
95 std::string comments; // Description
96 std::string lastModifiedBy;
97 std::string category;
98
99 // --- Extended Properties (Summary/Content tab) ---
100 std::string company;
101 std::string manager;
102 std::string hyperlinkBase;
103
104 // --- Custom Properties (Custom tab) ---
105 std::map<std::string, CustomProperty> customProperties;
106};
107
108class Font {
109 public:
110 explicit Font(void *node);
111 Font &setSize(int halfPoints);
112 Font &setBold(bool val = true);
113 Font &setItalic(bool val = true);
114 Font &setColor(const std::string &hexColor);
115 Font &setName(const std::string &ascii);
116
117 private:
118 void *node_;
119};
120
122 public:
123 explicit ParagraphFormat(void *node);
125 ParagraphFormat &setSpacing(int beforeTwips, int afterTwips);
126
127 private:
128 void *node_;
129};
130
131class Style {
132 public:
133 explicit Style(void *node);
136
137 // Core Identity
138 Style &setName(const std::string &name);
139
140 // Inheritance & Flow
141 Style &setBasedOn(const std::string &parentStyleId);
142 Style &setNextStyle(const std::string &nextStyleId);
143
144 // UI Controls
145 Style &setPrimary(bool isPrimary = true); // Shows up in Quick Styles gallery
146 Style &setUiPriority(int priority);
147 Style &setHidden(bool isHidden = true);
148
149 private:
150 void *node_;
151};
152
154 public:
155 explicit StyleCollection(void *node);
156
157 // Default document properties (w:docDefaults)
163
168
169 Style get(const std::string &styleId);
170 Style add(const std::string &styleId, const std::string &type = "paragraph");
171
172 private:
173 void *node_;
174};
175
176enum class ImagePosition {
177 Inline, // In line with text
178 BehindText, // Floating behind text
179 InFrontOfText // Floating in front of text
180};
181
182class Paragraph;
183class Header {
184 public:
185 explicit Header(void *node);
186 Paragraph addParagraph(const std::string &text = "");
187 void addHtml(const std::string &html);
188
189 private:
190 void *node_;
191};
192
193class Footer {
194 public:
195 explicit Footer(void *node);
196 Paragraph addParagraph(const std::string &text = "");
197 void addHtml(const std::string &html);
198
199 private:
200 void *node_;
201};
202
203class Section {
204 public:
205 explicit Section(void *node);
206 Section &setPageSize(uint32_t w_twips, uint32_t h_twips, Orientation orient = Orientation::Portrait);
207 Section &setMargins(const Margins &margins);
208
211
212 // --- Header/Footer Controls ---
217
222
223 Section &setColumns(int count, int spaceTwips = 720);
224
225 private:
226 void *node_;
227};
228
233class Cell;
234class Row {
235 public:
236 explicit Row(void *node);
238 Row &setRepeatHeaderRow(bool repeat = true);
239 Row &setCantSplit(bool cantSplit = true);
240
241 // --- Data Extraction ---
242 std::vector<Cell> cells() const;
243 std::string text() const;
244
245 // --- DOM Mutability ---
246 void remove();
248 int replaceText(const std::string &search, const std::string &replace);
249
250 private:
251 void *node_;
252};
253
254class Cell;
255class Table;
256class Run {
257 public:
258 explicit Run(void *node); // Internal use
259
260 Run &setText(const std::string &text);
261
262 // --- Font Properties ---
263 Run &setFontFamily(gsl::czstring ascii, gsl::czstring eastAsia = "");
264 Run &setFontSize(int halfPoints);
265 Run &setColor(const Color &color);
266
267 // --- Text Styles ---
268 Run &setBold(bool val = true);
269 Run &setItalic(bool val = true);
270 Run &setUnderline(gsl::czstring val = "single");
271 Run &setStrike(bool val = true);
272 Run &setDoubleStrike(bool val = true);
281 Run &addComment(int commentId);
282
283 // --- Breaks ---
289
295
296 // --- Backgrounds ---
297 Run &setHighlight(gsl::czstring color); // e.g. "yellow", "cyan"
298 Run &setShading(const Color &fillColor);
299
300 // --- Data Extractors ---
301 bool isBold() const;
302 bool isItalic() const;
303 bool isStrike() const;
305 std::string text() const;
306
308 int footnoteId() const;
309 bool isEndnoteReference() const;
310 int endnoteId() const;
311
312 private:
313 void *node_;
314};
315
320class TextBox;
321
323 public:
324 explicit Paragraph(void *node); // Internal use
325
326 Run addRun(const std::string &text = "");
327 void addRawXml(const std::string &xml);
333
339
348 void addImage(gsl::czstring image_path, double scale = 1.0, ImagePosition position = ImagePosition::Inline,
349 long long xOffset = 0, long long yOffset = 0);
350
355 void addEquation(const std::string &omml);
356
357 Paragraph &setStyle(gsl::czstring styleId);
358 Paragraph &setOutlineLevel(int level); // 0 = Level 1 (Heading 1), 1 = Level 2, etc.
359 Paragraph &setAlignment(gsl::czstring align); // "left", "center", "right", "both"
360 Paragraph &setSpacing(int beforeTwips, int afterTwips, int lineSpacing = -1, gsl::czstring lineRule = "auto");
361 Paragraph &setIndentation(int leftTwips, int rightTwips, int firstLineTwips = 0, int hangingTwips = 0);
362 Paragraph &setList(int numId, int level = 0);
363
364 // --- Borders & Shading ---
365 Paragraph &setBorders(const BorderSettings &top, const BorderSettings &bottom, const BorderSettings &left,
366 const BorderSettings &right);
368 Paragraph &setShading(const std::string &hexColor);
369
370 // --- Text Box ---
371 TextBox addTextBox(long long widthEMU, long long heightEMU, long long xOffsetEMU = 0, long long yOffsetEMU = 0);
372
373 Run addHyperlink(gsl::czstring text, gsl::czstring url);
374 Run addInternalLink(gsl::czstring text, gsl::czstring bookmarkName);
375 void insertBookmark(gsl::czstring name);
376 void addFootnoteReference(int footnoteId);
377 void addEndnoteReference(int endnoteId);
378
380
381 // --- DOM Traversal & Data Extractors ---
382 std::string styleId() const;
383 std::string alignment() const;
384 bool isList() const;
385 int listLevel() const;
386 std::vector<Run> runs() const;
387 std::string text() const;
388 int replaceText(const std::string &search, const std::string &replace);
389
390 // --- DOM Mutability ---
391 void remove();
393 Paragraph insertParagraphAfter(const std::string &text = "");
394 Table insertTableAfter(int rows, int cols);
395
396 private:
397 void *node_;
398};
399
403class Table;
404class Cell {
405 public:
406 explicit Cell(void *node);
407
408 // --- Content Creation ---
409 Paragraph addParagraph(const std::string &text = "");
410 void addHtml(const std::string &html);
411
418 Table addTable(int rows, int cols);
419 void addImage(gsl::czstring image_path, double scale = 1.0, ImagePosition position = ImagePosition::Inline,
420 long long xOffset = 0, long long yOffset = 0);
421
423 Cell &setShading(const std::string &hexColor);
424 Cell &setWidth(int twips, const std::string &type = "dxa");
425 Cell &setBorders(const BorderSettings &top, const BorderSettings &bottom, const BorderSettings &left,
426 const BorderSettings &right);
428
429 // --- Data Extraction & Manipulation ---
430 int gridSpan() const;
431 std::string vMerge() const;
432 std::vector<BlockElement> elements() const;
433 int replaceText(const std::string &search, const std::string &replace);
434 std::string text() const;
435 std::vector<Paragraph> paragraphs() const;
436
437 private:
438 void *node_;
439};
440
452class Table {
453 public:
454 explicit Table(void *node);
455
456 // --- Data Access & Traversal ---
457 Cell cell(int row, int col);
458 Row row(int rowIndex);
459 std::vector<Row> rows() const;
460 void mergeCells(int startRow, int startCol, int endRow, int endCol);
461
462 // --- Ergonomic Table Formatting ---
464 Table &setBorders(const BorderSettings &outer, const BorderSettings &inner);
465 Table &setBorders(const BorderSettings &top, const BorderSettings &bottom, const BorderSettings &left,
466 const BorderSettings &right, const BorderSettings &insideH, const BorderSettings &insideV);
467
468 Table &setColumnWidth(int colIndex, int twips);
469 Table &setColumnWidths(const std::vector<int> &twipsList);
470
471 Table &setAlignment(gsl::czstring align);
472
473 // --- Data Extraction & Manipulation ---
474 int gridSpan() const;
475 std::string vMerge() const;
476 std::vector<BlockElement> elements() const;
477 int replaceText(const std::string &search, const std::string &replace);
478 std::string text() const;
479
480 // --- DOM Mutability ---
481 void remove();
483 Paragraph insertParagraphAfter(const std::string &text = "");
484
485 private:
486 void *node_;
487};
488
494
495struct ListLevel {
496 int levelIndex = 0; // 0 to 8
498 std::string text; // e.g. "%1.", "%1.%2.", or bullet char
499 std::string jc = "left"; // Justification: left, center, right
500 int indentTwips = 720;
501 int hangingTwips = 360;
502 std::string fontAscii = ""; // Specific font for bullets, e.g. "Symbol"
503};
504
506 public:
507 explicit AbstractNumbering(void *node);
509
510 private:
511 void *node_;
512};
513
515 public:
516 explicit NumberingCollection(void *node);
517
518 // --- Abstract Data ---
520 int addList(int abstractNumId, int restartNumId = -1);
521
522 // --- High-Level Ergonomic API ---
525
526 private:
527 void *node_;
528};
529
530class TextBox {
531 public:
532 explicit TextBox(void *node);
533
534 // TextBox acts as a miniature container
535 Paragraph addParagraph(const std::string &text = "");
536 void addHtml(const std::string &html);
537
538 TextBox &setFillColor(const std::string &hexColor);
539 TextBox &setLineColor(const std::string &hexColor);
540
541 private:
542 void *node_;
543};
544
545enum class ChartType { Bar, Line, Pie, Area, Scatter };
546
548
550
552
564
566 std::string name;
567 std::vector<std::string> categories;
568 std::vector<double> xValues;
569 std::vector<double> values;
570 std::string colorHex; // Empty string means auto
571};
572
573class Chart {
574 public:
575 explicit Chart(void *node);
576 std::string relId() const;
577
578 private:
579 void *node_;
580};
581
588class Document {
589 public:
591 explicit Document(const std::string &templatePath);
593
594 // Disable copy for safety (RAII)
595 Document(const Document &) = delete;
596 Document &operator=(const Document &) = delete;
597
598 // --- IO Operations ---
599 bool save(gsl::czstring filepath);
600 bool load(gsl::czstring filepath);
601 bool validate(gsl::czstring partName, const SchemaValidator &validator, std::string &outErrors) const;
602
603 void setEvenAndOddHeaders(bool val = true);
604
605 // --- Content Creation ---
606 Paragraph addParagraph(const std::string &text = "");
607 void addHtml(const std::string &html);
608
615 Table addTable(int rows, int cols);
616
617 // --- DOM Traversal & Extraction ---
618 std::vector<BlockElement> elements() const;
620 std::vector<Paragraph> paragraphs() const;
621 std::vector<Table> tables() const;
622
623 std::vector<Chart> charts() const;
624
628 std::map<int, std::string> footnotes() const;
629
633 std::map<int, std::string> endnotes() const;
634
635 void setMetadata(const Metadata &meta);
637
638 void addTableOfContents(gsl::czstring title = "Table of Contents", int max_levels = 3,
639 TOCLeader leader = TOCLeader::Dot);
640 void addWatermark(const std::string &text);
641
642 Chart addChart(ChartType type, const std::vector<ChartSeries> &series, const ChartOptions &options = ChartOptions());
643
644 int createFootnote(const std::string &text);
652 int createComment(const std::string &text, const std::string &author = "Author", const std::string &initials = "");
653 int createEndnote(const std::string &text);
654
657
663 void addStyle(gsl::czstring styleId, gsl::czstring name);
664
665 // --- Utilities ---
666 std::string convertMathMLToOMML(const std::string &mathml) const;
667 std::string convertLaTeXToOMML(const std::string &latex) const;
668 int replaceText(const std::string &search, const std::string &replace);
677 int cloneRowAndSetValues(const std::string &search, const std::vector<std::map<std::string, std::string>> &values);
682 private:
683 struct Impl;
684 std::unique_ptr<Impl> pimpl;
685};
686
687} // namespace openword
Definition Document.h:505
AbstractNumbering & addLevel(const ListLevel &level)
Definition Document.h:404
Cell & setShading(const std::string &hexColor)
Cell & setBorders(const BorderSettings &all)
void addHtml(const std::string &html)
Cell & setWidth(int twips, const std::string &type="dxa")
Paragraph addParagraph(const std::string &text="")
void addImage(gsl::czstring image_path, double scale=1.0, ImagePosition position=ImagePosition::Inline, long long xOffset=0, long long yOffset=0)
Cell & setBorders(const BorderSettings &top, const BorderSettings &bottom, const BorderSettings &left, const BorderSettings &right)
int replaceText(const std::string &search, const std::string &replace)
Table addTable(int rows, int cols)
Nests a new table inside this cell.
std::string text() const
std::string vMerge() const
std::vector< BlockElement > elements() const
Cell(void *node)
Cell & setVertAlign(VerticalAlignment align)
std::vector< Paragraph > paragraphs() const
int gridSpan() const
Definition Document.h:573
std::string relId() const
Chart(void *node)
Represents the main Office Open XML Word document (.docx).
Definition Document.h:588
Table addTable(int rows, int cols)
Nests a new table inside this cell.
std::vector< BlockElement > elements() const
std::vector< Table > tables() const
std::string convertMathMLToOMML(const std::string &mathml) const
void addHtml(const std::string &html)
void addWatermark(const std::string &text)
Document & operator=(const Document &)=delete
std::vector< Paragraph > paragraphs() const
std::string convertLaTeXToOMML(const std::string &latex) const
std::map< int, std::string > endnotes() const
Retrieves all endnotes in the document as a map of ID to text.
Document(const Document &)=delete
void addStyle(gsl::czstring styleId, gsl::czstring name)
Chart addChart(ChartType type, const std::vector< ChartSeries > &series, const ChartOptions &options=ChartOptions())
std::vector< Chart > charts() const
void setEvenAndOddHeaders(bool val=true)
int cloneRowAndSetValues(const std::string &search, const std::vector< std::map< std::string, std::string > > &values)
Template Engine: Clones a table row containing the search string. Generates a new row for each elemen...
Paragraph addParagraph(const std::string &text="")
bool validate(gsl::czstring partName, const SchemaValidator &validator, std::string &outErrors) const
void addTableOfContents(gsl::czstring title="Table of Contents", int max_levels=3, TOCLeader leader=TOCLeader::Dot)
Document(const std::string &templatePath)
bool save(gsl::czstring filepath)
void setMetadata(const Metadata &meta)
bool load(gsl::czstring filepath)
int createComment(const std::string &text, const std::string &author="Author", const std::string &initials="")
Creates a new comment in the document's global comments registry.
int replaceText(const std::string &search, const std::string &replace)
NumberingCollection numbering()
Section finalSection()
StyleCollection styles()
Metadata metadata() const
int createFootnote(const std::string &text)
std::map< int, std::string > footnotes() const
Retrieves all footnotes in the document as a map of ID to text.
int createEndnote(const std::string &text)
Definition Document.h:108
Font(void *node)
Font & setItalic(bool val=true)
Font & setName(const std::string &ascii)
Font & setBold(bool val=true)
Font & setColor(const std::string &hexColor)
Font & setSize(int halfPoints)
Definition Document.h:193
Footer(void *node)
void addHtml(const std::string &html)
Paragraph addParagraph(const std::string &text="")
Definition Document.h:183
Header(void *node)
void addHtml(const std::string &html)
Paragraph addParagraph(const std::string &text="")
Definition Document.h:514
int addList(int abstractNumId, int restartNumId=-1)
AbstractNumbering addAbstractNumbering(int abstractNumId)
Definition Document.h:121
ParagraphFormat & setOutlineLevel(int level)
ParagraphFormat & setSpacing(int beforeTwips, int afterTwips)
Definition Document.h:322
Run addPageNumber()
Injects a dynamic PAGE field code to display the current page number.
Paragraph & setAlignment(gsl::czstring align)
bool isList() const
Run addRun(const std::string &text="")
Paragraph & setOutlineLevel(int level)
void insertBookmark(gsl::czstring name)
Section appendSectionBreak()
void addEndnoteReference(int endnoteId)
TextBox addTextBox(long long widthEMU, long long heightEMU, long long xOffsetEMU=0, long long yOffsetEMU=0)
Paragraph(void *node)
int listLevel() const
std::vector< Run > runs() const
void addImage(gsl::czstring image_path, double scale=1.0, ImagePosition position=ImagePosition::Inline, long long xOffset=0, long long yOffset=0)
Adds an image to the paragraph.
Paragraph & setStyle(gsl::czstring styleId)
Paragraph & setSpacing(int beforeTwips, int afterTwips, int lineSpacing=-1, gsl::czstring lineRule="auto")
std::string styleId() const
Paragraph & setList(int numId, int level=0)
Run addTotalPages()
Injects a dynamic NUMPAGES field code to display the total document page count.
Run addHyperlink(gsl::czstring text, gsl::czstring url)
Paragraph & setBorders(const BorderSettings &all)
Run addInternalLink(gsl::czstring text, gsl::czstring bookmarkName)
Paragraph & setIndentation(int leftTwips, int rightTwips, int firstLineTwips=0, int hangingTwips=0)
Paragraph cloneAfter()
void addEquation(const std::string &omml)
Adds a raw OMML (Office Math Markup Language) equation to the paragraph.
std::string alignment() const
std::string text() const
void addFootnoteReference(int footnoteId)
Table insertTableAfter(int rows, int cols)
int replaceText(const std::string &search, const std::string &replace)
Paragraph & setBorders(const BorderSettings &top, const BorderSettings &bottom, const BorderSettings &left, const BorderSettings &right)
Paragraph & setShading(const std::string &hexColor)
void addRawXml(const std::string &xml)
Paragraph insertParagraphAfter(const std::string &text="")
Definition Document.h:234
Row & setCantSplit(bool cantSplit=true)
Row(void *node)
std::vector< Cell > cells() const
Row & setHeight(int twips, HeightRule rule=HeightRule::AtLeast)
int replaceText(const std::string &search, const std::string &replace)
std::string text() const
Row & setRepeatHeaderRow(bool repeat=true)
Definition Document.h:256
HighlightColor highlightColor() const
bool isBold() const
std::string text() const
int footnoteId() const
Run & addPageBreak()
Inserts a hard page break (<w:br w:type="page"/>) pushing subsequent text to the next page.
bool isItalic() const
Run & setBold(bool val=true)
Run & setColor(const Color &color)
Run & setStrike(bool val=true)
Run & setUnderline(gsl::czstring val="single")
Run & setHighlight(HighlightColor color)
Run(void *node)
bool isEndnoteReference() const
Run & setFontSize(int halfPoints)
Run & setCharacterSpacing(int twips)
Run & setItalic(bool val=true)
bool isFootnoteReference() const
bool isStrike() const
Run & addLineBreak()
Inserts a soft line break (<w:br/>) in the current run (equivalent to Shift+Enter).
Run & setFontFamily(gsl::czstring ascii, gsl::czstring eastAsia="")
Run & setVertAlign(VertAlign align)
int endnoteId() const
Run & setHighlight(gsl::czstring color)
Run & addComment(int commentId)
Anchors an existing comment to this specific text run.
Run & setText(const std::string &text)
Run & setDoubleStrike(bool val=true)
Run & setShading(const Color &fillColor)
Definition Validator.h:8
Definition Document.h:203
Section & removeHeader(HeaderFooterType type=HeaderFooterType::Default)
Removes the header of the specified type from this section and blocks inheritance from previous secti...
Section(void *node)
Section & setMargins(const Margins &margins)
Footer addFooter(HeaderFooterType type=HeaderFooterType::Default)
Section & removeFooter(HeaderFooterType type=HeaderFooterType::Default)
Removes the footer of the specified type from this section and blocks inheritance.
Section & setColumns(int count, int spaceTwips=720)
Section & setPageSize(uint32_t w_twips, uint32_t h_twips, Orientation orient=Orientation::Portrait)
Header addHeader(HeaderFooterType type=HeaderFooterType::Default)
Definition Document.h:153
ParagraphFormat getDefaultParagraphFormat()
Retrieves the global document default paragraph format settings (w:docDefaults/w:pPrDefault).
Style get(const std::string &styleId)
Style add(const std::string &styleId, const std::string &type="paragraph")
Font getDefaultFont()
Retrieves the global document default font settings (w:docDefaults/w:rPrDefault). Modifying this affe...
Definition Document.h:131
Style & setUiPriority(int priority)
Style & setHidden(bool isHidden=true)
Style & setPrimary(bool isPrimary=true)
Style & setBasedOn(const std::string &parentStyleId)
ParagraphFormat getParagraphFormat()
Style & setNextStyle(const std::string &nextStyleId)
Style(void *node)
Style & setName(const std::string &name)
Represents a Table in the Word document.
Definition Document.h:452
Table & setBorders(const BorderSettings &top, const BorderSettings &bottom, const BorderSettings &left, const BorderSettings &right, const BorderSettings &insideH, const BorderSettings &insideV)
Table & setBorders(const BorderSettings &all)
int replaceText(const std::string &search, const std::string &replace)
Paragraph insertParagraphAfter(const std::string &text="")
Cell cell(int row, int col)
Table & setColumnWidths(const std::vector< int > &twipsList)
std::vector< BlockElement > elements() const
int gridSpan() const
Table & setAlignment(gsl::czstring align)
std::string text() const
std::string vMerge() const
Table cloneAfter()
Row row(int rowIndex)
Table & setColumnWidth(int colIndex, int twips)
Table & setBorders(const BorderSettings &outer, const BorderSettings &inner)
std::vector< Row > rows() const
Table(void *node)
void mergeCells(int startRow, int startCol, int endRow, int endCol)
Definition Document.h:530
TextBox & setFillColor(const std::string &hexColor)
void addHtml(const std::string &html)
Paragraph addParagraph(const std::string &text="")
TextBox & setLineColor(const std::string &hexColor)
TextBox(void *node)
Definition Document.h:12
BorderStyle
Definition Document.h:73
LegendPosition
Definition Document.h:547
ImagePosition
Definition Document.h:176
ChartType
Definition Document.h:545
ScatterStyle
Definition Document.h:551
NumberingFormat
Represents a Microsoft Word Document (.docx)
Definition Document.h:493
HighlightColor
Definition Document.h:23
Orientation
Definition Document.h:57
TOCLeader
Definition Document.h:17
ListType
Definition Document.h:69
std::variant< Paragraph, Table, Section > BlockElement
Definition Document.h:21
VertAlign
Definition Document.h:55
VerticalAlignment
Definition Document.h:80
AreaGrouping
Definition Document.h:549
HeaderFooterType
Definition Document.h:71
HeightRule
Definition Document.h:81
Definition Document.h:74
BorderStyle style
Definition Document.h:75
std::string color
Definition Document.h:77
int size
Definition Document.h:76
Definition Document.h:553
std::string title
Definition Document.h:554
AreaGrouping areaGrouping
Definition Document.h:562
bool smoothLines
Definition Document.h:561
bool showDataLabels
Definition Document.h:556
int widthTwips
Definition Document.h:557
LegendPosition legendPos
Definition Document.h:555
int heightTwips
Definition Document.h:558
ScatterStyle scatterStyle
Definition Document.h:560
Definition Document.h:565
std::vector< double > xValues
Definition Document.h:568
std::vector< std::string > categories
Definition Document.h:567
std::vector< double > values
Definition Document.h:569
std::string name
Definition Document.h:566
std::string colorHex
Definition Document.h:570
Definition Document.h:42
uint8_t g
Definition Document.h:44
bool is_auto
Definition Document.h:46
Color(uint8_t red, uint8_t green, uint8_t blue)
Definition Document.h:49
Color()=default
static Color Auto()
Definition Document.h:51
uint8_t r
Definition Document.h:43
uint8_t b
Definition Document.h:45
std::string hex() const
Definition Document.h:83
Type
Definition Document.h:84
std::string value
Definition Document.h:86
Type type
Definition Document.h:85
Definition Document.h:495
NumberingFormat format
Definition Document.h:497
int levelIndex
Definition Document.h:496
std::string jc
Definition Document.h:499
std::string fontAscii
Definition Document.h:502
int indentTwips
Definition Document.h:500
std::string text
Definition Document.h:498
int hangingTwips
Definition Document.h:501
Definition Document.h:59
int bottom
Definition Document.h:62
int top
Definition Document.h:60
int footer
Definition Document.h:65
int header
Definition Document.h:64
int gutter
Definition Document.h:66
int right
Definition Document.h:61
int left
Definition Document.h:63
Definition Document.h:89
std::string author
Definition Document.h:93
std::string title
Definition Document.h:91
std::string manager
Definition Document.h:101
std::string keywords
Definition Document.h:94
std::string company
Definition Document.h:100
std::string hyperlinkBase
Definition Document.h:102
std::string category
Definition Document.h:97
std::string comments
Definition Document.h:95
std::string lastModifiedBy
Definition Document.h:96
std::string subject
Definition Document.h:92
std::map< std::string, CustomProperty > customProperties
Definition Document.h:105