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 
15 namespace libqxp
16 {
17 
18 class QXP1Header;
19 
20 class QXP1Parser : public QXPParser
21 {
22 public:
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 
27 private:
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 
44 private:
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: */
void parsePicture(const std::shared_ptr< librevenge::RVNGInputStream > &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent)
Definition: QXP1Parser.cpp:240
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
bool parsePage(const std::shared_ptr< librevenge::RVNGInputStream > &input)
Definition: QXP1Parser.cpp:136
bool parseDocument(const std::shared_ptr< librevenge::RVNGInputStream > &docStream, QXPCollector &collector) override
Definition: QXP1Parser.cpp:48
Definition: libqxp_utils.cpp:24
Definition: QXPParser.h:30
void parseCoordPair(const std::shared_ptr< librevenge::RVNGInputStream > &input, double &x1, double &y1, double &x2, double &y2)
Definition: QXP1Parser.cpp:250
ParagraphFormat parseParagraphFormat(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition: QXP1Parser.cpp:101
const std::shared_ptr< QXP1Header > m_header
Definition: QXP1Parser.h:45
QXP1Parser(const std::shared_ptr< librevenge::RVNGInputStream > &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr< QXP1Header > &header)
Definition: QXP1Parser.cpp:37
bool parseObject(const std::shared_ptr< librevenge::RVNGInputStream > &input, QXPCollector &collector)
Definition: QXP1Parser.cpp:152
Definition: QXP1Parser.h:20
static void adjust(double &pos, unsigned adjustment)
Definition: QXP1Parser.cpp:43
Definition: QXPTypes.h:144
void parseLine(const std::shared_ptr< librevenge::RVNGInputStream > &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent)
Definition: QXP1Parser.cpp:217
Definition: QXPTypes.h:247
Definition: QXPTypes.h:46
bool parsePages(const std::shared_ptr< librevenge::RVNGInputStream > &pagesStream, QXPCollector &collector) override
Definition: QXP1Parser.cpp:55
CharFormat parseCharFormat(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition: QXP1Parser.cpp:77
std::shared_ptr< HJ > parseHJ(const std::shared_ptr< librevenge::RVNGInputStream > &stream) override
Definition: QXP1Parser.cpp:131
Definition: QXPTypes.h:68
Definition: QXPCollector.h:27

Generated for libqxp by doxygen 1.8.15