QXPTypes.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 libqxp 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 QXPTYPES_H_INCLUDED
11#define QXPTYPES_H_INCLUDED
12
13#include "libqxp_utils.h"
14#include <boost/optional.hpp>
15#include <boost/variant.hpp>
16
17#include <memory>
18#include <vector>
19#include <utility>
20
21 namespace libqxp
22{
23
24 struct Point
25{
26 double x;
27 double y;
28
29 Point()
30 : x(0.0), y(0.0)
31 { }
32
33 Point(double xVal, double yVal)
34 : x(xVal), y(yVal)
35 { }
36
37 Point move(double dx, double dy) const;
38 Point rotateDeg(double rotationDeg, const Point &center) const;
39
40 double distance(const Point &p2) const;
41};
42
43 bool operator==(const Point &lhs, const Point &rhs);
44 bool operator!=(const Point &lhs, const Point &rhs);
45
46 struct Rect
47{
48 double top;
49 double right;
50 double bottom;
51 double left;
52
53 Rect();
54 Rect(double t, double r, double b, double l);
55
56 double width() const;
57 double height() const;
58
59 Point center() const;
60 Point topLeft() const;
61 Point topRight() const;
62 Point bottomRight() const;
63 Point bottomLeft() const;
64
65 Rect shrink(const double diff) const;
66};
67
68 struct Color
69{
70 uint8_t red;
71 uint8_t green;
72 uint8_t blue;
73
74 Color()
75 : red(0), green(0), blue(0)
76 { }
77
78 Color(uint8_t r, uint8_t g, uint8_t b)
79 : red(r), green(g), blue(b)
80 { }
81
82 librevenge::RVNGString toString() const;
83
84 Color applyShade(double shade) const;
85};
86
87 enum class GradientType
88{
89 LINEAR,
90 MIDLINEAR,
91 RECTANGULAR,
92 DIAMOND,
93 CIRCULAR,
94 FULLCIRCULAR
95};
96
97 struct Gradient
98{
99 GradientType type;
100 Color color1;
101 Color color2;
102 double angle;
103
104 Gradient()
105 : type(), color1(), color2(), angle(0.0)
106 { }
107};
108
109 typedef boost::variant<Color, Gradient> Fill;
110
111 enum class LineCapType
112{
113 BUTT,
114 ROUND,
115 RECT,
116 STRETCH
117};
118
119 enum class LineJoinType
120{
121 MITER,
122 ROUND,
123 BEVEL
124};
125
126 struct LineStyle
127{
128 std::vector<double> segmentLengths;
129 bool isStripe;
130 bool isProportional;
131 double patternLength;
132 LineCapType endcapType;
133 LineJoinType joinType;
134
135 LineStyle()
136 : segmentLengths(), isStripe(false), isProportional(true), patternLength(6.0), endcapType(LineCapType::BUTT), joinType(LineJoinType::MITER)
137 { }
138
139 LineStyle(std::vector<double> segments, bool proportional, double pattern, LineCapType endcap, LineJoinType join)
140 : segmentLengths(std::move(segments)), isStripe(false), isProportional(proportional), patternLength(pattern), endcapType(endcap), joinType(join)
141 { }
142};
143
144 struct CharFormat
145{
146 librevenge::RVNGString fontName;
147 double fontSize;
148 double baselineShift;
149 Color color;
150 bool bold;
151 bool italic;
152 bool underline;
153 bool outline;
154 bool shadow;
155 bool superscript;
156 bool subscript;
157 bool superior;
158 bool strike;
159 bool allCaps;
160 bool smallCaps;
161 bool wordUnderline;
162
163 bool isControlChars;
164
165 CharFormat()
166 : fontName("Arial"), fontSize(12.0), baselineShift(0.0), color(0, 0, 0),
167 bold(false), italic(false), underline(false), outline(false), shadow(false), superscript(false), subscript(false), superior(false),
168 strike(false), allCaps(false), smallCaps(false), wordUnderline(false),
169 isControlChars(false)
170 { }
171};
172
173 struct HJ
174{
175 HJ()
176 : hyphenate(true)
177 , minBefore(3)
178 , minAfter(2)
179 , maxInRow(0)
180 , singleWordJustify(true)
181 {
182 }
183
184 bool hyphenate;
185 unsigned minBefore;
186 unsigned minAfter;
187 unsigned maxInRow;
188 bool singleWordJustify;
189};
190
191 enum class HorizontalAlignment
192{
193 LEFT,
194 CENTER,
195 RIGHT,
196 JUSTIFIED,
197 FORCED
198};
199
200 enum class VerticalAlignment
201{
202 TOP,
203 CENTER,
204 BOTTOM,
205 JUSTIFIED
206};
207
208 enum class TabStopType
209{
210 LEFT,
211 CENTER,
212 RIGHT,
213 ALIGN
214};
215
216 struct TabStop
217{
218 TabStopType type;
219 double position;
220 librevenge::RVNGString fillChar;
221 librevenge::RVNGString alignChar;
222
223 bool isDefined() const
224 {
225 return position >= 0;
226 }
227
228 TabStop()
229 : type(TabStopType::LEFT), position(0.0), fillChar(), alignChar()
230 { }
231};
232
233 struct ParagraphRule
234{
235 double width;
236 Color color;
237 const LineStyle *lineStyle;
238 double leftMargin;
239 double rightMargin;
240 double offset;
241
242 ParagraphRule()
243 : width(1.0), color(0, 0, 0), lineStyle(nullptr), leftMargin(0), rightMargin(0), offset(0)
244 { }
245};
246
247 struct ParagraphFormat
248{
249 HorizontalAlignment alignment;
250 Rect margin;
251 double firstLineIndent;
252 double leading;
253 bool incrementalLeading;
254 std::shared_ptr<ParagraphRule> ruleAbove;
255 std::shared_ptr<ParagraphRule> ruleBelow;
256 std::vector<TabStop> tabStops;
257 std::shared_ptr<HJ> hj;
258
259 ParagraphFormat()
260 : alignment(HorizontalAlignment::LEFT), margin(), firstLineIndent(0), leading(0), incrementalLeading(false),
261 ruleAbove(nullptr), ruleBelow(nullptr), tabStops(), hj(nullptr)
262 { }
263};
264
265 enum class ContentType
266{
267 UNKNOWN,
268 OBJECTS, // group
269 NONE,
270 TEXT,
271 PICTURE
272};
273
274 struct TextSpec
275{
276 const unsigned startIndex;
277 const unsigned length;
278
279 unsigned endIndex() const
280 {
281 return startIndex + length - 1;
282 }
283
284 unsigned afterEndIndex() const
285 {
286 return startIndex + length;
287 }
288
289 bool overlaps(const TextSpec &other) const;
290
291 protected:
292 TextSpec(unsigned start, unsigned len)
293 : startIndex(start), length(len)
294 { }
295};
296
297 struct CharFormatSpec : public TextSpec
298{
299 std::shared_ptr<CharFormat> format;
300
301 CharFormatSpec(const std::shared_ptr<CharFormat> &f, unsigned start, unsigned len)
302 : TextSpec(start, len), format(f)
303 { }
304};
305
306 struct ParagraphSpec : public TextSpec
307{
308 std::shared_ptr<ParagraphFormat> format;
309
310 ParagraphSpec(const std::shared_ptr<ParagraphFormat> &f, unsigned start, unsigned len)
311 : TextSpec(start, len), format(f)
312 { }
313};
314
315 struct Text
316{
317 std::string text;
318 const char *encoding;
319 std::vector<ParagraphSpec> paragraphs;
320 std::vector<CharFormatSpec> charFormats;
321
322 double maxFontSize() const;
323 double maxFontSize(const ParagraphSpec &paragraph) const;
324
325 Text()
326 : text(), encoding("cp1252"), paragraphs(), charFormats()
327 { }
328
329 Text(const Text &other) = default;
330 Text &operator=(const Text &other) = default;
331};
332
333 struct Arrow
334{
335 const std::string path;
336 const std::string viewbox;
337 const double scale;
338
339 explicit Arrow(const std::string &d, const std::string &vbox = "0 0 10 10", double s = 3)
340 : path(d), viewbox(vbox), scale(s)
341 { }
342};
343
344 struct Frame
345{
346 double width;
347 boost::optional<Color> color;
348 boost::optional<Color> gapColor;
349 const LineStyle *lineStyle;
350 const Arrow *startArrow;
351 const Arrow *endArrow;
352
353 Frame()
354 : width(1.0), color(), gapColor(), lineStyle(nullptr), startArrow(nullptr), endArrow(nullptr)
355 { }
356
357 Frame(const Frame &other) = default;
358 Frame &operator=(const Frame &other) = default;
359};
360
361 struct LinkedTextSettings
362{
363 unsigned linkId;
364 unsigned offsetIntoText;
365 unsigned linkedIndex;
366 unsigned nextLinkedIndex;
367 boost::optional<unsigned> textLength;
368
369 LinkedTextSettings()
370 : linkId(0), offsetIntoText(0), linkedIndex(0), nextLinkedIndex(0), textLength()
371 { }
372};
373
374 struct TextObject
375{
376 LinkedTextSettings linkSettings;
377 boost::optional<std::shared_ptr<Text>> text;
378
379 TextObject()
380 : linkSettings(), text()
381 { }
382
383 bool isLinked() const;
384};
385
386 struct TextSettings
387{
388 unsigned columnsCount;
389 double gutterWidth;
390 VerticalAlignment verticalAlignment;
391 Rect inset;
392 double rotation;
393 double skew;
394
395 TextSettings()
396 : columnsCount(1), gutterWidth(12.0), verticalAlignment(VerticalAlignment::TOP), inset(), rotation(0), skew(0)
397 { }
398};
399
400 enum class TextPathAlignment
401{
402 ASCENT,
403 CENTER,
404 BASELINE,
405 DESCENT
406};
407
408 enum class TextPathLineAlignment
409{
410 TOP,
411 CENTER,
412 BOTTOM
413};
414
415 struct TextPathSettings
416{
417 bool rotate;
418 bool skew;
419 TextPathAlignment alignment;
420 TextPathLineAlignment lineAlignment;
421
422 TextPathSettings()
423 : rotate(false), skew(false), alignment(TextPathAlignment::BASELINE), lineAlignment(TextPathLineAlignment::TOP)
424 { }
425};
426
427 struct CurveComponent
428{
429 Rect boundingBox;
430 std::vector<Point> points;
431
432 CurveComponent()
433 : boundingBox(), points()
434 { }
435};
436
437 struct Object
438{
439 Rect boundingBox;
440 bool runaround; // we probably don't need other runaround properties because ODF doesn't support them
441 unsigned zIndex;
442
443 protected:
444 Object()
445 : boundingBox(), runaround(false), zIndex(0)
446 { }
447};
448
449 struct Line : Object
450{
451 double rotation;
452 Frame style;
453 std::vector<CurveComponent> curveComponents;
454
455 Line()
456 : rotation(0), style(), curveComponents()
457 { }
458};
459
460 struct TextPath : Line, TextObject
461{
462 TextPathSettings settings;
463
464 TextPath()
465 : settings()
466 { }
467};
468
469 enum class CornerType
470{
471 DEFAULT,
472 ROUNDED,
473 BEVELED,
474 CONCAVE
475};
476
477 enum class BoxType
478{
479 UNKNOWN,
480 RECTANGLE,
481 OVAL,
482 POLYGON,
483 BEZIER
484};
485
486 struct Box : Object
487{
488 boost::optional<Fill> fill;
489 Frame frame;
490 BoxType boxType;
491 CornerType cornerType;
492 double cornerRadius;
493 double rotation;
494 std::vector<Point> customPoints;
495 std::vector<CurveComponent> curveComponents;
496
497 Box()
498 : fill(), frame(), boxType(BoxType::UNKNOWN), cornerType(CornerType::DEFAULT), cornerRadius(0.0), rotation(0),
499 customPoints(), curveComponents()
500 { }
501};
502
503 struct TextBox : Box, TextObject
504{
505 TextSettings settings;
506
507 TextBox()
508 : settings()
509 { }
510};
511
512 struct PictureBox : Box
513{
514 double pictureRotation;
515 double pictureSkew;
516 double offsetLeft;
517 double offsetTop;
518 double scaleHor;
519 double scaleVert;
520
521 PictureBox()
522 : pictureRotation(0.0), pictureSkew(0.0),
523 offsetLeft(0.0), offsetTop(0.0), scaleHor(0.0), scaleVert(0.0)
524 { }
525};
526
527 struct Group : Object
528{
529 std::vector<unsigned> objectsIndexes;
530
531 Group()
532 : objectsIndexes()
533 { }
534};
535
536 struct PageSettings
537{
538 Rect offset;
539
540 PageSettings()
541 : offset()
542 { }
543};
544
545 struct Page
546{
547 std::vector<PageSettings> pageSettings;
548 unsigned objectsCount;
549
550 Page()
551 : pageSettings(), objectsCount(0)
552 { }
553
554 bool isFacing() const
555 {
556 return pageSettings.size() == 2;
557 }
558};
559
560 struct QXPDocumentProperties
561{
562 QXPDocumentProperties()
563 : superscriptOffset(1.0 / 3)
564 , superscriptHScale(1.0)
565 , superscriptVScale(1.0)
566 , subscriptOffset(-1.0 / 3)
567 , subscriptHScale(1.0)
568 , subscriptVScale(1.0)
569 , superiorHScale(0.5)
570 , superiorVScale(0.5)
571 , m_autoLeading(0.2)
572 {
573 }
574
575 double superscriptOffset;
576 double superscriptHScale;
577 double superscriptVScale;
578 double subscriptOffset;
579 double subscriptHScale;
580 double subscriptVScale;
581 double superiorHScale;
582 double superiorVScale;
583
584 void setAutoLeading(const double val);
585 double autoLeading() const;
586
587 // there should be a flag to detect this...
588 bool isIncrementalAutoLeading() const
589 {
590 return autoLeading() < 0 || autoLeading() > 1;
591 }
592
593 private:
594 double m_autoLeading;
595};
596
597}
598
599#endif // QXPTYPES_H_INCLUDED
600
601/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libqxp_utils.h
libqxp
Definition libqxp_utils.cpp:25
libqxp::VerticalAlignment
VerticalAlignment
Definition QXPTypes.h:201
libqxp::VerticalAlignment::BOTTOM
@ BOTTOM
Definition QXPTypes.h:204
libqxp::VerticalAlignment::TOP
@ TOP
Definition QXPTypes.h:202
libqxp::LineJoinType
LineJoinType
Definition QXPTypes.h:120
libqxp::LineJoinType::MITER
@ MITER
Definition QXPTypes.h:121
libqxp::LineJoinType::BEVEL
@ BEVEL
Definition QXPTypes.h:123
libqxp::TextPathLineAlignment
TextPathLineAlignment
Definition QXPTypes.h:409
libqxp::operator!=
bool operator!=(const Point &lhs, const Point &rhs)
Definition QXPTypes.cpp:23
libqxp::TextPathAlignment
TextPathAlignment
Definition QXPTypes.h:401
libqxp::TextPathAlignment::DESCENT
@ DESCENT
Definition QXPTypes.h:405
libqxp::TextPathAlignment::BASELINE
@ BASELINE
Definition QXPTypes.h:404
libqxp::TextPathAlignment::ASCENT
@ ASCENT
Definition QXPTypes.h:402
libqxp::CornerType
CornerType
Definition QXPTypes.h:470
libqxp::CornerType::DEFAULT
@ DEFAULT
Definition QXPTypes.h:471
libqxp::CornerType::BEVELED
@ BEVELED
Definition QXPTypes.h:473
libqxp::CornerType::CONCAVE
@ CONCAVE
Definition QXPTypes.h:474
libqxp::CornerType::ROUNDED
@ ROUNDED
Definition QXPTypes.h:472
libqxp::Fill
boost::variant< Color, Gradient > Fill
Definition QXPTypes.h:109
libqxp::BoxType
BoxType
Definition QXPTypes.h:478
libqxp::BoxType::RECTANGLE
@ RECTANGLE
Definition QXPTypes.h:480
libqxp::BoxType::OVAL
@ OVAL
Definition QXPTypes.h:481
libqxp::BoxType::POLYGON
@ POLYGON
Definition QXPTypes.h:482
libqxp::BoxType::BEZIER
@ BEZIER
Definition QXPTypes.h:483
libqxp::UNKNOWN
@ UNKNOWN
Definition QXPHeader.h:24
libqxp::operator==
bool operator==(const Point &lhs, const Point &rhs)
Definition QXPTypes.cpp:18
libqxp::LineCapType
LineCapType
Definition QXPTypes.h:112
libqxp::LineCapType::RECT
@ RECT
Definition QXPTypes.h:115
libqxp::LineCapType::ROUND
@ ROUND
Definition QXPTypes.h:114
libqxp::LineCapType::STRETCH
@ STRETCH
Definition QXPTypes.h:116
libqxp::LineCapType::BUTT
@ BUTT
Definition QXPTypes.h:113
libqxp::ContentType
ContentType
Definition QXPTypes.h:266
libqxp::ContentType::PICTURE
@ PICTURE
Definition QXPTypes.h:271
libqxp::ContentType::OBJECTS
@ OBJECTS
Definition QXPTypes.h:268
libqxp::ContentType::TEXT
@ TEXT
Definition QXPTypes.h:270
libqxp::ContentType::NONE
@ NONE
Definition QXPTypes.h:269
libqxp::HorizontalAlignment
HorizontalAlignment
Definition QXPTypes.h:192
libqxp::HorizontalAlignment::RIGHT
@ RIGHT
Definition QXPTypes.h:195
libqxp::HorizontalAlignment::JUSTIFIED
@ JUSTIFIED
Definition QXPTypes.h:196
libqxp::HorizontalAlignment::LEFT
@ LEFT
Definition QXPTypes.h:193
libqxp::HorizontalAlignment::FORCED
@ FORCED
Definition QXPTypes.h:197
libqxp::HorizontalAlignment::CENTER
@ CENTER
Definition QXPTypes.h:194
libqxp::GradientType
GradientType
Definition QXPTypes.h:88
libqxp::GradientType::FULLCIRCULAR
@ FULLCIRCULAR
Definition QXPTypes.h:94
libqxp::GradientType::MIDLINEAR
@ MIDLINEAR
Definition QXPTypes.h:90
libqxp::GradientType::DIAMOND
@ DIAMOND
Definition QXPTypes.h:92
libqxp::GradientType::RECTANGULAR
@ RECTANGULAR
Definition QXPTypes.h:91
libqxp::GradientType::CIRCULAR
@ CIRCULAR
Definition QXPTypes.h:93
libqxp::GradientType::LINEAR
@ LINEAR
Definition QXPTypes.h:89
libqxp::TabStopType
TabStopType
Definition QXPTypes.h:209
libqxp::TabStopType::ALIGN
@ ALIGN
Definition QXPTypes.h:213
libqxp::Arrow
Definition QXPTypes.h:334
libqxp::Arrow::path
const std::string path
Definition QXPTypes.h:335
libqxp::Arrow::viewbox
const std::string viewbox
Definition QXPTypes.h:336
libqxp::Arrow::scale
const double scale
Definition QXPTypes.h:337
libqxp::Arrow::Arrow
Arrow(const std::string &d, const std::string &vbox="0 0 10 10", double s=3)
Definition QXPTypes.h:339
libqxp::Box::curveComponents
std::vector< CurveComponent > curveComponents
Definition QXPTypes.h:495
libqxp::Box::rotation
double rotation
Definition QXPTypes.h:493
libqxp::Box::fill
boost::optional< Fill > fill
Definition QXPTypes.h:488
libqxp::Box::frame
Frame frame
Definition QXPTypes.h:489
libqxp::Box::customPoints
std::vector< Point > customPoints
Definition QXPTypes.h:494
libqxp::Box::cornerType
CornerType cornerType
Definition QXPTypes.h:491
libqxp::Box::Box
Box()
Definition QXPTypes.h:497
libqxp::Box::boxType
BoxType boxType
Definition QXPTypes.h:490
libqxp::Box::cornerRadius
double cornerRadius
Definition QXPTypes.h:492
libqxp::CharFormatSpec::CharFormatSpec
CharFormatSpec(const std::shared_ptr< CharFormat > &f, unsigned start, unsigned len)
Definition QXPTypes.h:301
libqxp::CharFormatSpec::format
std::shared_ptr< CharFormat > format
Definition QXPTypes.h:299
libqxp::CharFormat::strike
bool strike
Definition QXPTypes.h:158
libqxp::CharFormat::allCaps
bool allCaps
Definition QXPTypes.h:159
libqxp::CharFormat::color
Color color
Definition QXPTypes.h:149
libqxp::CharFormat::shadow
bool shadow
Definition QXPTypes.h:154
libqxp::CharFormat::italic
bool italic
Definition QXPTypes.h:151
libqxp::CharFormat::underline
bool underline
Definition QXPTypes.h:152
libqxp::CharFormat::bold
bool bold
Definition QXPTypes.h:150
libqxp::CharFormat::fontName
librevenge::RVNGString fontName
Definition QXPTypes.h:146
libqxp::CharFormat::wordUnderline
bool wordUnderline
Definition QXPTypes.h:161
libqxp::CharFormat::baselineShift
double baselineShift
Definition QXPTypes.h:148
libqxp::CharFormat::CharFormat
CharFormat()
Definition QXPTypes.h:165
libqxp::CharFormat::fontSize
double fontSize
Definition QXPTypes.h:147
libqxp::CharFormat::outline
bool outline
Definition QXPTypes.h:153
libqxp::CharFormat::smallCaps
bool smallCaps
Definition QXPTypes.h:160
libqxp::CharFormat::subscript
bool subscript
Definition QXPTypes.h:156
libqxp::CharFormat::isControlChars
bool isControlChars
Definition QXPTypes.h:163
libqxp::CharFormat::superior
bool superior
Definition QXPTypes.h:157
libqxp::CharFormat::superscript
bool superscript
Definition QXPTypes.h:155
libqxp::Color
Definition QXPTypes.h:69
libqxp::Color::toString
librevenge::RVNGString toString() const
Definition QXPTypes.cpp:98
libqxp::Color::red
uint8_t red
Definition QXPTypes.h:70
libqxp::Color::Color
Color(uint8_t r, uint8_t g, uint8_t b)
Definition QXPTypes.h:78
libqxp::Color::blue
uint8_t blue
Definition QXPTypes.h:72
libqxp::Color::green
uint8_t green
Definition QXPTypes.h:71
libqxp::Color::Color
Color()
Definition QXPTypes.h:74
libqxp::Color::applyShade
Color applyShade(double shade) const
Definition QXPTypes.cpp:105
libqxp::CurveComponent::CurveComponent
CurveComponent()
Definition QXPTypes.h:432
libqxp::CurveComponent::points
std::vector< Point > points
Definition QXPTypes.h:430
libqxp::CurveComponent::boundingBox
Rect boundingBox
Definition QXPTypes.h:429
libqxp::Frame
Definition QXPTypes.h:345
libqxp::Frame::width
double width
Definition QXPTypes.h:346
libqxp::Frame::lineStyle
const LineStyle * lineStyle
Definition QXPTypes.h:349
libqxp::Frame::startArrow
const Arrow * startArrow
Definition QXPTypes.h:350
libqxp::Frame::color
boost::optional< Color > color
Definition QXPTypes.h:347
libqxp::Frame::operator=
Frame & operator=(const Frame &other)=default
libqxp::Frame::Frame
Frame()
Definition QXPTypes.h:353
libqxp::Frame::endArrow
const Arrow * endArrow
Definition QXPTypes.h:351
libqxp::Frame::gapColor
boost::optional< Color > gapColor
Definition QXPTypes.h:348
libqxp::Frame::Frame
Frame(const Frame &other)=default
libqxp::Gradient::color1
Color color1
Definition QXPTypes.h:100
libqxp::Gradient::color2
Color color2
Definition QXPTypes.h:101
libqxp::Gradient::Gradient
Gradient()
Definition QXPTypes.h:104
libqxp::Gradient::type
GradientType type
Definition QXPTypes.h:99
libqxp::Gradient::angle
double angle
Definition QXPTypes.h:102
libqxp::Group::objectsIndexes
std::vector< unsigned > objectsIndexes
Definition QXPTypes.h:529
libqxp::Group::Group
Group()
Definition QXPTypes.h:531
libqxp::HJ::HJ
HJ()
Definition QXPTypes.h:175
libqxp::HJ::minBefore
unsigned minBefore
Definition QXPTypes.h:185
libqxp::HJ::minAfter
unsigned minAfter
Definition QXPTypes.h:186
libqxp::HJ::singleWordJustify
bool singleWordJustify
Definition QXPTypes.h:188
libqxp::HJ::maxInRow
unsigned maxInRow
Definition QXPTypes.h:187
libqxp::HJ::hyphenate
bool hyphenate
Definition QXPTypes.h:184
libqxp::LineStyle
Definition QXPTypes.h:127
libqxp::LineStyle::joinType
LineJoinType joinType
Definition QXPTypes.h:133
libqxp::LineStyle::endcapType
LineCapType endcapType
Definition QXPTypes.h:132
libqxp::LineStyle::LineStyle
LineStyle()
Definition QXPTypes.h:135
libqxp::LineStyle::patternLength
double patternLength
Definition QXPTypes.h:131
libqxp::LineStyle::LineStyle
LineStyle(std::vector< double > segments, bool proportional, double pattern, LineCapType endcap, LineJoinType join)
Definition QXPTypes.h:139
libqxp::LineStyle::isStripe
bool isStripe
Definition QXPTypes.h:129
libqxp::LineStyle::isProportional
bool isProportional
Definition QXPTypes.h:130
libqxp::LineStyle::segmentLengths
std::vector< double > segmentLengths
Definition QXPTypes.h:128
libqxp::Line::style
Frame style
Definition QXPTypes.h:452
libqxp::Line::rotation
double rotation
Definition QXPTypes.h:451
libqxp::Line::curveComponents
std::vector< CurveComponent > curveComponents
Definition QXPTypes.h:453
libqxp::Line::Line
Line()
Definition QXPTypes.h:455
libqxp::LinkedTextSettings
Definition QXPTypes.h:362
libqxp::LinkedTextSettings::textLength
boost::optional< unsigned > textLength
Definition QXPTypes.h:367
libqxp::LinkedTextSettings::nextLinkedIndex
unsigned nextLinkedIndex
Definition QXPTypes.h:366
libqxp::LinkedTextSettings::offsetIntoText
unsigned offsetIntoText
Definition QXPTypes.h:364
libqxp::LinkedTextSettings::LinkedTextSettings
LinkedTextSettings()
Definition QXPTypes.h:369
libqxp::LinkedTextSettings::linkId
unsigned linkId
Definition QXPTypes.h:363
libqxp::LinkedTextSettings::linkedIndex
unsigned linkedIndex
Definition QXPTypes.h:365
libqxp::Object::boundingBox
Rect boundingBox
Definition QXPTypes.h:439
libqxp::Object::runaround
bool runaround
Definition QXPTypes.h:440
libqxp::Object::zIndex
unsigned zIndex
Definition QXPTypes.h:441
libqxp::Object::Object
Object()
Definition QXPTypes.h:444
libqxp::PageSettings::PageSettings
PageSettings()
Definition QXPTypes.h:540
libqxp::PageSettings::offset
Rect offset
Definition QXPTypes.h:538
libqxp::Page::pageSettings
std::vector< PageSettings > pageSettings
Definition QXPTypes.h:547
libqxp::Page::isFacing
bool isFacing() const
Definition QXPTypes.h:554
libqxp::Page::objectsCount
unsigned objectsCount
Definition QXPTypes.h:548
libqxp::Page::Page
Page()
Definition QXPTypes.h:550
libqxp::ParagraphFormat::ruleBelow
std::shared_ptr< ParagraphRule > ruleBelow
Definition QXPTypes.h:255
libqxp::ParagraphFormat::ParagraphFormat
ParagraphFormat()
Definition QXPTypes.h:259
libqxp::ParagraphFormat::margin
Rect margin
Definition QXPTypes.h:250
libqxp::ParagraphFormat::firstLineIndent
double firstLineIndent
Definition QXPTypes.h:251
libqxp::ParagraphFormat::alignment
HorizontalAlignment alignment
Definition QXPTypes.h:249
libqxp::ParagraphFormat::incrementalLeading
bool incrementalLeading
Definition QXPTypes.h:253
libqxp::ParagraphFormat::leading
double leading
Definition QXPTypes.h:252
libqxp::ParagraphFormat::hj
std::shared_ptr< HJ > hj
Definition QXPTypes.h:257
libqxp::ParagraphFormat::tabStops
std::vector< TabStop > tabStops
Definition QXPTypes.h:256
libqxp::ParagraphFormat::ruleAbove
std::shared_ptr< ParagraphRule > ruleAbove
Definition QXPTypes.h:254
libqxp::ParagraphRule::color
Color color
Definition QXPTypes.h:236
libqxp::ParagraphRule::offset
double offset
Definition QXPTypes.h:240
libqxp::ParagraphRule::ParagraphRule
ParagraphRule()
Definition QXPTypes.h:242
libqxp::ParagraphRule::leftMargin
double leftMargin
Definition QXPTypes.h:238
libqxp::ParagraphRule::rightMargin
double rightMargin
Definition QXPTypes.h:239
libqxp::ParagraphRule::width
double width
Definition QXPTypes.h:235
libqxp::ParagraphRule::lineStyle
const LineStyle * lineStyle
Definition QXPTypes.h:237
libqxp::ParagraphSpec
Definition QXPTypes.h:307
libqxp::ParagraphSpec::ParagraphSpec
ParagraphSpec(const std::shared_ptr< ParagraphFormat > &f, unsigned start, unsigned len)
Definition QXPTypes.h:310
libqxp::ParagraphSpec::format
std::shared_ptr< ParagraphFormat > format
Definition QXPTypes.h:308
libqxp::PictureBox::scaleVert
double scaleVert
Definition QXPTypes.h:519
libqxp::PictureBox::offsetTop
double offsetTop
Definition QXPTypes.h:517
libqxp::PictureBox::PictureBox
PictureBox()
Definition QXPTypes.h:521
libqxp::PictureBox::offsetLeft
double offsetLeft
Definition QXPTypes.h:516
libqxp::PictureBox::pictureSkew
double pictureSkew
Definition QXPTypes.h:515
libqxp::PictureBox::scaleHor
double scaleHor
Definition QXPTypes.h:518
libqxp::PictureBox::pictureRotation
double pictureRotation
Definition QXPTypes.h:514
libqxp::Point
Definition QXPTypes.h:25
libqxp::Point::y
double y
Definition QXPTypes.h:27
libqxp::Point::move
Point move(double dx, double dy) const
Definition QXPTypes.cpp:28
libqxp::Point::x
double x
Definition QXPTypes.h:26
libqxp::Point::rotateDeg
Point rotateDeg(double rotationDeg, const Point &center) const
Definition QXPTypes.cpp:33
libqxp::Point::Point
Point()
Definition QXPTypes.h:29
libqxp::Point::Point
Point(double xVal, double yVal)
Definition QXPTypes.h:33
libqxp::Point::distance
double distance(const Point &p2) const
Definition QXPTypes.cpp:45
libqxp::QXPDocumentProperties::superscriptOffset
double superscriptOffset
Definition QXPTypes.h:575
libqxp::QXPDocumentProperties::isIncrementalAutoLeading
bool isIncrementalAutoLeading() const
Definition QXPTypes.h:588
libqxp::QXPDocumentProperties::autoLeading
double autoLeading() const
Definition QXPTypes.cpp:171
libqxp::QXPDocumentProperties::QXPDocumentProperties
QXPDocumentProperties()
Definition QXPTypes.h:562
libqxp::QXPDocumentProperties::m_autoLeading
double m_autoLeading
Definition QXPTypes.h:594
libqxp::QXPDocumentProperties::superiorVScale
double superiorVScale
Definition QXPTypes.h:582
libqxp::QXPDocumentProperties::superscriptHScale
double superscriptHScale
Definition QXPTypes.h:576
libqxp::QXPDocumentProperties::superiorHScale
double superiorHScale
Definition QXPTypes.h:581
libqxp::QXPDocumentProperties::subscriptHScale
double subscriptHScale
Definition QXPTypes.h:579
libqxp::QXPDocumentProperties::subscriptVScale
double subscriptVScale
Definition QXPTypes.h:580
libqxp::QXPDocumentProperties::setAutoLeading
void setAutoLeading(const double val)
Definition QXPTypes.cpp:159
libqxp::QXPDocumentProperties::subscriptOffset
double subscriptOffset
Definition QXPTypes.h:578
libqxp::QXPDocumentProperties::superscriptVScale
double superscriptVScale
Definition QXPTypes.h:577
libqxp::Rect
Definition QXPTypes.h:47
libqxp::Rect::topLeft
Point topLeft() const
Definition QXPTypes.cpp:73
libqxp::Rect::bottomRight
Point bottomRight() const
Definition QXPTypes.cpp:83
libqxp::Rect::center
Point center() const
Definition QXPTypes.cpp:68
libqxp::Rect::topRight
Point topRight() const
Definition QXPTypes.cpp:78
libqxp::Rect::right
double right
Definition QXPTypes.h:49
libqxp::Rect::shrink
Rect shrink(const double diff) const
Definition QXPTypes.cpp:93
libqxp::Rect::height
double height() const
Definition QXPTypes.cpp:63
libqxp::Rect::bottomLeft
Point bottomLeft() const
Definition QXPTypes.cpp:88
libqxp::Rect::bottom
double bottom
Definition QXPTypes.h:50
libqxp::Rect::left
double left
Definition QXPTypes.h:51
libqxp::Rect::top
double top
Definition QXPTypes.h:48
libqxp::Rect::Rect
Rect()
Definition QXPTypes.cpp:50
libqxp::Rect::width
double width() const
Definition QXPTypes.cpp:58
libqxp::TabStop::isDefined
bool isDefined() const
Definition QXPTypes.h:223
libqxp::TabStop::type
TabStopType type
Definition QXPTypes.h:218
libqxp::TabStop::TabStop
TabStop()
Definition QXPTypes.h:228
libqxp::TabStop::alignChar
librevenge::RVNGString alignChar
Definition QXPTypes.h:221
libqxp::TabStop::position
double position
Definition QXPTypes.h:219
libqxp::TabStop::fillChar
librevenge::RVNGString fillChar
Definition QXPTypes.h:220
libqxp::TextBox::settings
TextSettings settings
Definition QXPTypes.h:505
libqxp::TextBox::TextBox
TextBox()
Definition QXPTypes.h:507
libqxp::TextObject::text
boost::optional< std::shared_ptr< Text > > text
Definition QXPTypes.h:377
libqxp::TextObject::TextObject
TextObject()
Definition QXPTypes.h:379
libqxp::TextObject::linkSettings
LinkedTextSettings linkSettings
Definition QXPTypes.h:376
libqxp::TextObject::isLinked
bool isLinked() const
Definition QXPTypes.cpp:154
libqxp::TextPathSettings
Definition QXPTypes.h:416
libqxp::TextPathSettings::TextPathSettings
TextPathSettings()
Definition QXPTypes.h:422
libqxp::TextPathSettings::alignment
TextPathAlignment alignment
Definition QXPTypes.h:419
libqxp::TextPathSettings::rotate
bool rotate
Definition QXPTypes.h:417
libqxp::TextPathSettings::skew
bool skew
Definition QXPTypes.h:418
libqxp::TextPathSettings::lineAlignment
TextPathLineAlignment lineAlignment
Definition QXPTypes.h:420
libqxp::TextPath::TextPath
TextPath()
Definition QXPTypes.h:464
libqxp::TextPath::settings
TextPathSettings settings
Definition QXPTypes.h:462
libqxp::TextSettings
Definition QXPTypes.h:387
libqxp::TextSettings::inset
Rect inset
Definition QXPTypes.h:391
libqxp::TextSettings::columnsCount
unsigned columnsCount
Definition QXPTypes.h:388
libqxp::TextSettings::rotation
double rotation
Definition QXPTypes.h:392
libqxp::TextSettings::verticalAlignment
VerticalAlignment verticalAlignment
Definition QXPTypes.h:390
libqxp::TextSettings::skew
double skew
Definition QXPTypes.h:393
libqxp::TextSettings::gutterWidth
double gutterWidth
Definition QXPTypes.h:389
libqxp::TextSettings::TextSettings
TextSettings()
Definition QXPTypes.h:395
libqxp::TextSpec
Definition QXPTypes.h:275
libqxp::TextSpec::overlaps
bool overlaps(const TextSpec &other) const
Definition QXPTypes.cpp:118
libqxp::TextSpec::endIndex
unsigned endIndex() const
Definition QXPTypes.h:279
libqxp::TextSpec::startIndex
const unsigned startIndex
Definition QXPTypes.h:276
libqxp::TextSpec::length
const unsigned length
Definition QXPTypes.h:277
libqxp::TextSpec::TextSpec
TextSpec(unsigned start, unsigned len)
Definition QXPTypes.h:292
libqxp::TextSpec::afterEndIndex
unsigned afterEndIndex() const
Definition QXPTypes.h:284
libqxp::Text::encoding
const char * encoding
Definition QXPTypes.h:318
libqxp::Text::paragraphs
std::vector< ParagraphSpec > paragraphs
Definition QXPTypes.h:319
libqxp::Text::Text
Text(const Text &other)=default
libqxp::Text::maxFontSize
double maxFontSize() const
Definition QXPTypes.cpp:123
libqxp::Text::text
std::string text
Definition QXPTypes.h:317
libqxp::Text::Text
Text()
Definition QXPTypes.h:325
libqxp::Text::charFormats
std::vector< CharFormatSpec > charFormats
Definition QXPTypes.h:320
libqxp::Text::operator=
Text & operator=(const Text &other)=default