QXP1Parser.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 QXP1PARSER_H_INCLUDED
11#define QXP1PARSER_H_INCLUDED
12
13#include "QXPParser.h"
14
15namespace libqxp
16{
17
18class QXP1Header;
19
20class QXP1Parser : public QXPParser
21{
22public:
23 QXP1Parser(const std::shared_ptr<librevenge::RVNGInputStream> &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr<QXP1Header> &header);
24
25 static void adjust(double &pos, unsigned adjustment);
26
27private:
28 bool parseDocument(const std::shared_ptr<librevenge::RVNGInputStream> &docStream, QXPCollector &collector) override;
29 bool parsePages(const std::shared_ptr<librevenge::RVNGInputStream> &pagesStream, QXPCollector &collector) override;
30
31 CharFormat parseCharFormat(const std::shared_ptr<librevenge::RVNGInputStream> &stream) override;
32 ParagraphFormat parseParagraphFormat(const std::shared_ptr<librevenge::RVNGInputStream> &stream) override;
33 std::shared_ptr<HJ> parseHJ(const std::shared_ptr<librevenge::RVNGInputStream> &stream) override;
34
35 bool parsePage(const std::shared_ptr<librevenge::RVNGInputStream> &input);
36 bool parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &input, QXPCollector &collector);
37
38 void parseLine(const std::shared_ptr<librevenge::RVNGInputStream> &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent);
39 void parseText(const std::shared_ptr<librevenge::RVNGInputStream> &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent, unsigned content, unsigned textOffset, unsigned linkID);
40 void parsePicture(const std::shared_ptr<librevenge::RVNGInputStream> &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent);
41
42 void parseCoordPair(const std::shared_ptr<librevenge::RVNGInputStream> &input, double &x1, double &y1, double &x2, double &y2);
43
44private:
45 const std::shared_ptr<QXP1Header> m_header;
46};
47
48}
49
50#endif // QXP1PARSER_H_INCLUDED
51
52/* vim:set shiftwidth=2 softtabstop=2 expandtab: */
Definition QXP1Parser.h:21
bool parsePages(const std::shared_ptr< librevenge::RVNGInputStream > &pagesStream, QXPCollector &collector) override
Definition QXP1Parser.cpp:55
std::shared_ptr< HJ > parseHJ(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition QXP1Parser.cpp:131
ParagraphFormat parseParagraphFormat(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition QXP1Parser.cpp:101
bool parsePage(const std::shared_ptr< librevenge::RVNGInputStream > &input)
Definition QXP1Parser.cpp:136
void parsePicture(const std::shared_ptr< librevenge::RVNGInputStream > &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent)
Definition QXP1Parser.cpp:240
bool parseObject(const std::shared_ptr< librevenge::RVNGInputStream > &input, QXPCollector &collector)
Definition QXP1Parser.cpp:152
QXP1Parser(const std::shared_ptr< librevenge::RVNGInputStream > &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr< QXP1Header > &header)
Definition QXP1Parser.cpp:37
bool parseDocument(const std::shared_ptr< librevenge::RVNGInputStream > &docStream, QXPCollector &collector) override
Definition QXP1Parser.cpp:48
const std::shared_ptr< QXP1Header > m_header
Definition QXP1Parser.h:45
void parseLine(const std::shared_ptr< librevenge::RVNGInputStream > &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent)
Definition QXP1Parser.cpp:217
static void adjust(double &pos, unsigned adjustment)
Definition QXP1Parser.cpp:43
CharFormat parseCharFormat(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition QXP1Parser.cpp:77
void parseCoordPair(const std::shared_ptr< librevenge::RVNGInputStream > &input, double &x1, double &y1, double &x2, double &y2)
Definition QXP1Parser.cpp:250
void parseText(const std::shared_ptr< librevenge::RVNGInputStream > &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent, unsigned content, unsigned textOffset, unsigned linkID)
Definition QXP1Parser.cpp:227
Definition QXPCollector.h:28
Definition QXPParser.h:31
Definition libqxp_utils.cpp:25
Definition QXPTypes.h:145
Definition QXPTypes.h:69
Definition QXPTypes.h:248
Definition QXPTypes.h:47

Generated for libqxp by doxygen 1.12.0