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