VSDStyles.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2/*
3 * This file is part of the libvisio project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10#ifndef __VSDSTYLES_H__
11#define __VSDSTYLES_H__
12
13#include <map>
14#include <vector>
15#include <optional>
16#include "VSDTypes.h"
17#include "VSDXTheme.h"
18#include "libvisio_utils.h"
19
20 namespace libvisio
21{
22
23 struct VSDOptionalLineStyle
24{
25 VSDOptionalLineStyle() :
26 width(), colour(), pattern(), startMarker(), endMarker(), cap(), rounding(),
27 qsLineColour(), qsLineMatrix() {}
28 VSDOptionalLineStyle(const std::optional<double> &w, const std::optional<Colour> &col,
29 const std::optional<unsigned char> &p, const std::optional<unsigned char> &sm,
30 const std::optional<unsigned char> &em, const std::optional<unsigned char> &c,
31 const std::optional<double> &r, const std::optional<long> &qlc,
32 const std::optional<long> &qlm) :
33 width(w), colour(col), pattern(p), startMarker(sm), endMarker(em), cap(c), rounding(r),
34 qsLineColour(qlc), qsLineMatrix(qlm) {}
35 VSDOptionalLineStyle(const VSDOptionalLineStyle &style) = default;
36 ~VSDOptionalLineStyle() {}
37 VSDOptionalLineStyle &operator=(const VSDOptionalLineStyle &style) = default;
38 void override(const VSDOptionalLineStyle &style)
39 {
40 ASSIGN_OPTIONAL(style.width, width);
41 ASSIGN_OPTIONAL(style.colour, colour);
42 ASSIGN_OPTIONAL(style.pattern, pattern);
43 ASSIGN_OPTIONAL(style.startMarker, startMarker);
44 ASSIGN_OPTIONAL(style.endMarker, endMarker);
45 ASSIGN_OPTIONAL(style.cap, cap);
46 ASSIGN_OPTIONAL(style.rounding, rounding);
47 ASSIGN_OPTIONAL(style.qsLineColour, qsLineColour);
48 ASSIGN_OPTIONAL(style.qsLineMatrix, qsLineMatrix);
49 }
50
51 std::optional<double> width;
52 std::optional<Colour> colour;
53 std::optional<unsigned char> pattern;
54 std::optional<unsigned char> startMarker;
55 std::optional<unsigned char> endMarker;
56 std::optional<unsigned char> cap;
57 std::optional<double> rounding;
58 std::optional<long> qsLineColour;
59 std::optional<long> qsLineMatrix;
60};
61
62 struct VSDLineStyle
63{
64 VSDLineStyle() :
65 width(0.01), colour(), pattern(1), startMarker(0), endMarker(0), cap(0),
66 rounding(0.0), qsLineColour(-1), qsLineMatrix(-1) {}
67 VSDLineStyle(double w, Colour col, unsigned char p, unsigned char sm,
68 unsigned char em, unsigned char c, double r, long qlc, long qlm) :
69 width(w), colour(col), pattern(p), startMarker(sm), endMarker(em), cap(c),
70 rounding(r), qsLineColour(qlc), qsLineMatrix(qlm) {}
71 VSDLineStyle(const VSDLineStyle &style) = default;
72 ~VSDLineStyle() {}
73 VSDLineStyle &operator=(const VSDLineStyle &style) = default;
74 void override(const VSDOptionalLineStyle &style, const VSDXTheme *theme)
75 {
76 ASSIGN_OPTIONAL(style.width, width);
77 ASSIGN_OPTIONAL(style.pattern, pattern);
78 ASSIGN_OPTIONAL(style.startMarker, startMarker);
79 ASSIGN_OPTIONAL(style.endMarker, endMarker);
80 ASSIGN_OPTIONAL(style.cap, cap);
81 ASSIGN_OPTIONAL(style.rounding, rounding);
82 ASSIGN_OPTIONAL(style.qsLineColour, qsLineColour);
83 ASSIGN_OPTIONAL(style.qsLineMatrix, qsLineMatrix);
84 if (theme)
85 {
86 if (!!style.qsLineColour && style.qsLineColour.value() >= 0)
87 ASSIGN_OPTIONAL(theme->getThemeColour(style.qsLineColour.value()), colour);
88 }
89 ASSIGN_OPTIONAL(style.colour, colour);
90 }
91
92 double width;
93 Colour colour;
94 unsigned char pattern;
95 unsigned char startMarker;
96 unsigned char endMarker;
97 unsigned char cap;
98 double rounding;
99 long qsLineColour;
100 long qsLineMatrix;
101};
102
103 struct VSDOptionalFillStyle
104{
105 VSDOptionalFillStyle() :
106 fgColour(), bgColour(), pattern(), fgTransparency(), bgTransparency(), shadowFgColour(),
107 shadowPattern(), shadowOffsetX(), shadowOffsetY(), qsFillColour(), qsShadowColour(),
108 qsFillMatrix(), variationColorIndex(), variationStyleIndex() {}
109 VSDOptionalFillStyle(const std::optional<Colour> &fgc, const std::optional<Colour> &bgc,
110 const std::optional<unsigned char> &p, const std::optional<double> &fga,
111 const std::optional<double> &bga, const std::optional<Colour> &sfgc,
112 const std::optional<unsigned char> &shp, const std::optional<double> &shX,
113 const std::optional<double> &shY, const std::optional<long> &qsFc,
114 const std::optional<long> &qsSc, const std::optional<long> &qsFm,
115 const std::optional<unsigned> &vCIn, const std::optional<unsigned> &vSIn) :
116 fgColour(fgc), bgColour(bgc), pattern(p), fgTransparency(fga), bgTransparency(bga),
117 shadowFgColour(sfgc), shadowPattern(shp), shadowOffsetX(shX), shadowOffsetY(shY),
118 qsFillColour(qsFc), qsShadowColour(qsSc), qsFillMatrix(qsFm), variationColorIndex(vCIn),
119 variationStyleIndex(vSIn) {}
120 VSDOptionalFillStyle(const VSDOptionalFillStyle &style) = default;
121 ~VSDOptionalFillStyle() {}
122 VSDOptionalFillStyle &operator=(const VSDOptionalFillStyle &style) = default;
123 void override(const VSDOptionalFillStyle &style)
124 {
125 ASSIGN_OPTIONAL(style.pattern, pattern);
126 ASSIGN_OPTIONAL(style.fgTransparency, fgTransparency);
127 ASSIGN_OPTIONAL(style.bgTransparency, bgTransparency);
128 ASSIGN_OPTIONAL(style.shadowPattern, shadowPattern);
129 ASSIGN_OPTIONAL(style.shadowOffsetX, shadowOffsetX);
130 ASSIGN_OPTIONAL(style.shadowOffsetY, shadowOffsetY);
131 ASSIGN_OPTIONAL(style.qsFillColour, qsFillColour);
132 ASSIGN_OPTIONAL(style.qsShadowColour, qsShadowColour);
133 ASSIGN_OPTIONAL(style.qsFillMatrix, qsFillMatrix);
134 ASSIGN_OPTIONAL(style.fgColour, fgColour);
135 ASSIGN_OPTIONAL(style.bgColour, bgColour);
136 ASSIGN_OPTIONAL(style.shadowFgColour, shadowFgColour);
137 ASSIGN_OPTIONAL(style.variationColorIndex, variationColorIndex);
138 ASSIGN_OPTIONAL(style.variationStyleIndex, variationStyleIndex);
139 }
140
141 std::optional<Colour> fgColour;
142 std::optional<Colour> bgColour;
143 std::optional<unsigned char> pattern;
144 std::optional<double> fgTransparency;
145 std::optional<double> bgTransparency;
146 std::optional<Colour> shadowFgColour;
147 std::optional<unsigned char> shadowPattern;
148 std::optional<double> shadowOffsetX;
149 std::optional<double> shadowOffsetY;
150 std::optional<long> qsFillColour;
151 std::optional<long> qsShadowColour;
152 std::optional<long> qsFillMatrix;
153 std::optional<unsigned> variationColorIndex;
154 std::optional<unsigned> variationStyleIndex;
155};
156
157 struct VSDFillStyle
158{
159 VSDFillStyle()
160 : fgColour(), bgColour(0xff, 0xff, 0xff, 0), pattern(0), fgTransparency(0),
161 bgTransparency(0), shadowFgColour(), shadowPattern(0), shadowOffsetX(0),
162 shadowOffsetY(0), qsFillColour(100), qsShadowColour(100), qsFillMatrix(-1),
163 variationColorIndex(0), variationStyleIndex(0) {}
164 VSDFillStyle(const Colour &fgc, const Colour &bgc, unsigned char p,
165 double fga, double bga, const Colour &sfgc, unsigned char shp,
166 double shX, double shY, long qsFc, long qsSc, long qsFm, unsigned vCIn, unsigned vSIn)
167 : fgColour(fgc), bgColour(bgc), pattern(p), fgTransparency(fga), bgTransparency(bga),
168 shadowFgColour(sfgc), shadowPattern(shp), shadowOffsetX(shX), shadowOffsetY(shY),
169 qsFillColour(qsFc), qsShadowColour(qsSc), qsFillMatrix(qsFm), variationColorIndex(vCIn),
170 variationStyleIndex(vSIn) {}
171 VSDFillStyle(const VSDFillStyle &style) = default;
172 ~VSDFillStyle() {}
173 VSDFillStyle &operator=(const VSDFillStyle &style) = default;
174 void override(const VSDOptionalFillStyle &style, const VSDXTheme *theme)
175 {
176 ASSIGN_OPTIONAL(style.pattern, pattern);
177 ASSIGN_OPTIONAL(style.fgTransparency, fgTransparency);
178 ASSIGN_OPTIONAL(style.bgTransparency, bgTransparency);
179 ASSIGN_OPTIONAL(style.shadowPattern, shadowPattern);
180 ASSIGN_OPTIONAL(style.shadowOffsetX, shadowOffsetX);
181 ASSIGN_OPTIONAL(style.shadowOffsetY, shadowOffsetY);
182 ASSIGN_OPTIONAL(style.shadowOffsetY, shadowOffsetY);
183 ASSIGN_OPTIONAL(style.qsFillColour, qsFillColour);
184 ASSIGN_OPTIONAL(style.qsShadowColour, qsShadowColour);
185 ASSIGN_OPTIONAL(style.qsFillMatrix, qsFillMatrix);
186 ASSIGN_OPTIONAL(style.variationColorIndex, variationColorIndex);
187 ASSIGN_OPTIONAL(style.variationStyleIndex, variationStyleIndex);
188 if (theme)
189 {
190 // Quick Style Colour 100 is special. It is the default,
191 // and it is not saved explicitely in the VSDX file.
192 ASSIGN_OPTIONAL(theme->getThemeColour(qsFillColour, variationColorIndex), fgColour);
193 ASSIGN_OPTIONAL(theme->getThemeColour(qsFillColour, variationColorIndex), bgColour);
194 ASSIGN_OPTIONAL(theme->getThemeColour(qsShadowColour, variationColorIndex), shadowFgColour);
195 if (!!style.qsFillMatrix && style.qsFillMatrix.value() >= 0)
196 {
197 ASSIGN_OPTIONAL(theme->getFillStyleColour(style.qsFillMatrix.value()), fgColour);
198 if (style.qsFillMatrix.value() > static_cast<long>(theme->getFillStyleLstSize()))
199 ASSIGN_OPTIONAL(theme->getStyleColour(qsFillColour, variationStyleIndex), fgColour);
200 }
201 else
202 ASSIGN_OPTIONAL(theme->getStyleColour(qsFillColour, variationStyleIndex), fgColour);
203 }
204 ASSIGN_OPTIONAL(style.fgColour, fgColour);
205 ASSIGN_OPTIONAL(style.bgColour, bgColour);
206 ASSIGN_OPTIONAL(style.shadowFgColour, shadowFgColour);
207 }
208
209 Colour fgColour;
210 Colour bgColour;
211 unsigned char pattern;
212 double fgTransparency;
213 double bgTransparency;
214 Colour shadowFgColour;
215 unsigned char shadowPattern;
216 double shadowOffsetX;
217 double shadowOffsetY;
218 long qsFillColour;
219 long qsShadowColour;
220 long qsFillMatrix;
221 unsigned variationColorIndex;
222 unsigned variationStyleIndex;
223};
224
225 struct VSDOptionalCharStyle
226{
227 VSDOptionalCharStyle()
228 : charCount(0), font(), colour(), size(), bold(), italic(),
229 underline(), doubleunderline(), strikeout(), doublestrikeout(),
230 allcaps(), initcaps(), smallcaps(), superscript(), subscript(),
231 scaleWidth() {}
232 VSDOptionalCharStyle(unsigned cc, const std::optional<VSDName> &ft,
233 const std::optional<Colour> &c, const std::optional<double> &s,
234 const std::optional<bool> &b, const std::optional<bool> &i,
235 const std::optional<bool> &u, const std::optional<bool> &du,
236 const std::optional<bool> &so, const std::optional<bool> &dso,
237 const std::optional<bool> &ac, const std::optional<bool> &ic,
238 const std::optional<bool> &sc, const std::optional<bool> &super,
239 const std::optional<bool> &sub, const std::optional<double> &sw) :
240 charCount(cc), font(ft), colour(c), size(s), bold(b), italic(i),
241 underline(u), doubleunderline(du), strikeout(so), doublestrikeout(dso),
242 allcaps(ac), initcaps(ic), smallcaps(sc), superscript(super),
243 subscript(sub), scaleWidth(sw) {}
244 VSDOptionalCharStyle(const VSDOptionalCharStyle &style) = default;
245 ~VSDOptionalCharStyle() {}
246 VSDOptionalCharStyle &operator=(const VSDOptionalCharStyle &style) = default;
247 void override(const VSDOptionalCharStyle &style)
248 {
249 ASSIGN_OPTIONAL(style.font, font);
250 ASSIGN_OPTIONAL(style.colour, colour);
251 ASSIGN_OPTIONAL(style.size, size);
252 ASSIGN_OPTIONAL(style.bold, bold);
253 ASSIGN_OPTIONAL(style.italic, italic);
254 ASSIGN_OPTIONAL(style.underline, underline);
255 ASSIGN_OPTIONAL(style.doubleunderline, doubleunderline);
256 ASSIGN_OPTIONAL(style.strikeout, strikeout);
257 ASSIGN_OPTIONAL(style.doublestrikeout, doublestrikeout);
258 ASSIGN_OPTIONAL(style.allcaps, allcaps);
259 ASSIGN_OPTIONAL(style.initcaps, initcaps);
260 ASSIGN_OPTIONAL(style.smallcaps, smallcaps);
261 ASSIGN_OPTIONAL(style.superscript, superscript);
262 ASSIGN_OPTIONAL(style.subscript, subscript);
263 ASSIGN_OPTIONAL(style.scaleWidth, scaleWidth);
264 }
265
266 unsigned charCount;
267 std::optional<VSDName> font;
268 std::optional<Colour> colour;
269 std::optional<double> size;
270 std::optional<bool> bold;
271 std::optional<bool> italic;
272 std::optional<bool> underline;
273 std::optional<bool> doubleunderline;
274 std::optional<bool> strikeout;
275 std::optional<bool> doublestrikeout;
276 std::optional<bool> allcaps;
277 std::optional<bool> initcaps;
278 std::optional<bool> smallcaps;
279 std::optional<bool> superscript;
280 std::optional<bool> subscript;
281 std::optional<double> scaleWidth;
282};
283
284 struct VSDCharStyle
285{
286 VSDCharStyle()
287 : charCount(0), font(), colour(), size(12.0/72.0), bold(false),
288 italic(false), underline(false), doubleunderline(false),
289 strikeout(false), doublestrikeout(false), allcaps(false),
290 initcaps(false), smallcaps(false), superscript(false),
291 subscript(false), scaleWidth(1.0) {}
292 VSDCharStyle(unsigned cc, const VSDName &ft, const Colour &c, double s,
293 bool b, bool i, bool u, bool du, bool so, bool dso, bool ac,
294 bool ic, bool sc, bool super, bool sub, double sw) :
295 charCount(cc), font(ft), colour(c), size(s), bold(b), italic(i),
296 underline(u), doubleunderline(du), strikeout(so), doublestrikeout(dso),
297 allcaps(ac), initcaps(ic), smallcaps(sc), superscript(super),
298 subscript(sub), scaleWidth(sw) {}
299 VSDCharStyle(const VSDCharStyle &style) = default;
300 ~VSDCharStyle() {}
301 VSDCharStyle &operator=(const VSDCharStyle &style) = default;
302 void override(const VSDOptionalCharStyle &style, const VSDXTheme * /* theme */)
303 {
304 ASSIGN_OPTIONAL(style.font, font);
305 ASSIGN_OPTIONAL(style.colour, colour);
306 ASSIGN_OPTIONAL(style.size, size);
307 ASSIGN_OPTIONAL(style.bold, bold);
308 ASSIGN_OPTIONAL(style.italic, italic);
309 ASSIGN_OPTIONAL(style.underline, underline);
310 ASSIGN_OPTIONAL(style.doubleunderline, doubleunderline);
311 ASSIGN_OPTIONAL(style.strikeout, strikeout);
312 ASSIGN_OPTIONAL(style.doublestrikeout, doublestrikeout);
313 ASSIGN_OPTIONAL(style.allcaps, allcaps);
314 ASSIGN_OPTIONAL(style.initcaps, initcaps);
315 ASSIGN_OPTIONAL(style.smallcaps, smallcaps);
316 ASSIGN_OPTIONAL(style.superscript, superscript);
317 ASSIGN_OPTIONAL(style.subscript, subscript);
318 ASSIGN_OPTIONAL(style.scaleWidth, scaleWidth);
319 }
320
321 unsigned charCount;
322 VSDName font;
323 Colour colour;
324 double size;
325 bool bold;
326 bool italic;
327 bool underline;
328 bool doubleunderline;
329 bool strikeout;
330 bool doublestrikeout;
331 bool allcaps;
332 bool initcaps;
333 bool smallcaps;
334 bool superscript;
335 bool subscript;
336 double scaleWidth;
337};
338
339 struct VSDOptionalParaStyle
340{
341 VSDOptionalParaStyle() :
342 charCount(0), indFirst(), indLeft(), indRight(), spLine(), spBefore(), spAfter(), align(), bullet(),
343 bulletStr(), bulletFont(), bulletFontSize(0.0), textPosAfterBullet(0.0), flags() {}
344 VSDOptionalParaStyle(unsigned cc, const std::optional<double> &ifst, const std::optional<double> &il,
345 const std::optional<double> &ir, const std::optional<double> &sl,
346 const std::optional<double> &sb, const std::optional<double> &sa,
347 const std::optional<unsigned char> &a, const std::optional<unsigned char> &b,
348 const std::optional<VSDName> &bs, const std::optional<VSDName> &bf,
349 const std::optional<double> bfs, const std::optional<double> &tpab,
350 const std::optional<unsigned> &f) :
351 charCount(cc), indFirst(ifst), indLeft(il), indRight(ir), spLine(sl), spBefore(sb), spAfter(sa),
352 align(a), bullet(b), bulletStr(bs), bulletFont(bf), bulletFontSize(bfs),
353 textPosAfterBullet(tpab), flags(f) {}
354 VSDOptionalParaStyle(const VSDOptionalParaStyle &style) = default;
355 ~VSDOptionalParaStyle() {}
356 VSDOptionalParaStyle &operator=(const VSDOptionalParaStyle &style) = default;
357 void override(const VSDOptionalParaStyle &style)
358 {
359 ASSIGN_OPTIONAL(style.indFirst, indFirst);
360 ASSIGN_OPTIONAL(style.indLeft, indLeft);
361 ASSIGN_OPTIONAL(style.indRight,indRight);
362 ASSIGN_OPTIONAL(style.spLine, spLine);
363 ASSIGN_OPTIONAL(style.spBefore, spBefore);
364 ASSIGN_OPTIONAL(style.spAfter, spAfter);
365 ASSIGN_OPTIONAL(style.align, align);
366 ASSIGN_OPTIONAL(style.bullet, bullet);
367 ASSIGN_OPTIONAL(style.bulletStr, bulletStr);
368 ASSIGN_OPTIONAL(style.bulletFont, bulletFont);
369 ASSIGN_OPTIONAL(style.bulletFontSize, bulletFontSize);
370 ASSIGN_OPTIONAL(style.textPosAfterBullet, textPosAfterBullet);
371 ASSIGN_OPTIONAL(style.flags, flags);
372 }
373
374 unsigned charCount;
375 std::optional<double> indFirst;
376 std::optional<double> indLeft;
377 std::optional<double> indRight;
378 std::optional<double> spLine;
379 std::optional<double> spBefore;
380 std::optional<double> spAfter;
381 std::optional<unsigned char> align;
382 std::optional<unsigned char> bullet;
383 std::optional<VSDName> bulletStr;
384 std::optional<VSDName> bulletFont;
385 std::optional<double> bulletFontSize;
386 std::optional<double> textPosAfterBullet;
387 std::optional<unsigned> flags;
388};
389
390 struct VSDParaStyle
391{
392 VSDParaStyle() :
393 charCount(0), indFirst(0.0), indLeft(0.0), indRight(0.0), spLine(-1.2), spBefore(0.0), spAfter(0.0), align(1),
394 bullet(0), bulletStr(), bulletFont(), bulletFontSize(0.0), textPosAfterBullet(0.0), flags(0) {}
395 VSDParaStyle(unsigned cc, double ifst, double il, double ir, double sl, double sb,
396 double sa, unsigned char a, unsigned b, const VSDName &bs,
397 const VSDName &bf, double bfs, double tpab, unsigned f) :
398 charCount(cc), indFirst(ifst), indLeft(il), indRight(ir), spLine(sl), spBefore(sb), spAfter(sa), align(a),
399 bullet(b), bulletStr(bs), bulletFont(bf), bulletFontSize(bfs), textPosAfterBullet(tpab), flags(f) {}
400 VSDParaStyle(const VSDParaStyle &style) = default;
401 ~VSDParaStyle() {}
402 VSDParaStyle &operator=(const VSDParaStyle &style) = default;
403 void override(const VSDOptionalParaStyle &style, const VSDXTheme * /* theme */)
404 {
405 ASSIGN_OPTIONAL(style.indFirst, indFirst);
406 ASSIGN_OPTIONAL(style.indLeft, indLeft);
407 ASSIGN_OPTIONAL(style.indRight,indRight);
408 ASSIGN_OPTIONAL(style.spLine, spLine);
409 ASSIGN_OPTIONAL(style.spBefore, spBefore);
410 ASSIGN_OPTIONAL(style.spAfter, spAfter);
411 ASSIGN_OPTIONAL(style.align, align);
412 ASSIGN_OPTIONAL(style.bullet, bullet);
413 ASSIGN_OPTIONAL(style.bulletStr, bulletStr);
414 ASSIGN_OPTIONAL(style.bulletFont, bulletFont);
415 ASSIGN_OPTIONAL(style.bulletFontSize, bulletFontSize);
416 ASSIGN_OPTIONAL(style.textPosAfterBullet, textPosAfterBullet);
417 ASSIGN_OPTIONAL(style.flags, flags);
418 }
419
420 unsigned charCount;
421 double indFirst;
422 double indLeft;
423 double indRight;
424 double spLine;
425 double spBefore;
426 double spAfter;
427 unsigned char align;
428 unsigned char bullet;
429 VSDName bulletStr;
430 VSDName bulletFont;
431 double bulletFontSize;
432 double textPosAfterBullet;
433 unsigned flags;
434};
435
436 struct VSDOptionalTextBlockStyle
437{
438 VSDOptionalTextBlockStyle() :
439 leftMargin(), rightMargin(), topMargin(), bottomMargin(), verticalAlign(), isTextBkgndFilled(),
440 textBkgndColour(), defaultTabStop(), textDirection() {}
441 VSDOptionalTextBlockStyle(const std::optional<double> &lm, const std::optional<double> &rm,
442 const std::optional<double> &tm, const std::optional<double> &bm,
443 const std::optional<unsigned char> &va, const std::optional<bool> &isBgFilled,
444 const std::optional<Colour> &bgClr, const std::optional<double> &defTab,
445 const std::optional<unsigned char> &td) :
446 leftMargin(lm), rightMargin(rm), topMargin(tm), bottomMargin(bm), verticalAlign(va),
447 isTextBkgndFilled(isBgFilled), textBkgndColour(bgClr), defaultTabStop(defTab), textDirection(td) {}
448 VSDOptionalTextBlockStyle(const VSDOptionalTextBlockStyle &style) = default;
449 ~VSDOptionalTextBlockStyle() {}
450 VSDOptionalTextBlockStyle &operator=(const VSDOptionalTextBlockStyle &style) = default;
451 void override(const VSDOptionalTextBlockStyle &style)
452 {
453 ASSIGN_OPTIONAL(style.leftMargin, leftMargin);
454 ASSIGN_OPTIONAL(style.rightMargin, rightMargin);
455 ASSIGN_OPTIONAL(style.topMargin, topMargin);
456 ASSIGN_OPTIONAL(style.bottomMargin, bottomMargin);
457 ASSIGN_OPTIONAL(style.verticalAlign, verticalAlign);
458 ASSIGN_OPTIONAL(style.isTextBkgndFilled, isTextBkgndFilled);
459 ASSIGN_OPTIONAL(style.textBkgndColour, textBkgndColour);
460 ASSIGN_OPTIONAL(style.defaultTabStop, defaultTabStop);
461 ASSIGN_OPTIONAL(style.textDirection, textDirection);
462 }
463
464 std::optional<double> leftMargin;
465 std::optional<double> rightMargin;
466 std::optional<double> topMargin;
467 std::optional<double> bottomMargin;
468 std::optional<unsigned char> verticalAlign;
469 std::optional<bool> isTextBkgndFilled;
470 std::optional<Colour> textBkgndColour;
471 std::optional<double> defaultTabStop;
472 std::optional<unsigned char> textDirection;
473};
474
475 struct VSDTextBlockStyle
476{
477 VSDTextBlockStyle() :
478 leftMargin(0.0), rightMargin(0.0), topMargin(0.0), bottomMargin(0.0), verticalAlign(1),
479 isTextBkgndFilled(false), textBkgndColour(0xff,0xff,0xff,0), defaultTabStop(0.5), textDirection(0) {}
480 VSDTextBlockStyle(double lm, double rm, double tm, double bm, unsigned char va,
481 bool isBgFilled, Colour bgClr, double defTab, unsigned char td) :
482 leftMargin(lm), rightMargin(rm), topMargin(tm), bottomMargin(bm), verticalAlign(va),
483 isTextBkgndFilled(isBgFilled), textBkgndColour(bgClr), defaultTabStop(defTab), textDirection(td) {}
484 VSDTextBlockStyle(const VSDTextBlockStyle &style) = default;
485 ~VSDTextBlockStyle() {}
486 VSDTextBlockStyle &operator=(const VSDTextBlockStyle &style) = default;
487 void override(const VSDOptionalTextBlockStyle &style, const VSDXTheme * /* theme */)
488 {
489 ASSIGN_OPTIONAL(style.leftMargin, leftMargin);
490 ASSIGN_OPTIONAL(style.rightMargin, rightMargin);
491 ASSIGN_OPTIONAL(style.topMargin, topMargin);
492 ASSIGN_OPTIONAL(style.bottomMargin, bottomMargin);
493 ASSIGN_OPTIONAL(style.verticalAlign, verticalAlign);
494 ASSIGN_OPTIONAL(style.isTextBkgndFilled, isTextBkgndFilled);
495 ASSIGN_OPTIONAL(style.textBkgndColour, textBkgndColour);
496 ASSIGN_OPTIONAL(style.defaultTabStop, defaultTabStop);
497 ASSIGN_OPTIONAL(style.textDirection, textDirection);
498 }
499
500 double leftMargin;
501 double rightMargin;
502 double topMargin;
503 double bottomMargin;
504 unsigned char verticalAlign;
505 bool isTextBkgndFilled;
506 Colour textBkgndColour;
507 double defaultTabStop;
508 unsigned char textDirection;
509};
510
511 class VSDStyles
512{
513 public:
514 VSDStyles();
515 VSDStyles(const VSDStyles &styles) = default;
516 ~VSDStyles();
517 VSDStyles &operator=(const VSDStyles &styles) = default;
518 void addLineStyle(unsigned lineStyleIndex, const VSDOptionalLineStyle &lineStyle);
519 void addFillStyle(unsigned fillStyleIndex, const VSDOptionalFillStyle &fillStyle);
520 void addTextBlockStyle(unsigned textStyleIndex, const VSDOptionalTextBlockStyle &textBlockStyle);
521 void addCharStyle(unsigned textStyleIndex, const VSDOptionalCharStyle &charStyle);
522 void addParaStyle(unsigned textStyleIndex, const VSDOptionalParaStyle &paraStyle);
523
524 void addLineStyleMaster(unsigned lineStyleIndex, unsigned lineStyleMaster);
525 void addFillStyleMaster(unsigned fillStyleIndex, unsigned fillStyleMaster);
526 void addTextStyleMaster(unsigned textStyleIndex, unsigned textStyleMaster);
527
528 VSDOptionalLineStyle getOptionalLineStyle(unsigned lineStyleIndex) const;
529 VSDFillStyle getFillStyle(unsigned fillStyleIndex, const VSDXTheme *theme) const;
530 VSDOptionalFillStyle getOptionalFillStyle(unsigned fillStyleIndex) const;
531 VSDOptionalTextBlockStyle getOptionalTextBlockStyle(unsigned textStyleIndex) const;
532 VSDOptionalCharStyle getOptionalCharStyle(unsigned textStyleIndex) const;
533 VSDOptionalParaStyle getOptionalParaStyle(unsigned textStyleIndex) const;
534
535 private:
536 std::map<unsigned, VSDOptionalLineStyle> m_lineStyles;
537 std::map<unsigned, VSDOptionalFillStyle> m_fillStyles;
538 std::map<unsigned, VSDOptionalTextBlockStyle> m_textBlockStyles;
539 std::map<unsigned, VSDOptionalCharStyle> m_charStyles;
540 std::map<unsigned, VSDOptionalParaStyle> m_paraStyles;
541 std::map<unsigned, unsigned> m_lineStyleMasters;
542 std::map<unsigned, unsigned> m_fillStyleMasters;
543 std::map<unsigned, unsigned> m_textStyleMasters;
544};
545
546
547} // namespace libvisio
548
549#endif // __VSDSTYLES_H__
550/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
VSDTypes.h
ASSIGN_OPTIONAL
#define ASSIGN_OPTIONAL(t, u)
Definition VSDTypes.h:17
VSDXTheme.h
libvisio::VSDName
Definition VSDTypes.h:171
libvisio::VSDStyles::m_fillStyleMasters
std::map< unsigned, unsigned > m_fillStyleMasters
Definition VSDStyles.h:542
libvisio::VSDStyles::addLineStyle
void addLineStyle(unsigned lineStyleIndex, const VSDOptionalLineStyle &lineStyle)
Definition VSDStyles.cpp:68
libvisio::VSDStyles::addTextStyleMaster
void addTextStyleMaster(unsigned textStyleIndex, unsigned textStyleMaster)
Definition VSDStyles.cpp:103
libvisio::VSDStyles::m_paraStyles
std::map< unsigned, VSDOptionalParaStyle > m_paraStyles
Definition VSDStyles.h:540
libvisio::VSDStyles::getOptionalTextBlockStyle
VSDOptionalTextBlockStyle getOptionalTextBlockStyle(unsigned textStyleIndex) const
Definition VSDStyles.cpp:125
libvisio::VSDStyles::m_fillStyles
std::map< unsigned, VSDOptionalFillStyle > m_fillStyles
Definition VSDStyles.h:537
libvisio::VSDStyles::m_textStyleMasters
std::map< unsigned, unsigned > m_textStyleMasters
Definition VSDStyles.h:543
libvisio::VSDStyles::addParaStyle
void addParaStyle(unsigned textStyleIndex, const VSDOptionalParaStyle &paraStyle)
Definition VSDStyles.cpp:88
libvisio::VSDStyles::VSDStyles
VSDStyles()
Definition VSDStyles.cpp:58
libvisio::VSDStyles::getOptionalLineStyle
VSDOptionalLineStyle getOptionalLineStyle(unsigned lineStyleIndex) const
Definition VSDStyles.cpp:108
libvisio::VSDStyles::addFillStyle
void addFillStyle(unsigned fillStyleIndex, const VSDOptionalFillStyle &fillStyle)
Definition VSDStyles.cpp:73
libvisio::VSDStyles::m_lineStyles
std::map< unsigned, VSDOptionalLineStyle > m_lineStyles
Definition VSDStyles.h:536
libvisio::VSDStyles::getFillStyle
VSDFillStyle getFillStyle(unsigned fillStyleIndex, const VSDXTheme *theme) const
Definition VSDStyles.cpp:118
libvisio::VSDStyles::~VSDStyles
~VSDStyles()
Definition VSDStyles.cpp:64
libvisio::VSDStyles::VSDStyles
VSDStyles(const VSDStyles &styles)=default
libvisio::VSDStyles::m_textBlockStyles
std::map< unsigned, VSDOptionalTextBlockStyle > m_textBlockStyles
Definition VSDStyles.h:538
libvisio::VSDStyles::getOptionalCharStyle
VSDOptionalCharStyle getOptionalCharStyle(unsigned textStyleIndex) const
Definition VSDStyles.cpp:130
libvisio::VSDStyles::addFillStyleMaster
void addFillStyleMaster(unsigned fillStyleIndex, unsigned fillStyleMaster)
Definition VSDStyles.cpp:98
libvisio::VSDStyles::getOptionalParaStyle
VSDOptionalParaStyle getOptionalParaStyle(unsigned textStyleIndex) const
Definition VSDStyles.cpp:135
libvisio::VSDStyles::addCharStyle
void addCharStyle(unsigned textStyleIndex, const VSDOptionalCharStyle &charStyle)
Definition VSDStyles.cpp:83
libvisio::VSDStyles::m_charStyles
std::map< unsigned, VSDOptionalCharStyle > m_charStyles
Definition VSDStyles.h:539
libvisio::VSDStyles::m_lineStyleMasters
std::map< unsigned, unsigned > m_lineStyleMasters
Definition VSDStyles.h:541
libvisio::VSDStyles::getOptionalFillStyle
VSDOptionalFillStyle getOptionalFillStyle(unsigned fillStyleIndex) const
Definition VSDStyles.cpp:113
libvisio::VSDStyles::addTextBlockStyle
void addTextBlockStyle(unsigned textStyleIndex, const VSDOptionalTextBlockStyle &textBlockStyle)
Definition VSDStyles.cpp:78
libvisio::VSDStyles::operator=
VSDStyles & operator=(const VSDStyles &styles)=default
libvisio::VSDStyles::addLineStyleMaster
void addLineStyleMaster(unsigned lineStyleIndex, unsigned lineStyleMaster)
Definition VSDStyles.cpp:93
libvisio::VSDXTheme
Definition VSDXTheme.h:85
libvisio_utils.h
libvisio
Definition libvisio_utils.h:47
libvisio::Colour
Definition VSDTypes.h:71
libvisio::VSDCharStyle::size
double size
Definition VSDStyles.h:324
libvisio::VSDCharStyle::smallcaps
bool smallcaps
Definition VSDStyles.h:333
libvisio::VSDCharStyle::strikeout
bool strikeout
Definition VSDStyles.h:329
libvisio::VSDCharStyle::doubleunderline
bool doubleunderline
Definition VSDStyles.h:328
libvisio::VSDCharStyle::VSDCharStyle
VSDCharStyle()
Definition VSDStyles.h:286
libvisio::VSDCharStyle::superscript
bool superscript
Definition VSDStyles.h:334
libvisio::VSDCharStyle::~VSDCharStyle
~VSDCharStyle()
Definition VSDStyles.h:300
libvisio::VSDCharStyle::charCount
unsigned charCount
Definition VSDStyles.h:321
libvisio::VSDCharStyle::colour
Colour colour
Definition VSDStyles.h:323
libvisio::VSDCharStyle::initcaps
bool initcaps
Definition VSDStyles.h:332
libvisio::VSDCharStyle::bold
bool bold
Definition VSDStyles.h:325
libvisio::VSDCharStyle::italic
bool italic
Definition VSDStyles.h:326
libvisio::VSDCharStyle::subscript
bool subscript
Definition VSDStyles.h:335
libvisio::VSDCharStyle::scaleWidth
double scaleWidth
Definition VSDStyles.h:336
libvisio::VSDCharStyle::VSDCharStyle
VSDCharStyle(const VSDCharStyle &style)=default
libvisio::VSDCharStyle::VSDCharStyle
VSDCharStyle(unsigned cc, const VSDName &ft, const Colour &c, double s, bool b, bool i, bool u, bool du, bool so, bool dso, bool ac, bool ic, bool sc, bool super, bool sub, double sw)
Definition VSDStyles.h:292
libvisio::VSDCharStyle::underline
bool underline
Definition VSDStyles.h:327
libvisio::VSDCharStyle::doublestrikeout
bool doublestrikeout
Definition VSDStyles.h:330
libvisio::VSDCharStyle::allcaps
bool allcaps
Definition VSDStyles.h:331
libvisio::VSDCharStyle::font
VSDName font
Definition VSDStyles.h:322
libvisio::VSDCharStyle::operator=
VSDCharStyle & operator=(const VSDCharStyle &style)=default
libvisio::VSDFillStyle
Definition VSDStyles.h:158
libvisio::VSDFillStyle::~VSDFillStyle
~VSDFillStyle()
Definition VSDStyles.h:172
libvisio::VSDFillStyle::bgColour
Colour bgColour
Definition VSDStyles.h:210
libvisio::VSDFillStyle::qsFillMatrix
long qsFillMatrix
Definition VSDStyles.h:220
libvisio::VSDFillStyle::variationStyleIndex
unsigned variationStyleIndex
Definition VSDStyles.h:222
libvisio::VSDFillStyle::shadowOffsetY
double shadowOffsetY
Definition VSDStyles.h:217
libvisio::VSDFillStyle::fgColour
Colour fgColour
Definition VSDStyles.h:209
libvisio::VSDFillStyle::bgTransparency
double bgTransparency
Definition VSDStyles.h:213
libvisio::VSDFillStyle::VSDFillStyle
VSDFillStyle(const VSDFillStyle &style)=default
libvisio::VSDFillStyle::variationColorIndex
unsigned variationColorIndex
Definition VSDStyles.h:221
libvisio::VSDFillStyle::shadowPattern
unsigned char shadowPattern
Definition VSDStyles.h:215
libvisio::VSDFillStyle::shadowOffsetX
double shadowOffsetX
Definition VSDStyles.h:216
libvisio::VSDFillStyle::pattern
unsigned char pattern
Definition VSDStyles.h:211
libvisio::VSDFillStyle::operator=
VSDFillStyle & operator=(const VSDFillStyle &style)=default
libvisio::VSDFillStyle::qsFillColour
long qsFillColour
Definition VSDStyles.h:218
libvisio::VSDFillStyle::VSDFillStyle
VSDFillStyle(const Colour &fgc, const Colour &bgc, unsigned char p, double fga, double bga, const Colour &sfgc, unsigned char shp, double shX, double shY, long qsFc, long qsSc, long qsFm, unsigned vCIn, unsigned vSIn)
Definition VSDStyles.h:164
libvisio::VSDFillStyle::fgTransparency
double fgTransparency
Definition VSDStyles.h:212
libvisio::VSDFillStyle::shadowFgColour
Colour shadowFgColour
Definition VSDStyles.h:214
libvisio::VSDFillStyle::VSDFillStyle
VSDFillStyle()
Definition VSDStyles.h:159
libvisio::VSDFillStyle::qsShadowColour
long qsShadowColour
Definition VSDStyles.h:219
libvisio::VSDLineStyle::~VSDLineStyle
~VSDLineStyle()
Definition VSDStyles.h:72
libvisio::VSDLineStyle::colour
Colour colour
Definition VSDStyles.h:93
libvisio::VSDLineStyle::rounding
double rounding
Definition VSDStyles.h:98
libvisio::VSDLineStyle::cap
unsigned char cap
Definition VSDStyles.h:97
libvisio::VSDLineStyle::VSDLineStyle
VSDLineStyle()
Definition VSDStyles.h:64
libvisio::VSDLineStyle::width
double width
Definition VSDStyles.h:92
libvisio::VSDLineStyle::qsLineColour
long qsLineColour
Definition VSDStyles.h:99
libvisio::VSDLineStyle::operator=
VSDLineStyle & operator=(const VSDLineStyle &style)=default
libvisio::VSDLineStyle::endMarker
unsigned char endMarker
Definition VSDStyles.h:96
libvisio::VSDLineStyle::startMarker
unsigned char startMarker
Definition VSDStyles.h:95
libvisio::VSDLineStyle::qsLineMatrix
long qsLineMatrix
Definition VSDStyles.h:100
libvisio::VSDLineStyle::VSDLineStyle
VSDLineStyle(double w, Colour col, unsigned char p, unsigned char sm, unsigned char em, unsigned char c, double r, long qlc, long qlm)
Definition VSDStyles.h:67
libvisio::VSDLineStyle::VSDLineStyle
VSDLineStyle(const VSDLineStyle &style)=default
libvisio::VSDLineStyle::pattern
unsigned char pattern
Definition VSDStyles.h:94
libvisio::VSDOptionalCharStyle
Definition VSDStyles.h:226
libvisio::VSDOptionalCharStyle::font
std::optional< VSDName > font
Definition VSDStyles.h:267
libvisio::VSDOptionalCharStyle::allcaps
std::optional< bool > allcaps
Definition VSDStyles.h:276
libvisio::VSDOptionalCharStyle::italic
std::optional< bool > italic
Definition VSDStyles.h:271
libvisio::VSDOptionalCharStyle::superscript
std::optional< bool > superscript
Definition VSDStyles.h:279
libvisio::VSDOptionalCharStyle::VSDOptionalCharStyle
VSDOptionalCharStyle(unsigned cc, const std::optional< VSDName > &ft, const std::optional< Colour > &c, const std::optional< double > &s, const std::optional< bool > &b, const std::optional< bool > &i, const std::optional< bool > &u, const std::optional< bool > &du, const std::optional< bool > &so, const std::optional< bool > &dso, const std::optional< bool > &ac, const std::optional< bool > &ic, const std::optional< bool > &sc, const std::optional< bool > &super, const std::optional< bool > &sub, const std::optional< double > &sw)
Definition VSDStyles.h:232
libvisio::VSDOptionalCharStyle::operator=
VSDOptionalCharStyle & operator=(const VSDOptionalCharStyle &style)=default
libvisio::VSDOptionalCharStyle::underline
std::optional< bool > underline
Definition VSDStyles.h:272
libvisio::VSDOptionalCharStyle::size
std::optional< double > size
Definition VSDStyles.h:269
libvisio::VSDOptionalCharStyle::VSDOptionalCharStyle
VSDOptionalCharStyle(const VSDOptionalCharStyle &style)=default
libvisio::VSDOptionalCharStyle::smallcaps
std::optional< bool > smallcaps
Definition VSDStyles.h:278
libvisio::VSDOptionalCharStyle::charCount
unsigned charCount
Definition VSDStyles.h:266
libvisio::VSDOptionalCharStyle::strikeout
std::optional< bool > strikeout
Definition VSDStyles.h:274
libvisio::VSDOptionalCharStyle::bold
std::optional< bool > bold
Definition VSDStyles.h:270
libvisio::VSDOptionalCharStyle::scaleWidth
std::optional< double > scaleWidth
Definition VSDStyles.h:281
libvisio::VSDOptionalCharStyle::subscript
std::optional< bool > subscript
Definition VSDStyles.h:280
libvisio::VSDOptionalCharStyle::doublestrikeout
std::optional< bool > doublestrikeout
Definition VSDStyles.h:275
libvisio::VSDOptionalCharStyle::doubleunderline
std::optional< bool > doubleunderline
Definition VSDStyles.h:273
libvisio::VSDOptionalCharStyle::VSDOptionalCharStyle
VSDOptionalCharStyle()
Definition VSDStyles.h:227
libvisio::VSDOptionalCharStyle::~VSDOptionalCharStyle
~VSDOptionalCharStyle()
Definition VSDStyles.h:245
libvisio::VSDOptionalCharStyle::initcaps
std::optional< bool > initcaps
Definition VSDStyles.h:277
libvisio::VSDOptionalCharStyle::colour
std::optional< Colour > colour
Definition VSDStyles.h:268
libvisio::VSDOptionalFillStyle
Definition VSDStyles.h:104
libvisio::VSDOptionalFillStyle::pattern
std::optional< unsigned char > pattern
Definition VSDStyles.h:143
libvisio::VSDOptionalFillStyle::qsShadowColour
std::optional< long > qsShadowColour
Definition VSDStyles.h:151
libvisio::VSDOptionalFillStyle::bgTransparency
std::optional< double > bgTransparency
Definition VSDStyles.h:145
libvisio::VSDOptionalFillStyle::shadowOffsetY
std::optional< double > shadowOffsetY
Definition VSDStyles.h:149
libvisio::VSDOptionalFillStyle::bgColour
std::optional< Colour > bgColour
Definition VSDStyles.h:142
libvisio::VSDOptionalFillStyle::qsFillColour
std::optional< long > qsFillColour
Definition VSDStyles.h:150
libvisio::VSDOptionalFillStyle::shadowOffsetX
std::optional< double > shadowOffsetX
Definition VSDStyles.h:148
libvisio::VSDOptionalFillStyle::VSDOptionalFillStyle
VSDOptionalFillStyle(const VSDOptionalFillStyle &style)=default
libvisio::VSDOptionalFillStyle::VSDOptionalFillStyle
VSDOptionalFillStyle()
Definition VSDStyles.h:105
libvisio::VSDOptionalFillStyle::shadowFgColour
std::optional< Colour > shadowFgColour
Definition VSDStyles.h:146
libvisio::VSDOptionalFillStyle::variationColorIndex
std::optional< unsigned > variationColorIndex
Definition VSDStyles.h:153
libvisio::VSDOptionalFillStyle::shadowPattern
std::optional< unsigned char > shadowPattern
Definition VSDStyles.h:147
libvisio::VSDOptionalFillStyle::VSDOptionalFillStyle
VSDOptionalFillStyle(const std::optional< Colour > &fgc, const std::optional< Colour > &bgc, const std::optional< unsigned char > &p, const std::optional< double > &fga, const std::optional< double > &bga, const std::optional< Colour > &sfgc, const std::optional< unsigned char > &shp, const std::optional< double > &shX, const std::optional< double > &shY, const std::optional< long > &qsFc, const std::optional< long > &qsSc, const std::optional< long > &qsFm, const std::optional< unsigned > &vCIn, const std::optional< unsigned > &vSIn)
Definition VSDStyles.h:109
libvisio::VSDOptionalFillStyle::operator=
VSDOptionalFillStyle & operator=(const VSDOptionalFillStyle &style)=default
libvisio::VSDOptionalFillStyle::qsFillMatrix
std::optional< long > qsFillMatrix
Definition VSDStyles.h:152
libvisio::VSDOptionalFillStyle::fgColour
std::optional< Colour > fgColour
Definition VSDStyles.h:141
libvisio::VSDOptionalFillStyle::~VSDOptionalFillStyle
~VSDOptionalFillStyle()
Definition VSDStyles.h:121
libvisio::VSDOptionalFillStyle::fgTransparency
std::optional< double > fgTransparency
Definition VSDStyles.h:144
libvisio::VSDOptionalFillStyle::variationStyleIndex
std::optional< unsigned > variationStyleIndex
Definition VSDStyles.h:154
libvisio::VSDOptionalLineStyle
Definition VSDStyles.h:24
libvisio::VSDOptionalLineStyle::VSDOptionalLineStyle
VSDOptionalLineStyle(const VSDOptionalLineStyle &style)=default
libvisio::VSDOptionalLineStyle::VSDOptionalLineStyle
VSDOptionalLineStyle()
Definition VSDStyles.h:25
libvisio::VSDOptionalLineStyle::rounding
std::optional< double > rounding
Definition VSDStyles.h:57
libvisio::VSDOptionalLineStyle::operator=
VSDOptionalLineStyle & operator=(const VSDOptionalLineStyle &style)=default
libvisio::VSDOptionalLineStyle::colour
std::optional< Colour > colour
Definition VSDStyles.h:52
libvisio::VSDOptionalLineStyle::qsLineMatrix
std::optional< long > qsLineMatrix
Definition VSDStyles.h:59
libvisio::VSDOptionalLineStyle::endMarker
std::optional< unsigned char > endMarker
Definition VSDStyles.h:55
libvisio::VSDOptionalLineStyle::~VSDOptionalLineStyle
~VSDOptionalLineStyle()
Definition VSDStyles.h:36
libvisio::VSDOptionalLineStyle::cap
std::optional< unsigned char > cap
Definition VSDStyles.h:56
libvisio::VSDOptionalLineStyle::VSDOptionalLineStyle
VSDOptionalLineStyle(const std::optional< double > &w, const std::optional< Colour > &col, const std::optional< unsigned char > &p, const std::optional< unsigned char > &sm, const std::optional< unsigned char > &em, const std::optional< unsigned char > &c, const std::optional< double > &r, const std::optional< long > &qlc, const std::optional< long > &qlm)
Definition VSDStyles.h:28
libvisio::VSDOptionalLineStyle::qsLineColour
std::optional< long > qsLineColour
Definition VSDStyles.h:58
libvisio::VSDOptionalLineStyle::startMarker
std::optional< unsigned char > startMarker
Definition VSDStyles.h:54
libvisio::VSDOptionalLineStyle::pattern
std::optional< unsigned char > pattern
Definition VSDStyles.h:53
libvisio::VSDOptionalLineStyle::width
std::optional< double > width
Definition VSDStyles.h:51
libvisio::VSDOptionalParaStyle
Definition VSDStyles.h:340
libvisio::VSDOptionalParaStyle::indRight
std::optional< double > indRight
Definition VSDStyles.h:377
libvisio::VSDOptionalParaStyle::align
std::optional< unsigned char > align
Definition VSDStyles.h:381
libvisio::VSDOptionalParaStyle::bullet
std::optional< unsigned char > bullet
Definition VSDStyles.h:382
libvisio::VSDOptionalParaStyle::bulletFontSize
std::optional< double > bulletFontSize
Definition VSDStyles.h:385
libvisio::VSDOptionalParaStyle::bulletStr
std::optional< VSDName > bulletStr
Definition VSDStyles.h:383
libvisio::VSDOptionalParaStyle::VSDOptionalParaStyle
VSDOptionalParaStyle(unsigned cc, const std::optional< double > &ifst, const std::optional< double > &il, const std::optional< double > &ir, const std::optional< double > &sl, const std::optional< double > &sb, const std::optional< double > &sa, const std::optional< unsigned char > &a, const std::optional< unsigned char > &b, const std::optional< VSDName > &bs, const std::optional< VSDName > &bf, const std::optional< double > bfs, const std::optional< double > &tpab, const std::optional< unsigned > &f)
Definition VSDStyles.h:344
libvisio::VSDOptionalParaStyle::~VSDOptionalParaStyle
~VSDOptionalParaStyle()
Definition VSDStyles.h:355
libvisio::VSDOptionalParaStyle::charCount
unsigned charCount
Definition VSDStyles.h:374
libvisio::VSDOptionalParaStyle::textPosAfterBullet
std::optional< double > textPosAfterBullet
Definition VSDStyles.h:386
libvisio::VSDOptionalParaStyle::spLine
std::optional< double > spLine
Definition VSDStyles.h:378
libvisio::VSDOptionalParaStyle::VSDOptionalParaStyle
VSDOptionalParaStyle(const VSDOptionalParaStyle &style)=default
libvisio::VSDOptionalParaStyle::operator=
VSDOptionalParaStyle & operator=(const VSDOptionalParaStyle &style)=default
libvisio::VSDOptionalParaStyle::flags
std::optional< unsigned > flags
Definition VSDStyles.h:387
libvisio::VSDOptionalParaStyle::spBefore
std::optional< double > spBefore
Definition VSDStyles.h:379
libvisio::VSDOptionalParaStyle::bulletFont
std::optional< VSDName > bulletFont
Definition VSDStyles.h:384
libvisio::VSDOptionalParaStyle::indFirst
std::optional< double > indFirst
Definition VSDStyles.h:375
libvisio::VSDOptionalParaStyle::VSDOptionalParaStyle
VSDOptionalParaStyle()
Definition VSDStyles.h:341
libvisio::VSDOptionalParaStyle::indLeft
std::optional< double > indLeft
Definition VSDStyles.h:376
libvisio::VSDOptionalParaStyle::spAfter
std::optional< double > spAfter
Definition VSDStyles.h:380
libvisio::VSDOptionalTextBlockStyle
Definition VSDStyles.h:437
libvisio::VSDOptionalTextBlockStyle::textBkgndColour
std::optional< Colour > textBkgndColour
Definition VSDStyles.h:470
libvisio::VSDOptionalTextBlockStyle::VSDOptionalTextBlockStyle
VSDOptionalTextBlockStyle()
Definition VSDStyles.h:438
libvisio::VSDOptionalTextBlockStyle::VSDOptionalTextBlockStyle
VSDOptionalTextBlockStyle(const VSDOptionalTextBlockStyle &style)=default
libvisio::VSDOptionalTextBlockStyle::rightMargin
std::optional< double > rightMargin
Definition VSDStyles.h:465
libvisio::VSDOptionalTextBlockStyle::operator=
VSDOptionalTextBlockStyle & operator=(const VSDOptionalTextBlockStyle &style)=default
libvisio::VSDOptionalTextBlockStyle::VSDOptionalTextBlockStyle
VSDOptionalTextBlockStyle(const std::optional< double > &lm, const std::optional< double > &rm, const std::optional< double > &tm, const std::optional< double > &bm, const std::optional< unsigned char > &va, const std::optional< bool > &isBgFilled, const std::optional< Colour > &bgClr, const std::optional< double > &defTab, const std::optional< unsigned char > &td)
Definition VSDStyles.h:441
libvisio::VSDOptionalTextBlockStyle::verticalAlign
std::optional< unsigned char > verticalAlign
Definition VSDStyles.h:468
libvisio::VSDOptionalTextBlockStyle::bottomMargin
std::optional< double > bottomMargin
Definition VSDStyles.h:467
libvisio::VSDOptionalTextBlockStyle::defaultTabStop
std::optional< double > defaultTabStop
Definition VSDStyles.h:471
libvisio::VSDOptionalTextBlockStyle::~VSDOptionalTextBlockStyle
~VSDOptionalTextBlockStyle()
Definition VSDStyles.h:449
libvisio::VSDOptionalTextBlockStyle::textDirection
std::optional< unsigned char > textDirection
Definition VSDStyles.h:472
libvisio::VSDOptionalTextBlockStyle::topMargin
std::optional< double > topMargin
Definition VSDStyles.h:466
libvisio::VSDOptionalTextBlockStyle::isTextBkgndFilled
std::optional< bool > isTextBkgndFilled
Definition VSDStyles.h:469
libvisio::VSDOptionalTextBlockStyle::leftMargin
std::optional< double > leftMargin
Definition VSDStyles.h:464
libvisio::VSDParaStyle::flags
unsigned flags
Definition VSDStyles.h:433
libvisio::VSDParaStyle::spLine
double spLine
Definition VSDStyles.h:424
libvisio::VSDParaStyle::operator=
VSDParaStyle & operator=(const VSDParaStyle &style)=default
libvisio::VSDParaStyle::~VSDParaStyle
~VSDParaStyle()
Definition VSDStyles.h:401
libvisio::VSDParaStyle::indFirst
double indFirst
Definition VSDStyles.h:421
libvisio::VSDParaStyle::indRight
double indRight
Definition VSDStyles.h:423
libvisio::VSDParaStyle::spAfter
double spAfter
Definition VSDStyles.h:426
libvisio::VSDParaStyle::indLeft
double indLeft
Definition VSDStyles.h:422
libvisio::VSDParaStyle::VSDParaStyle
VSDParaStyle(unsigned cc, double ifst, double il, double ir, double sl, double sb, double sa, unsigned char a, unsigned b, const VSDName &bs, const VSDName &bf, double bfs, double tpab, unsigned f)
Definition VSDStyles.h:395
libvisio::VSDParaStyle::charCount
unsigned charCount
Definition VSDStyles.h:420
libvisio::VSDParaStyle::spBefore
double spBefore
Definition VSDStyles.h:425
libvisio::VSDParaStyle::bullet
unsigned char bullet
Definition VSDStyles.h:428
libvisio::VSDParaStyle::bulletStr
VSDName bulletStr
Definition VSDStyles.h:429
libvisio::VSDParaStyle::align
unsigned char align
Definition VSDStyles.h:427
libvisio::VSDParaStyle::bulletFont
VSDName bulletFont
Definition VSDStyles.h:430
libvisio::VSDParaStyle::VSDParaStyle
VSDParaStyle()
Definition VSDStyles.h:392
libvisio::VSDParaStyle::VSDParaStyle
VSDParaStyle(const VSDParaStyle &style)=default
libvisio::VSDParaStyle::textPosAfterBullet
double textPosAfterBullet
Definition VSDStyles.h:432
libvisio::VSDParaStyle::bulletFontSize
double bulletFontSize
Definition VSDStyles.h:431
libvisio::VSDTextBlockStyle::isTextBkgndFilled
bool isTextBkgndFilled
Definition VSDStyles.h:505
libvisio::VSDTextBlockStyle::rightMargin
double rightMargin
Definition VSDStyles.h:501
libvisio::VSDTextBlockStyle::~VSDTextBlockStyle
~VSDTextBlockStyle()
Definition VSDStyles.h:485
libvisio::VSDTextBlockStyle::textDirection
unsigned char textDirection
Definition VSDStyles.h:508
libvisio::VSDTextBlockStyle::VSDTextBlockStyle
VSDTextBlockStyle()
Definition VSDStyles.h:477
libvisio::VSDTextBlockStyle::verticalAlign
unsigned char verticalAlign
Definition VSDStyles.h:504
libvisio::VSDTextBlockStyle::VSDTextBlockStyle
VSDTextBlockStyle(const VSDTextBlockStyle &style)=default
libvisio::VSDTextBlockStyle::operator=
VSDTextBlockStyle & operator=(const VSDTextBlockStyle &style)=default
libvisio::VSDTextBlockStyle::defaultTabStop
double defaultTabStop
Definition VSDStyles.h:507
libvisio::VSDTextBlockStyle::topMargin
double topMargin
Definition VSDStyles.h:502
libvisio::VSDTextBlockStyle::leftMargin
double leftMargin
Definition VSDStyles.h:500
libvisio::VSDTextBlockStyle::textBkgndColour
Colour textBkgndColour
Definition VSDStyles.h:506
libvisio::VSDTextBlockStyle::VSDTextBlockStyle
VSDTextBlockStyle(double lm, double rm, double tm, double bm, unsigned char va, bool isBgFilled, Colour bgClr, double defTab, unsigned char td)
Definition VSDStyles.h:480
libvisio::VSDTextBlockStyle::bottomMargin
double bottomMargin
Definition VSDStyles.h:503