libqxp::QXPParser Class Referenceabstract

`#include <QXPParser.h>`

Inheritance diagram for libqxp::QXPParser:

## Public Member Functions

| QXPParser (const std::shared_ptr< librevenge::RVNGInputStream > &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr< QXPHeader > &header)
virtual | ~QXPParser ()=default
bool | parse ()

## Protected Member Functions

Color | getColor (unsigned id, Color defaultColor=Color(0, 0, 0)) const
const LineStyle * | getLineStyle (unsigned id) const
std::string | getFont (int id, std::string defaultFont="Arial") const
void | convertCharFormatFlags (unsigned flags, CharFormat &format)
TabStopType | convertTabStopType (unsigned type)
virtual bool | parseDocument (const std::shared_ptr< librevenge::RVNGInputStream > &docStream, QXPCollector &collector)=0
virtual bool | parsePages (const std::shared_ptr< librevenge::RVNGInputStream > &stream, QXPCollector &collector)=0
void | skipRecord (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
void | parseFonts (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
void | parseHJs (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
void | parseCharFormats (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
void | parseCommonCharFormatProps (const std::shared_ptr< librevenge::RVNGInputStream > &stream, CharFormat &result)
void | parseHJProps (const std::shared_ptr< librevenge::RVNGInputStream > &stream, HJ &result)
TabStop | parseTabStop (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
void | parseParagraphFormats (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
virtual CharFormat | parseCharFormat (const std::shared_ptr< librevenge::RVNGInputStream > &stream)=0
virtual ParagraphFormat | parseParagraphFormat (const std::shared_ptr< librevenge::RVNGInputStream > &stream)=0
virtual std::shared_ptr< HJ > | parseHJ (const std::shared_ptr< librevenge::RVNGInputStream > &stream)=0
void | parseCollection (const std::shared_ptr< librevenge::RVNGInputStream >stream, std::function< void()> itemHandler)
std::vector< PageSettings > | parsePageSettings (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
std::shared_ptr< Text > | parseText (unsigned index, unsigned linkId, QXPCollector &collector)
uint32_t | readRecordEndOffset (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
uint8_t | readColorComp (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Rect | readObjectBBox (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Gradient | readGradient (const std::shared_ptr< librevenge::RVNGInputStream > &stream, const Color &color1)
HorizontalAlignment | readHorAlign (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
VerticalAlignment | readVertAlign (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
Point | readYX (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
std::shared_ptr< ParagraphRule > | readParagraphRule (const std::shared_ptr< librevenge::RVNGInputStream > &stream)
uint8_t | readParagraphFlags (const std::shared_ptr< librevenge::RVNGInputStream > &stream, bool &incrementalLeading, bool &ruleAbove, bool &ruleBelow)
uint8_t | readObjectFlags (const std::shared_ptr< librevenge::RVNGInputStream > &stream, bool &noColor)
void | readGroupElements (const std::shared_ptr< librevenge::RVNGInputStream > &stream, unsigned count, unsigned objectsCount, unsigned index, std::vector< unsigned > &elements)
void | setArrow (const unsigned index, Frame &frame) const
void | skipFileInfo (const std::shared_ptr< librevenge::RVNGInputStream > &stream)

## Protected Attributes

const std::shared_ptr< librevenge::RVNGInputStream > | m_input
librevenge::RVNGDrawingInterface * | m_painter
const bool | be
QXPBlockParser | m_blockParser
QXPTextParser | m_textParser
std::map< unsigned, Color > | m_colors
std::map< int, std::string > | m_fonts
std::vector< std::shared_ptr< CharFormat > > | m_charFormats
std::vector< std::shared_ptr< ParagraphFormat > > | m_paragraphFormats
std::map< unsigned, LineStyle > | m_lineStyles
std::vector< Arrow > | m_arrows
std::deque< std::shared_ptr< HJ > > | m_hjs
std::set< unsigned > | m_groupObjects

## Private Member Functions

| QXPParser (const QXPParser &other)=delete
QXPParser & | operator= (const QXPParser &other)=delete

## Private Attributes

const std::shared_ptr< QXPHeader > | m_header

## Constructor & Destructor Documentation

## QXPParser() [1/2]

libqxp::QXPParser::QXPParser | ( | const QXPParser & | other | ) |

private delete

Referenced by operator=(), libqxp::QXP1Parser::QXP1Parser(), libqxp::QXP33Parser::QXP33Parser(), libqxp::QXP4Parser::QXP4Parser(), and QXPParser().

## QXPParser() [2/2]

libqxp::QXPParser::QXPParser | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | input,
|  | librevenge::RVNGDrawingInterface * | painter,
|  | const std::shared_ptr< QXPHeader > & | header )

## ~QXPParser()

virtual libqxp::QXPParser::~QXPParser | ( |  | ) |

virtual default

## Member Function Documentation

## convertCharFormatFlags()

void libqxp::QXPParser::convertCharFormatFlags | ( | unsigned | flags,
|  | CharFormat & | format )

protected

Referenced by libqxp::QXP1Parser::parseCharFormat(), and parseCommonCharFormatProps().

## convertTabStopType()

TabStopType libqxp::QXPParser::convertTabStopType | ( | unsigned | type | ) |

protected

Referenced by libqxp::QXP1Parser::parseParagraphFormat(), and parseTabStop().

## getColor()

Color libqxp::QXPParser::getColor | ( | unsigned | id,
|  | Color | defaultColor = Color(0, 0, 0) ) const

protected

Referenced by libqxp::QXP1Parser::parseCharFormat(), libqxp::QXP33Parser::parseCharFormat(), libqxp::QXP4Parser::parseCharFormat(), libqxp::QXP1Parser::parseObject(), libqxp::QXP33Parser::parseObjectHeader(), libqxp::QXP4Parser::parseObjectHeader(), libqxp::QXP33Parser::readFrame(), libqxp::QXP4Parser::readFrame(), readGradient(), and readParagraphRule().

## getFont()

std::string libqxp::QXPParser::getFont | ( | int | id,
|  | std::string | defaultFont = "Arial" ) const

protected

Referenced by parseCommonCharFormatProps().

## getLineStyle()

const LineStyle * libqxp::QXPParser::getLineStyle | ( | unsigned | id | ) | const

protected

Referenced by libqxp::QXP33Parser::parseLine(), libqxp::QXP4Parser::readFrame(), and readParagraphRule().

## operator=()

QXPParser & libqxp::QXPParser::operator= | ( | const QXPParser & | other | ) |

private delete

## parse()

bool libqxp::QXPParser::parse | ( |  | ) |

## parseCharFormat()

virtual CharFormat libqxp::QXPParser::parseCharFormat | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected pure virtual

Implemented in libqxp::QXP1Parser, libqxp::QXP33Parser, and libqxp::QXP4Parser.

Referenced by parseCharFormats().

## parseCharFormats()

void libqxp::QXPParser::parseCharFormats | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP1Parser::parseDocument(), libqxp::QXP33Parser::parseDocument(), and libqxp::QXP4Parser::parseDocument().

## parseCollection()

void libqxp::QXPParser::parseCollection | ( | const std::shared_ptr< librevenge::RVNGInputStream > | stream,
|  | std::function< void()> | itemHandler )

protected

Referenced by parseCharFormats(), parseHJs(), libqxp::QXP4Parser::parseLineStyles(), and parseParagraphFormats().

## parseCommonCharFormatProps()

void libqxp::QXPParser::parseCommonCharFormatProps | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream,
|  | CharFormat & | result )

protected

Referenced by libqxp::QXP33Parser::parseCharFormat(), and libqxp::QXP4Parser::parseCharFormat().

## parseDocument()

virtual bool libqxp::QXPParser::parseDocument | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | docStream,
|  | QXPCollector & | collector )

protected pure virtual

Implemented in libqxp::QXP1Parser, libqxp::QXP33Parser, and libqxp::QXP4Parser.

Referenced by parse().

## parseFonts()

void libqxp::QXPParser::parseFonts | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP33Parser::parseDocument(), and libqxp::QXP4Parser::parseDocument().

## parseHJ()

virtual std::shared_ptr< HJ > libqxp::QXPParser::parseHJ | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected pure virtual

Implemented in libqxp::QXP1Parser, libqxp::QXP33Parser, and libqxp::QXP4Parser.

Referenced by parseHJs().

## parseHJProps()

void libqxp::QXPParser::parseHJProps | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream,
|  | HJ & | result )

protected

Referenced by libqxp::QXP33Parser::parseHJ(), and libqxp::QXP4Parser::parseHJ().

## parseHJs()

void libqxp::QXPParser::parseHJs | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP33Parser::parseDocument(), and libqxp::QXP4Parser::parseDocument().

## parsePages()

virtual bool libqxp::QXPParser::parsePages | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream,
|  | QXPCollector & | collector )

protected pure virtual

Implemented in libqxp::QXP1Parser, libqxp::QXP33Parser, and libqxp::QXP4Parser.

Referenced by parse().

## parsePageSettings()

std::vector< PageSettings > libqxp::QXPParser::parsePageSettings | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP33Parser::parsePage(), and libqxp::QXP4Parser::parsePage().

## parseParagraphFormat()

virtual ParagraphFormat libqxp::QXPParser::parseParagraphFormat | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected pure virtual

Implemented in libqxp::QXP1Parser, libqxp::QXP33Parser, and libqxp::QXP4Parser.

Referenced by parseParagraphFormats().

## parseParagraphFormats()

void libqxp::QXPParser::parseParagraphFormats | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP1Parser::parseDocument(), libqxp::QXP33Parser::parseDocument(), and libqxp::QXP4Parser::parseDocument().

## parseTabStop()

TabStop libqxp::QXPParser::parseTabStop | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP33Parser::parseParagraphFormat(), and libqxp::QXP4Parser::parseTabStops().

## parseText()

std::shared_ptr< Text > libqxp::QXPParser::parseText | ( | unsigned | index,
|  | unsigned | linkId,
|  | QXPCollector & | collector )

protected

Referenced by libqxp::QXP4Parser::parseBezierText(), libqxp::QXP4Parser::parseBezierTextBox(), libqxp::QXP4Parser::parseLineText(), libqxp::QXP33Parser::parseTextBox(), and libqxp::QXP4Parser::parseTextBox().

## readColorComp()

uint8_t libqxp::QXPParser::readColorComp | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP4Parser::parseColor(), and libqxp::QXP33Parser::parseColors().

## readGradient()

Gradient libqxp::QXPParser::readGradient | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream,
|  | const Color & | color1 )

protected

Referenced by libqxp::QXP4Parser::parseBezierEmptyBox(), libqxp::QXP4Parser::parseBezierPictureBox(), libqxp::QXP4Parser::parseBezierTextBox(), libqxp::QXP4Parser::parseEmptyBox(), libqxp::QXP33Parser::parseObjectHeader(), libqxp::QXP4Parser::parsePictureBox(), and libqxp::QXP4Parser::parseTextBox().

## readGroupElements()

void libqxp::QXPParser::readGroupElements | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream,
|  | unsigned | count,
|  | unsigned | objectsCount,
|  | unsigned | index,
|  | std::vector< unsigned > & | elements )

protected

Referenced by libqxp::QXP33Parser::parseGroup(), and libqxp::QXP4Parser::parseGroup().

## readHorAlign()

HorizontalAlignment libqxp::QXPParser::readHorAlign | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP1Parser::parseParagraphFormat(), libqxp::QXP33Parser::parseParagraphFormat(), and libqxp::QXP4Parser::parseParagraphFormat().

## readObjectBBox()

Rect libqxp::QXPParser::readObjectBBox | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP4Parser::parseEmptyBox(), libqxp::QXP4Parser::parseGroup(), libqxp::QXP4Parser::parseLine(), libqxp::QXP4Parser::parseLineText(), libqxp::QXP33Parser::parseObjectHeader(), libqxp::QXP4Parser::parsePictureBox(), libqxp::QXP4Parser::parseTextBox(), and libqxp::QXP4Parser::readBezierData().

## readObjectFlags()

uint8_t libqxp::QXPParser::readObjectFlags | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream,
|  | bool & | noColor )

protected

Referenced by libqxp::QXP4Parser::parseObjectHeader(), and libqxp::QXP33Parser::readObjectFlags().

## readParagraphFlags()

uint8_t libqxp::QXPParser::readParagraphFlags | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream,
|  | bool & | incrementalLeading,
|  | bool & | ruleAbove,
|  | bool & | ruleBelow )

protected

Referenced by libqxp::QXP33Parser::parseParagraphFormat(), and libqxp::QXP4Parser::parseParagraphFormat().

## readParagraphRule()

std::shared_ptr< ParagraphRule > libqxp::QXPParser::readParagraphRule | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP33Parser::parseParagraphFormat(), and libqxp::QXP4Parser::parseParagraphFormat().

## readRecordEndOffset()

uint32_t libqxp::QXPParser::readRecordEndOffset | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP33Parser::parseColors().

## readVertAlign()

VerticalAlignment libqxp::QXPParser::readVertAlign | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP33Parser::parseTextBox(), and libqxp::QXP4Parser::readTextSettings().

## readYX()

Point libqxp::QXPParser::readYX | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP4Parser::readBezierData(), and libqxp::QXP33Parser::readPolygonData().

## setArrow()

void libqxp::QXPParser::setArrow | ( | const unsigned | index,
|  | Frame & | frame ) const

protected

Referenced by libqxp::QXP33Parser::parseLine(), and libqxp::QXP4Parser::readFrame().

## skipFileInfo()

void libqxp::QXPParser::skipFileInfo | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP33Parser::parseTextBox(), and libqxp::QXP4Parser::skipTextObjectEnd().

## skipRecord()

void libqxp::QXPParser::skipRecord | ( | const std::shared_ptr< librevenge::RVNGInputStream > & | stream | ) |

protected

Referenced by libqxp::QXP33Parser::parseDocument(), libqxp::QXP4Parser::parseDocument(), libqxp::QXP4Parser::skipParagraphStylesheets(), and libqxp::QXP4Parser::skipTemplates().

## Member Data Documentation

## be

const bool libqxp::QXPParser::be

protected

Referenced by libqxp::QXP4Parser::parseBezierText(), libqxp::QXP4Parser::parseBezierTextBox(), libqxp::QXP33Parser::parseCharFormat(), libqxp::QXP4Parser::parseCharFormat(), parseCollection(), libqxp::QXP4Parser::parseColor(), libqxp::QXP4Parser::parseColorBlockSpec(), libqxp::QXP4Parser::parseColors(), parseCommonCharFormatProps(), libqxp::QXP33Parser::parseEmptyBox(), libqxp::QXP4Parser::parseEmptyBox(), parseFonts(), libqxp::QXP33Parser::parseGroup(), libqxp::QXP4Parser::parseGroup(), libqxp::QXP33Parser::parseLine(), libqxp::QXP4Parser::parseLineStyles(), libqxp::QXP4Parser::parseLineText(), libqxp::QXP33Parser::parseObjectHeader(), libqxp::QXP4Parser::parseObjectHeader(), libqxp::QXP33Parser::parsePage(), libqxp::QXP4Parser::parsePage(), parsePageSettings(), libqxp::QXP33Parser::parseParagraphFormat(), libqxp::QXP4Parser::parseParagraphFormat(), libqxp::QXP33Parser::parsePictureBox(), libqxp::QXP4Parser::parsePictureBox(), parseTabStop(), libqxp::QXP4Parser::parseTabStops(), libqxp::QXP33Parser::parseTextBox(), libqxp::QXP4Parser::parseTextBox(), QXPParser(), libqxp::QXP4Parser::readBezierData(), readColorComp(), libqxp::QXP33Parser::readFrame(), libqxp::QXP4Parser::readFrame(), readGradient(), readGroupElements(), libqxp::QXP4Parser::readImageData(), libqxp::QXP4Parser::readLinkedTextSettings(), libqxp::QXP33Parser::readName(), readObjectBBox(), libqxp::QXP33Parser::readObjectFlags(), readObjectFlags(), libqxp::QXP4Parser::readOleObject(), readParagraphFlags(), readParagraphRule(), libqxp::QXP4Parser::readPictureSettings(), libqxp::QXP33Parser::readPolygonData(), readRecordEndOffset(), libqxp::QXP4Parser::readTextSettings(), readYX(), skipFileInfo(), libqxp::QXP4Parser::skipParagraphStylesheets(), skipRecord(), libqxp::QXP4Parser::skipTemplates(), and libqxp::QXP4Parser::skipTextObjectEnd().

## m_arrows

std::vector<Arrow> libqxp::QXPParser::m_arrows

protected

Referenced by QXPParser(), and setArrow().

## m_blockParser

QXPBlockParser libqxp::QXPParser::m_blockParser

protected

Referenced by parse(), and QXPParser().

## m_charFormats

std::vector<std::shared_ptr<CharFormat> > libqxp::QXPParser::m_charFormats

protected

Referenced by parseCharFormats(), parseText(), and QXPParser().

## m_colors

std::map<unsigned, Color> libqxp::QXPParser::m_colors

protected

Referenced by getColor(), libqxp::QXP4Parser::parseColor(), libqxp::QXP33Parser::parseColors(), and QXPParser().

## m_fonts

std::map<int, std::string> libqxp::QXPParser::m_fonts

protected

Referenced by getFont(), parseFonts(), and QXPParser().

## m_groupObjects

std::set<unsigned> libqxp::QXPParser::m_groupObjects

protected

Referenced by libqxp::QXP33Parser::parsePages(), libqxp::QXP4Parser::parsePages(), QXPParser(), and readGroupElements().

## m_header

const std::shared_ptr<QXPHeader> libqxp::QXPParser::m_header

private

Referenced by parseFonts(), parsePageSettings(), QXPParser(), readGradient(), and readParagraphRule().

## m_hjs

std::deque<std::shared_ptr<HJ> > libqxp::QXPParser::m_hjs

protected

Referenced by parseHJs(), libqxp::QXP33Parser::parseParagraphFormat(), libqxp::QXP4Parser::parseParagraphFormat(), and QXPParser().

## m_input

const std::shared_ptr<librevenge::RVNGInputStream> libqxp::QXPParser::m_input

protected

Referenced by QXPParser().

## m_lineStyles

std::map<unsigned, LineStyle> libqxp::QXPParser::m_lineStyles

protected

Referenced by getLineStyle(), libqxp::QXP4Parser::parseLineStyles(), and QXPParser().

## m_painter

librevenge::RVNGDrawingInterface* libqxp::QXPParser::m_painter

protected

Referenced by parse(), and QXPParser().

## m_paragraphFormats

std::vector<std::shared_ptr<ParagraphFormat> > libqxp::QXPParser::m_paragraphFormats

protected

Referenced by parseParagraphFormats(), parseText(), and QXPParser().

## m_textParser

QXPTextParser libqxp::QXPParser::m_textParser

protected

Referenced by parseText(), and QXPParser().

The documentation for this class was generated from the following files:

- QXPParser.h
- QXPParser.cpp