Classes | Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
libetonyek::IWAParser Class Referenceabstract

`#include <IWAParser.h>`

Inheritance diagram for libetonyek::IWAParser:

## Classes
class | ObjectMessage
struct | PageMaster
struct | TableHeader
struct | TableInfo

## Public Member Functions
| IWAParser (const RVNGInputStreamPtr_t &fragments, const RVNGInputStreamPtr_t &package, IWORKCollector &collector)
virtual | ~IWAParser ()
bool | parse ()

## Protected Types
typedef std::map< unsigned, IWORKStylePtr_t > | StyleMap_t
typedef std::function< void(unsigned, IWORKStylePtr_t &)> | StyleParseFun_t

## Protected Member Functions
bool | readFill (const IWAMessage &msg, IWORKFill &fill)
bool | dispatchShape (unsigned id)
bool | parseText (unsigned id, const std::function< void(unsigned, IWORKStylePtr_t)> &openPageSpan=nullptr)
void | parseComment (unsigned id)
bool | parseShapePlacement (const IWAMessage &msg, IWORKGeometryPtr_t &geometry)
const IWORKStylePtr_t | queryCharacterStyle (unsigned id) const
const IWORKStylePtr_t | queryParagraphStyle (unsigned id) const
const IWORKStylePtr_t | querySectionStyle (unsigned id) const
const IWORKStylePtr_t | queryGraphicStyle (unsigned id) const
const IWORKStylePtr_t | queryMediaStyle (unsigned id) const
const IWORKStylePtr_t | queryCellStyle (unsigned id) const
const IWORKStylePtr_t | queryTableStyle (unsigned id) const
const IWORKStylePtr_t | queryListStyle (unsigned id) const
const IWORKStylePtr_t | queryStyle (unsigned id, StyleMap_t &styleMap, StyleParseFun_t parse) const

## Static Protected Member Functions
static boost::optional< unsigned > | readRef (const IWAMessage &msg, unsigned field)
static std::deque< unsigned > | readRefs (const IWAMessage &msg, unsigned field)
static boost::optional< IWORKPosition > | readPosition (const IWAMessage &msg, unsigned field)
static boost::optional< IWORKSize > | readSize (const IWAMessage &msg, unsigned field)
static boost::optional< IWORKColor > | readColor (const IWAMessage &msg, unsigned field)
static void | readStroke (const IWAMessage &msg, IWORKStroke &stroke)
static void | readGradient (const IWAMessage &msg, IWORKGradient &gradient)
static void | readShadow (const IWAMessage &msg, IWORKShadow &shadow)
static void | readPadding (const IWAMessage &msg, IWORKPadding &padding)

## Protected Attributes
IWORKLanguageManager | m_langManager
std::shared_ptr< IWORKText > | m_currentText

## Private Types
typedef std::map< unsigned, boost::variant< std::string, unsigned > > | DataList_t

## Private Member Functions
| IWAParser (const IWAParser &)
IWAParser & | operator= (const IWAParser &)
virtual bool | parseDocument ()=0
void | queryObject (unsigned id, unsigned &type, boost::optional< IWAMessage > &msg) const
const RVNGInputStreamPtr_t | queryFile (unsigned id) const
void | parseObjectIndex ()
void | parseCharacterStyle (unsigned id, IWORKStylePtr_t &style)
void | parseParagraphStyle (unsigned id, IWORKStylePtr_t &style)
void | parseSectionStyle (unsigned id, IWORKStylePtr_t &style)
void | parseGraphicStyle (unsigned id, IWORKStylePtr_t &style)
void | parseMediaStyle (unsigned id, IWORKStylePtr_t &style)
void | parseCellStyle (unsigned id, IWORKStylePtr_t &style)
void | parseTableStyle (unsigned id, IWORKStylePtr_t &style)
void | parseListStyle (unsigned id, IWORKStylePtr_t &style)
void | parseHeaderAndFooter (unsigned id, IWORKPageMaster &hf)
void | parsePageMaster (unsigned id, PageMaster &pageMaster)
void | parseTabularModel (unsigned id)
void | parseDataList (unsigned id, DataList_t &dataList)
void | parseTile (unsigned id)
void | parseTableHeaders (unsigned id, TableHeader &header)
void | parseTableGridLines (unsigned id, IWORKGridLineMap_t(&gridLines)[4])
void | parseTableGridLine (unsigned id, IWORKGridLineMap_t &gridLines)
void | parseLink (unsigned id, std::string &url)
bool | parseAttachment (unsigned id)
bool | parseDrawableShape (const IWAMessage &msg, bool isConnectionLine=false)
bool | parseGroup (const IWAMessage &msg)
bool | parseShapePlacement (const IWAMessage &msg)
bool | parseImage (const IWAMessage &msg)
bool | parseTabularInfo (const IWAMessage &msg)
bool | parsePath (const IWAMessage &msg, IWORKPathPtr_t &path)
bool | parseArrowProperties (const IWAMessage &msg, IWORKPropertyMap &props, bool headArrow)
void | parseCharacterProperties (const IWAMessage &msg, IWORKPropertyMap &props)
void | parseColumnsProperties (const IWAMessage &msg, IWORKPropertyMap &props)

## Private Attributes
IWORKCollector & | m_collector
IWAObjectIndex | m_index
std::deque< unsigned > | m_visited
StyleMap_t | m_charStyles
StyleMap_t | m_paraStyles
StyleMap_t | m_sectionStyles
StyleMap_t | m_graphicStyles
StyleMap_t | m_mediaStyles
StyleMap_t | m_cellStyles
StyleMap_t | m_tableStyles
StyleMap_t | m_listStyles
IWORKTableNameMapPtr_t | m_tableNameMap
std::shared_ptr< TableInfo > | m_currentTable

## Friends
class | ObjectMessage

## Member Typedef Documentation

## ◆ DataList_t

typedef std::map<unsigned, boost::variant<std::string, unsigned> > libetonyek::IWAParser::DataList_t
| private

## ◆ StyleMap_t

typedef std::map<unsigned, IWORKStylePtr_t> libetonyek::IWAParser::StyleMap_t
| protected

## ◆ StyleParseFun_t

typedef std::function<void(unsigned, IWORKStylePtr_t &)> libetonyek::IWAParser::StyleParseFun_t
| protected

## Constructor & Destructor Documentation

## ◆ IWAParser() [1/2]

libetonyek::IWAParser::IWAParser | ( | const IWAParser & |  | ) |
| private

## ◆ IWAParser() [2/2]

libetonyek::IWAParser::IWAParser | ( | const RVNGInputStreamPtr_t & | fragments,
|  | const RVNGInputStreamPtr_t & | package,
|  | IWORKCollector & | collector
| ) |  |

## ◆ ~IWAParser()

virtual libetonyek::IWAParser::~IWAParser | ( |  | ) |
| inline virtual

## Member Function Documentation

## ◆ dispatchShape()

bool libetonyek::IWAParser::dispatchShape | ( | unsigned | id | ) |
| protected

Referenced by libetonyek::PAG5Parser::dispatchShape(), libetonyek::KEY6Parser::dispatchShape(), parseGroup(), and libetonyek::NUM3Parser::parseSheet().

## ◆ operator=()

IWAParser& libetonyek::IWAParser::operator= | ( | const IWAParser & |  | ) |
| private

## ◆ parse()

bool libetonyek::IWAParser::parse | ( |  | ) |

## ◆ parseArrowProperties()

bool libetonyek::IWAParser::parseArrowProperties | ( | const IWAMessage & | msg,
|  | IWORKPropertyMap & | props,
|  | bool | headArrow
| ) |  |
| private

Referenced by parseDrawableShape(), and parseGraphicStyle().

## ◆ parseAttachment()

bool libetonyek::IWAParser::parseAttachment | ( | unsigned | id | ) |
| private

Referenced by parseText().

## ◆ parseCellStyle()

void libetonyek::IWAParser::parseCellStyle | ( | unsigned | id,
|  | IWORKStylePtr_t & | style
| ) |  |
| private

Referenced by queryCellStyle().

## ◆ parseCharacterProperties()

void libetonyek::IWAParser::parseCharacterProperties | ( | const IWAMessage & | msg,
|  | IWORKPropertyMap & | props
| ) |  |
| private

Referenced by parseCharacterStyle(), and parseParagraphStyle().

## ◆ parseCharacterStyle()

void libetonyek::IWAParser::parseCharacterStyle | ( | unsigned | id,
|  | IWORKStylePtr_t & | style
| ) |  |
| private

Referenced by queryCharacterStyle().

## ◆ parseColumnsProperties()

void libetonyek::IWAParser::parseColumnsProperties | ( | const IWAMessage & | msg,
|  | IWORKPropertyMap & | props
| ) |  |
| private

Referenced by parseSectionStyle().

## ◆ parseComment()

void libetonyek::IWAParser::parseComment | ( | unsigned | id | ) |
| protected

Referenced by libetonyek::KEY6Parser::parseStickyNote(), and parseText().

## ◆ parseDataList()

void libetonyek::IWAParser::parseDataList | ( | unsigned | id,
|  | DataList_t & | dataList
| ) |  |
| private

Referenced by parseTabularModel().

## ◆ parseDocument()

virtual bool libetonyek::IWAParser::parseDocument | ( |  | ) |
| private pure virtual

Implemented in libetonyek::KEY6Parser, libetonyek::NUM3Parser, and libetonyek::PAG5Parser.

Referenced by parse().

## ◆ parseDrawableShape()

bool libetonyek::IWAParser::parseDrawableShape | ( | const IWAMessage & | msg,
|  | bool | isConnectionLine = `false`
| ) |  |
| private

Referenced by dispatchShape(), and parseAttachment().

## ◆ parseGraphicStyle()

void libetonyek::IWAParser::parseGraphicStyle | ( | unsigned | id,
|  | IWORKStylePtr_t & | style
| ) |  |
| private

Referenced by queryGraphicStyle().

## ◆ parseGroup()

bool libetonyek::IWAParser::parseGroup | ( | const IWAMessage & | msg | ) |
| private

Referenced by dispatchShape(), and parseAttachment().

## ◆ parseHeaderAndFooter()

void libetonyek::IWAParser::parseHeaderAndFooter | ( | unsigned | id,
|  | IWORKPageMaster & | hf
| ) |  |
| private

Referenced by parsePageMaster().

## ◆ parseImage()

bool libetonyek::IWAParser::parseImage | ( | const IWAMessage & | msg | ) |
| private

Referenced by dispatchShape(), and parseAttachment().

## ◆ parseLink()

void libetonyek::IWAParser::parseLink | ( | unsigned | id,
|  | std::string & | url
| ) |  |
| private

Referenced by parseText().

## ◆ parseListStyle()

void libetonyek::IWAParser::parseListStyle | ( | unsigned | id,
|  | IWORKStylePtr_t & | style
| ) |  |
| private

Referenced by queryListStyle().

## ◆ parseMediaStyle()

void libetonyek::IWAParser::parseMediaStyle | ( | unsigned | id,
|  | IWORKStylePtr_t & | style
| ) |  |
| private

Referenced by queryMediaStyle().

## ◆ parseObjectIndex()

void libetonyek::IWAParser::parseObjectIndex | ( |  | ) |
| private

Referenced by parse().

## ◆ parsePageMaster()

void libetonyek::IWAParser::parsePageMaster | ( | unsigned | id,
|  | PageMaster & | pageMaster
| ) |  |
| private

Referenced by parseText().

## ◆ parseParagraphStyle()

void libetonyek::IWAParser::parseParagraphStyle | ( | unsigned | id,
|  | IWORKStylePtr_t & | style
| ) |  |
| private

Referenced by queryParagraphStyle().

## ◆ parsePath()

bool libetonyek::IWAParser::parsePath | ( | const IWAMessage & | msg,
|  | IWORKPathPtr_t & | path
| ) |  |
| private

Referenced by parseArrowProperties(), and parseDrawableShape().

## ◆ parseSectionStyle()

void libetonyek::IWAParser::parseSectionStyle | ( | unsigned | id,
|  | IWORKStylePtr_t & | style
| ) |  |
| private

Referenced by querySectionStyle().

## ◆ parseShapePlacement() [1/2]

bool libetonyek::IWAParser::parseShapePlacement | ( | const IWAMessage & | msg,
|  | IWORKGeometryPtr_t & | geometry
| ) |  |
| protected

Referenced by parseDrawableShape(), parseGroup(), parseImage(), libetonyek::KEY6Parser::parsePlaceholder(), parseShapePlacement(), and parseTabularInfo().

## ◆ parseShapePlacement() [2/2]

bool libetonyek::IWAParser::parseShapePlacement | ( | const IWAMessage & | msg | ) |
| private

## ◆ parseTableGridLine()

void libetonyek::IWAParser::parseTableGridLine | ( | unsigned | id,
|  | IWORKGridLineMap_t & | gridLines
| ) |  |
| private

Referenced by parseTableGridLines().

## ◆ parseTableGridLines()

void libetonyek::IWAParser::parseTableGridLines | ( | unsigned | id,
|  | IWORKGridLineMap_t(&) | gridLines[4]
| ) |  |
| private

Referenced by parseTabularModel().

## ◆ parseTableHeaders()

void libetonyek::IWAParser::parseTableHeaders | ( | unsigned | id,
|  | TableHeader & | header
| ) |  |
| private

Referenced by parseTabularModel().

## ◆ parseTableStyle()

void libetonyek::IWAParser::parseTableStyle | ( | unsigned | id,
|  | IWORKStylePtr_t & | style
| ) |  |
| private

Referenced by queryTableStyle().

## ◆ parseTabularInfo()

bool libetonyek::IWAParser::parseTabularInfo | ( | const IWAMessage & | msg | ) |
| private

Referenced by dispatchShape(), and parseAttachment().

## ◆ parseTabularModel()

void libetonyek::IWAParser::parseTabularModel | ( | unsigned | id | ) |
| private

Referenced by parseTabularInfo().

## ◆ parseText()

bool libetonyek::IWAParser::parseText | ( | unsigned | id,
|  | const std::function< void(unsigned, IWORKStylePtr_t)> & | openPageSpan = `nullptr`
| ) |  |
| protected

Referenced by libetonyek::PAG5Parser::parseDocument(), parseDrawableShape(), parseHeaderAndFooter(), libetonyek::KEY6Parser::parseNotes(), libetonyek::KEY6Parser::parsePlaceholder(), libetonyek::KEY6Parser::parseStickyNote(), and parseTile().

## ◆ parseTile()

void libetonyek::IWAParser::parseTile | ( | unsigned | id | ) |
| private

Referenced by parseTabularModel().

## ◆ queryCellStyle()

const IWORKStylePtr_t libetonyek::IWAParser::queryCellStyle | ( | unsigned | id | ) | const
| protected

Referenced by parseCellStyle(), parseTabularModel(), and parseTile().

## ◆ queryCharacterStyle()

const IWORKStylePtr_t libetonyek::IWAParser::queryCharacterStyle | ( | unsigned | id | ) | const
| protected

Referenced by parseCharacterStyle(), and parseText().

## ◆ queryFile()

const RVNGInputStreamPtr_t libetonyek::IWAParser::queryFile | ( | unsigned | id | ) | const
| private

Referenced by parseImage(), and readFill().

## ◆ queryGraphicStyle()

const IWORKStylePtr_t libetonyek::IWAParser::queryGraphicStyle | ( | unsigned | id | ) | const
| protected

Referenced by parseDrawableShape(), and parseGraphicStyle().

## ◆ queryListStyle()

const IWORKStylePtr_t libetonyek::IWAParser::queryListStyle | ( | unsigned | id | ) | const
| protected

Referenced by parseListStyle(), and parseText().

## ◆ queryMediaStyle()

const IWORKStylePtr_t libetonyek::IWAParser::queryMediaStyle | ( | unsigned | id | ) | const
| protected

Referenced by parseImage(), and parseMediaStyle().

## ◆ queryObject()

void libetonyek::IWAParser::queryObject | ( | unsigned | id,
|  | unsigned & | type,
|  | boost::optional< IWAMessage > & | msg
| ) |  | const
| private

Referenced by libetonyek::IWAParser::ObjectMessage::ObjectMessage().

## ◆ queryParagraphStyle()

const IWORKStylePtr_t libetonyek::IWAParser::queryParagraphStyle | ( | unsigned | id | ) | const
| protected

Referenced by parseParagraphStyle(), parseTabularModel(), and parseText().

## ◆ querySectionStyle()

const IWORKStylePtr_t libetonyek::IWAParser::querySectionStyle | ( | unsigned | id | ) | const
| protected

Referenced by parseSectionStyle(), and parseText().

## ◆ queryStyle()

const IWORKStylePtr_t libetonyek::IWAParser::queryStyle | ( | unsigned | id,
|  | StyleMap_t & | styleMap,
|  | StyleParseFun_t | parse
| ) |  | const
| protected

Referenced by queryCellStyle(), queryCharacterStyle(), queryGraphicStyle(), queryListStyle(), queryMediaStyle(), queryParagraphStyle(), querySectionStyle(), libetonyek::KEY6Parser::querySlideStyle(), and queryTableStyle().

## ◆ queryTableStyle()

const IWORKStylePtr_t libetonyek::IWAParser::queryTableStyle | ( | unsigned | id | ) | const
| protected

Referenced by parseTableStyle(), and parseTabularModel().

## ◆ readColor()

boost::optional< IWORKColor > libetonyek::IWAParser::readColor | ( | const IWAMessage & | msg,
|  | unsigned | field
| ) |  |
| static protected

Referenced by parseCharacterProperties(), parseGraphicStyle(), parseMediaStyle(), parseParagraphStyle(), readFill(), readGradient(), readShadow(), and readStroke().

## ◆ readFill()

bool libetonyek::IWAParser::readFill | ( | const IWAMessage & | msg,
|  | IWORKFill & | fill
| ) |  |
| protected

Referenced by parseCellStyle(), parseGraphicStyle(), libetonyek::KEY6Parser::parseSlideStyle(), and parseTableStyle().

## ◆ readGradient()

void libetonyek::IWAParser::readGradient | ( | const IWAMessage & | msg,
|  | IWORKGradient & | gradient
| ) |  |
| static protected

Referenced by readFill().

## ◆ readPadding()

void libetonyek::IWAParser::readPadding | ( | const IWAMessage & | msg,
|  | IWORKPadding & | padding
| ) |  |
| static protected

Referenced by parseCellStyle().

## ◆ readPosition()

boost::optional< IWORKPosition > libetonyek::IWAParser::readPosition | ( | const IWAMessage & | msg,
|  | unsigned | field
| ) |  |
| static protected

Referenced by parseArrowProperties(), parseDrawableShape(), parsePath(), and parseShapePlacement().

## ◆ readRef()

boost::optional< unsigned > libetonyek::IWAParser::readRef | ( | const IWAMessage & | msg,
|  | unsigned | field
| ) |  |
| static protected

Referenced by parseAttachment(), parseCellStyle(), parseCharacterStyle(), parseDataList(), libetonyek::PAG5Parser::parseDocument(), libetonyek::KEY6Parser::parseDocument(), parseDrawableShape(), parseGraphicStyle(), libetonyek::PAG5Parser::parseGroupRef(), parseImage(), parseListStyle(), parseMediaStyle(), libetonyek::KEY6Parser::parseNotes(), parsePageMaster(), parseParagraphStyle(), libetonyek::KEY6Parser::parsePlaceholder(), libetonyek::KEY6Parser::parsePresentation(), parseSectionStyle(), libetonyek::NUM3Parser::parseSheet(), libetonyek::KEY6Parser::parseSlide(), libetonyek::KEY6Parser::parseSlideStyle(), libetonyek::KEY6Parser::parseStickyNote(), parseTableStyle(), parseTabularInfo(), parseTabularModel(), parseText(), and readFill().

## ◆ readRefs()

std::deque< unsigned > libetonyek::IWAParser::readRefs | ( | const IWAMessage & | msg,
|  | unsigned | field
| ) |  |
| static protected

Referenced by libetonyek::NUM3Parser::parseDocument(), parseGroup(), libetonyek::KEY6Parser::parsePresentation(), libetonyek::KEY6Parser::parseSlide(), libetonyek::KEY6Parser::parseSlideList(), and parseTableGridLines().

## ◆ readShadow()

void libetonyek::IWAParser::readShadow | ( | const IWAMessage & | msg,
|  | IWORKShadow & | shadow
| ) |  |
| static protected

Referenced by parseCharacterProperties().

## ◆ readSize()

boost::optional< IWORKSize > libetonyek::IWAParser::readSize | ( | const IWAMessage & | msg,
|  | unsigned | field
| ) |  |
| static protected

Referenced by parseDrawableShape(), parseImage(), parseShapePlacement(), and readFill().

## ◆ readStroke()

void libetonyek::IWAParser::readStroke | ( | const IWAMessage & | msg,
|  | IWORKStroke & | stroke
| ) |  |
| static protected

Referenced by parseCellStyle(), parseGraphicStyle(), parseMediaStyle(), parseParagraphStyle(), and parseTableGridLine().

## Friends And Related Function Documentation

## ◆ ObjectMessage

friend class ObjectMessage
| friend

## Member Data Documentation

## ◆ m_cellStyles

StyleMap_t libetonyek::IWAParser::m_cellStyles
| mutable private

Referenced by queryCellStyle().

## ◆ m_charStyles

StyleMap_t libetonyek::IWAParser::m_charStyles
| mutable private

Referenced by queryCharacterStyle().

## ◆ m_collector

IWORKCollector& libetonyek::IWAParser::m_collector
| private

Referenced by parseAttachment(), parseDrawableShape(), parseGroup(), parseHeaderAndFooter(), parseImage(), parseShapePlacement(), parseTabularInfo(), parseTabularModel(), parseText(), and parseTile().

## ◆ m_currentTable

std::shared_ptr<TableInfo> libetonyek::IWAParser::m_currentTable
| private

Referenced by parseTabularModel(), and parseTile().

## ◆ m_currentText

std::shared_ptr<IWORKText> libetonyek::IWAParser::m_currentText
| protected

Referenced by parseAttachment(), parseComment(), libetonyek::PAG5Parser::parseDocument(), parseDrawableShape(), parseHeaderAndFooter(), libetonyek::KEY6Parser::parseNotes(), libetonyek::KEY6Parser::parsePlaceholder(), libetonyek::KEY6Parser::parseStickyNote(), parseText(), and parseTile().

## ◆ m_graphicStyles

StyleMap_t libetonyek::IWAParser::m_graphicStyles
| mutable private

Referenced by queryGraphicStyle().

## ◆ m_index

IWAObjectIndex libetonyek::IWAParser::m_index
| private

Referenced by parseObjectIndex(), queryFile(), and queryObject().

## ◆ m_langManager

IWORKLanguageManager libetonyek::IWAParser::m_langManager
| protected

Referenced by parseComment(), libetonyek::PAG5Parser::parseDocument(), parseDrawableShape(), parseHeaderAndFooter(), libetonyek::KEY6Parser::parseNotes(), libetonyek::KEY6Parser::parsePlaceholder(), libetonyek::KEY6Parser::parseStickyNote(), parseTabularModel(), parseText(), and parseTile().

## ◆ m_listStyles

StyleMap_t libetonyek::IWAParser::m_listStyles
| mutable private

## ◆ m_mediaStyles

StyleMap_t libetonyek::IWAParser::m_mediaStyles
| mutable private

Referenced by queryMediaStyle().

## ◆ m_paraStyles

StyleMap_t libetonyek::IWAParser::m_paraStyles
| mutable private

Referenced by queryParagraphStyle().

## ◆ m_sectionStyles

StyleMap_t libetonyek::IWAParser::m_sectionStyles
| mutable private

Referenced by querySectionStyle().

## ◆ m_tableNameMap

IWORKTableNameMapPtr_t libetonyek::IWAParser::m_tableNameMap
| private

Referenced by parseTabularModel().

## ◆ m_tableStyles

StyleMap_t libetonyek::IWAParser::m_tableStyles
| mutable private

Referenced by queryListStyle(), and queryTableStyle().

## ◆ m_visited

std::deque<unsigned> libetonyek::IWAParser::m_visited
| private

Referenced by libetonyek::IWAParser::ObjectMessage::ObjectMessage().

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

- IWAParser.h
- IWAParser.cpp