QXP1Parser.h
Go to the documentation of this file.
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/*
* This file is part of the libqxp project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef QXP1PARSER_H_INCLUDED
#define QXP1PARSER_H_INCLUDED
#include "QXPParser.h"
namespace libqxp
{
class QXP1Header;
class QXP1Parser : public QXPParser
{
public:
QXP1Parser(const std::shared_ptr<librevenge::RVNGInputStream> &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr<QXP1Header> &header);
static void adjust(double &pos, unsigned adjustment);
private:
bool parseDocument(const std::shared_ptr<librevenge::RVNGInputStream> &docStream, QXPCollector &collector) override;
bool parsePages(const std::shared_ptr<librevenge::RVNGInputStream> &pagesStream, QXPCollector &collector) override;
CharFormat parseCharFormat(const std::shared_ptr<librevenge::RVNGInputStream> &stream) override;
ParagraphFormat parseParagraphFormat(const std::shared_ptr<librevenge::RVNGInputStream> &stream) override;
std::shared_ptr<HJ> parseHJ(const std::shared_ptr<librevenge::RVNGInputStream> &stream) override;
bool parsePage(const std::shared_ptr<librevenge::RVNGInputStream> &input);
bool parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &input, QXPCollector &collector);
void parseLine(const std::shared_ptr<librevenge::RVNGInputStream> &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent);
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);
void parsePicture(const std::shared_ptr<librevenge::RVNGInputStream> &input, QXPCollector &collector, const Rect &bbox, const Color &color, bool transparent);
void parseCoordPair(const std::shared_ptr<librevenge::RVNGInputStream> &input, double &x1, double &y1, double &x2, double &y2);
private:
const std::shared_ptr<QXP1Header> m_header;
};
}
#endif // QXP1PARSER_H_INCLUDED
/* 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