QXP33Parser.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 QXP33PARSER_H_INCLUDED
11#define QXP33PARSER_H_INCLUDED
12
13#include "libqxp_utils.h"
14#include "QXPParser.h"
15
16#include <string>
17
18namespace libqxp
19{
20
22class QXP33Header;
23
24class QXP33Parser : public QXPParser
25{
26public:
27 QXP33Parser(const std::shared_ptr<librevenge::RVNGInputStream> &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr<QXP33Header> &header);
28
39
72
73private:
74 const std::shared_ptr<QXP33Header> m_header;
75
76 bool parseDocument(const std::shared_ptr<librevenge::RVNGInputStream> &docStream, QXPCollector &collector) override;
77 bool parsePages(const std::shared_ptr<librevenge::RVNGInputStream> &pagesStream, QXPCollector &collector) override;
78
79 void parseColors(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
80 CharFormat parseCharFormat(const std::shared_ptr<librevenge::RVNGInputStream> &stream) override;
81 ParagraphFormat parseParagraphFormat(const std::shared_ptr<librevenge::RVNGInputStream> &stream) override;
82 std::shared_ptr<HJ> parseHJ(const std::shared_ptr<librevenge::RVNGInputStream> &stream) override;
83
84 Page parsePage(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
85
86 void parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP33Deobfuscator &deobfuscate, QXPCollector &collector, const Page &page, unsigned index);
87 ObjectHeader parseObjectHeader(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP33Deobfuscator &deobfuscate);
88 void readObjectFlags(const std::shared_ptr<librevenge::RVNGInputStream> &stream, bool &noColor, bool &noRunaround);
89 void parseLine(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
90 void parseTextBox(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
91 void parsePictureBox(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
92 void parseEmptyBox(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
93 void parseGroup(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector, const Page &page, unsigned index);
94
95 Frame readFrame(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
96 std::vector<Point> readPolygonData(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
97
98 std::string readName(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
99};
100
101}
102
103#endif // QXP33PARSER_H_INCLUDED
104
105/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition QXP33Deobfuscator.h:20
Definition QXP33Header.h:21
std::string readName(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXP33Parser.cpp:726
ObjectHeader parseObjectHeader(const std::shared_ptr< librevenge::RVNGInputStream > &stream, QXP33Deobfuscator &deobfuscate)
Definition QXP33Parser.cpp:292
void parseLine(const std::shared_ptr< librevenge::RVNGInputStream > &stream, const ObjectHeader &header, QXPCollector &collector)
Definition QXP33Parser.cpp:485
void parsePictureBox(const std::shared_ptr< librevenge::RVNGInputStream > &stream, const ObjectHeader &header, QXPCollector &collector)
Definition QXP33Parser.cpp:573
Frame readFrame(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXP33Parser.cpp:694
CharFormat parseCharFormat(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition QXP33Parser.cpp:160
std::shared_ptr< HJ > parseHJ(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition QXP33Parser.cpp:234
void readObjectFlags(const std::shared_ptr< librevenge::RVNGInputStream > &stream, bool &noColor, bool &noRunaround)
Definition QXP33Parser.cpp:472
ParagraphFormat parseParagraphFormat(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition QXP33Parser.cpp:186
void parseEmptyBox(const std::shared_ptr< librevenge::RVNGInputStream > &stream, const ObjectHeader &header, QXPCollector &collector)
Definition QXP33Parser.cpp:651
ShapeType
Definition QXP33Parser.h:30
@ LINE
Definition QXP33Parser.h:32
@ UNKNOWN
Definition QXP33Parser.h:31
@ CORNERED_RECTANGLE
Definition QXP33Parser.h:35
@ RECTANGLE
Definition QXP33Parser.h:34
@ OVAL
Definition QXP33Parser.h:36
@ ORTHOGONAL_LINE
Definition QXP33Parser.h:33
@ POLYGON
Definition QXP33Parser.h:37
const std::shared_ptr< QXP33Header > m_header
Definition QXP33Parser.h:74
Page parsePage(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXP33Parser.cpp:245
void parseObject(const std::shared_ptr< librevenge::RVNGInputStream > &stream, QXP33Deobfuscator &deobfuscate, QXPCollector &collector, const Page &page, unsigned index)
Definition QXP33Parser.cpp:253
bool parseDocument(const std::shared_ptr< librevenge::RVNGInputStream > &docStream, QXPCollector &collector) override
Definition QXP33Parser.cpp:71
QXP33Parser(const std::shared_ptr< librevenge::RVNGInputStream > &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr< QXP33Header > &header)
Definition QXP33Parser.cpp:65
void parseGroup(const std::shared_ptr< librevenge::RVNGInputStream > &stream, const ObjectHeader &header, QXPCollector &collector, const Page &page, unsigned index)
Definition QXP33Parser.cpp:675
void parseTextBox(const std::shared_ptr< librevenge::RVNGInputStream > &stream, const ObjectHeader &header, QXPCollector &collector)
Definition QXP33Parser.cpp:504
void parseColors(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXP33Parser.cpp:130
std::vector< Point > readPolygonData(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXP33Parser.cpp:705
bool parsePages(const std::shared_ptr< librevenge::RVNGInputStream > &pagesStream, QXPCollector &collector) override
Definition QXP33Parser.cpp:103
Definition QXPCollector.h:28
QXPParser(const QXPParser &other)=delete
Definition libqxp_utils.cpp:25
CornerType
Definition QXPTypes.h:470
@ DEFAULT
Definition QXPTypes.h:471
BoxType
Definition QXPTypes.h:478
ContentType
Definition QXPTypes.h:266
Definition QXPTypes.h:145
Definition QXPTypes.h:345
Definition QXPTypes.h:546
Definition QXPTypes.h:248
Definition QXP33Parser.h:41
Rect boundingBox
Definition QXP33Parser.h:61
unsigned linkId
Definition QXP33Parser.h:47
boost::optional< Fill > fill
Definition QXP33Parser.h:42
bool hflip
Definition QXP33Parser.h:53
double rotation
Definition QXP33Parser.h:50
ShapeType shapeType
Definition QXP33Parser.h:59
BoxType boxType
Definition QXP33Parser.h:63
bool runaround
Definition QXP33Parser.h:44
unsigned gradientId
Definition QXP33Parser.h:48
ContentType contentType
Definition QXP33Parser.h:58
double cornerRadius
Definition QXP33Parser.h:56
bool vflip
Definition QXP33Parser.h:54
unsigned contentIndex
Definition QXP33Parser.h:46
CornerType cornerType
Definition QXP33Parser.h:55
double skew
Definition QXP33Parser.h:51
ObjectHeader()
Definition QXP33Parser.h:65
Definition QXPTypes.h:47

Generated for libqxp by doxygen 1.13.2