QXP1Parser.h Source File documentation

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
20 class 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: */
QXPParser.h
libqxp::QXP1Header
Definition QXP1Header.h:19
libqxp::QXP1Parser::parsePages
bool parsePages(const std::shared_ptr< librevenge::RVNGInputStream > &pagesStream, QXPCollector &collector) override
Definition QXP1Parser.cpp:55
libqxp::QXP1Parser::parseHJ
std::shared_ptr< HJ > parseHJ(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition QXP1Parser.cpp:131
libqxp::QXP1Parser::parseParagraphFormat
ParagraphFormat parseParagraphFormat(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition QXP1Parser.cpp:101
libqxp::QXP1Parser::parsePage
bool parsePage(const std::shared_ptr< librevenge::RVNGInputStream > &input)
Definition QXP1Parser.cpp:136
libqxp::QXP1Parser::parsePicture
void parsePicture(const std::shared_ptr< librevenge::RVNGInputStream > &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent)
Definition QXP1Parser.cpp:240
libqxp::QXP1Parser::parseObject
bool parseObject(const std::shared_ptr< librevenge::RVNGInputStream > &input, QXPCollector &collector)
Definition QXP1Parser.cpp:152
libqxp::QXP1Parser::QXP1Parser
QXP1Parser(const std::shared_ptr< librevenge::RVNGInputStream > &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr< QXP1Header > &header)
Definition QXP1Parser.cpp:37
libqxp::QXP1Parser::parseDocument
bool parseDocument(const std::shared_ptr< librevenge::RVNGInputStream > &docStream, QXPCollector &collector) override
Definition QXP1Parser.cpp:48
libqxp::QXP1Parser::m_header
const std::shared_ptr< QXP1Header > m_header
Definition QXP1Parser.h:45
libqxp::QXP1Parser::parseLine
void parseLine(const std::shared_ptr< librevenge::RVNGInputStream > &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent)
Definition QXP1Parser.cpp:217
libqxp::QXP1Parser::adjust
static void adjust(double &pos, unsigned adjustment)
Definition QXP1Parser.cpp:43
libqxp::QXP1Parser::parseCharFormat
CharFormat parseCharFormat(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition QXP1Parser.cpp:77
libqxp::QXP1Parser::parseCoordPair
void parseCoordPair(const std::shared_ptr< librevenge::RVNGInputStream > &input, double &x1, double &y1, double &x2, double &y2)
Definition QXP1Parser.cpp:250
libqxp::QXP1Parser::parseText
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
libqxp::QXPCollector
Definition QXPCollector.h:28
libqxp::QXPParser::QXPParser
QXPParser(const QXPParser &other)=delete
libqxp
Definition libqxp_utils.cpp:25
libqxp::CharFormat
Definition QXPTypes.h:145
libqxp::Color
Definition QXPTypes.h:69
libqxp::ParagraphFormat
Definition QXPTypes.h:248
libqxp::Rect
Definition QXPTypes.h:47