10#ifndef QXPPARSER_H_INCLUDED
11#define QXPPARSER_H_INCLUDED
37 QXPParser(
const std::shared_ptr<librevenge::RVNGInputStream> &input, librevenge::RVNGDrawingInterface *painter,
const std::shared_ptr<QXPHeader> &header);
43 const std::shared_ptr<librevenge::RVNGInputStream>
m_input;
56 std::deque<std::shared_ptr<HJ>>
m_hjs;
62 std::string
getFont(
int id, std::string defaultFont =
"Arial")
const;
70 void skipRecord(
const std::shared_ptr<librevenge::RVNGInputStream> &stream);
71 void parseFonts(
const std::shared_ptr<librevenge::RVNGInputStream> &stream);
72 void parseHJs(
const std::shared_ptr<librevenge::RVNGInputStream> &stream);
73 void parseCharFormats(
const std::shared_ptr<librevenge::RVNGInputStream> &stream);
75 void parseHJProps(
const std::shared_ptr<librevenge::RVNGInputStream> &stream,
HJ &result);
81 virtual std::shared_ptr<HJ>
parseHJ(
const std::shared_ptr<librevenge::RVNGInputStream> &stream) = 0;
83 void parseCollection(
const std::shared_ptr<librevenge::RVNGInputStream>stream, std::function<
void()> itemHandler);
85 std::vector<PageSettings>
parsePageSettings(
const std::shared_ptr<librevenge::RVNGInputStream> &stream);
90 uint8_t
readColorComp(
const std::shared_ptr<librevenge::RVNGInputStream> &stream);
95 Point readYX(
const std::shared_ptr<librevenge::RVNGInputStream> &stream);
96 std::shared_ptr<ParagraphRule>
readParagraphRule(
const std::shared_ptr<librevenge::RVNGInputStream> &stream);
97 uint8_t
readParagraphFlags(
const std::shared_ptr<librevenge::RVNGInputStream> &stream,
bool &incrementalLeading,
bool &ruleAbove,
bool &ruleBelow);
98 uint8_t
readObjectFlags(
const std::shared_ptr<librevenge::RVNGInputStream> &stream,
bool &noColor);
99 void readGroupElements(
const std::shared_ptr<librevenge::RVNGInputStream> &stream,
unsigned count,
unsigned objectsCount,
unsigned index, std::vector<unsigned> &elements);
101 void skipFileInfo(
const std::shared_ptr<librevenge::RVNGInputStream> &stream);
Definition QXPBlockParser.h:21
Definition QXPCollector.h:28
Definition QXPParser.h:31
std::map< int, std::string > m_fonts
Definition QXPParser.h:51
Rect readObjectBBox(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:329
QXPTextParser m_textParser
Definition QXPParser.h:48
const std::shared_ptr< librevenge::RVNGInputStream > m_input
Definition QXPParser.h:43
std::deque< std::shared_ptr< HJ > > m_hjs
Definition QXPParser.h:56
std::shared_ptr< ParagraphRule > readParagraphRule(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:440
uint8_t readColorComp(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:324
virtual std::shared_ptr< HJ > parseHJ(const std::shared_ptr< librevenge::RVNGInputStream > &stream)=0
void skipRecord(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:116
TabStopType convertTabStopType(unsigned type)
Definition QXPParser.cpp:542
void readGroupElements(const std::shared_ptr< librevenge::RVNGInputStream > &stream, unsigned count, unsigned objectsCount, unsigned index, std::vector< unsigned > &elements)
Definition QXPParser.cpp:560
VerticalAlignment readVertAlign(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:413
void skipFileInfo(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:517
Color getColor(unsigned id, Color defaultColor=Color(0, 0, 0)) const
Definition QXPParser.cpp:83
virtual ParagraphFormat parseParagraphFormat(const std::shared_ptr< librevenge::RVNGInputStream > &stream)=0
void convertCharFormatFlags(unsigned flags, CharFormat &format)
Definition QXPParser.cpp:526
const std::shared_ptr< QXPHeader > m_header
Definition QXPParser.h:104
std::string getFont(int id, std::string defaultFont="Arial") const
Definition QXPParser.cpp:105
Gradient readGradient(const std::shared_ptr< librevenge::RVNGInputStream > &stream, const Color &color1)
Definition QXPParser.cpp:339
std::map< unsigned, LineStyle > m_lineStyles
Definition QXPParser.h:54
void parseCollection(const std::shared_ptr< librevenge::RVNGInputStream >stream, std::function< void()> itemHandler)
Definition QXPParser.cpp:239
std::map< unsigned, Color > m_colors
Definition QXPParser.h:50
std::vector< std::shared_ptr< CharFormat > > m_charFormats
Definition QXPParser.h:52
virtual CharFormat parseCharFormat(const std::shared_ptr< librevenge::RVNGInputStream > &stream)=0
void setArrow(const unsigned index, Frame &frame) const
Definition QXPParser.cpp:492
virtual bool parsePages(const std::shared_ptr< librevenge::RVNGInputStream > &stream, QXPCollector &collector)=0
virtual ~QXPParser()=default
void parseFonts(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:125
void parseParagraphFormats(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:230
void parseCommonCharFormatProps(const std::shared_ptr< librevenge::RVNGInputStream > &stream, CharFormat &result)
Definition QXPParser.cpp:189
TabStop parseTabStop(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:200
uint32_t readRecordEndOffset(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:318
void parseCharFormats(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:167
bool parse()
Definition QXPParser.cpp:65
uint8_t readParagraphFlags(const std::shared_ptr< librevenge::RVNGInputStream > &stream, bool &incrementalLeading, bool &ruleAbove, bool &ruleBelow)
Definition QXPParser.cpp:460
void parseHJProps(const std::shared_ptr< librevenge::RVNGInputStream > &stream, HJ &result)
Definition QXPParser.cpp:176
std::vector< Arrow > m_arrows
Definition QXPParser.h:55
std::vector< PageSettings > parsePageSettings(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:264
std::shared_ptr< Text > parseText(unsigned index, unsigned linkId, QXPCollector &collector)
Definition QXPParser.cpp:303
Point readYX(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:432
QXPParser & operator=(const QXPParser &other)=delete
const LineStyle * getLineStyle(unsigned id) const
Definition QXPParser.cpp:94
std::vector< std::shared_ptr< ParagraphFormat > > m_paragraphFormats
Definition QXPParser.h:53
HorizontalAlignment readHorAlign(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:392
const bool be
Definition QXPParser.h:45
librevenge::RVNGDrawingInterface * m_painter
Definition QXPParser.h:44
uint8_t readObjectFlags(const std::shared_ptr< librevenge::RVNGInputStream > &stream, bool &noColor)
Definition QXPParser.cpp:478
std::set< unsigned > m_groupObjects
Definition QXPParser.h:58
QXPBlockParser m_blockParser
Definition QXPParser.h:47
QXPParser(const QXPParser &other)=delete
void parseHJs(const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Definition QXPParser.cpp:159
virtual bool parseDocument(const std::shared_ptr< librevenge::RVNGInputStream > &docStream, QXPCollector &collector)=0
Definition QXPTextParser.h:29
Definition libqxp_utils.cpp:25
VerticalAlignment
Definition QXPTypes.h:201
HorizontalAlignment
Definition QXPTypes.h:192
TabStopType
Definition QXPTypes.h:209
Definition QXPTypes.h:345
Definition QXPTypes.h:174
Definition QXPTypes.h:127
Definition QXPTypes.h:217