libabw::ABWContentCollector Class Reference documentation

Public Member Functions | Private Member Functions | Private Attributes | List of all members
libabw::ABWContentCollector Class Reference

`#include <ABWContentCollector.h>`

Inheritance diagram for libabw::ABWContentCollector:

## Public Member Functions
| ABWContentCollector (librevenge::RVNGTextInterface *iface, const std::map< int, int > &tableSizes, const std::map< std::string, ABWData > &data, const std::map< int, std::shared_ptr< ABWListElement >> &listElements)
| ~ABWContentCollector () override
void | collectTextStyle (const char *name, const char *basedon, const char *followedby, const char *props) override
void | collectDocumentProperties (const char *props) override
void | collectParagraphProperties (const char *level, const char *listid, const char *parentid, const char *style, const char *props) override
void | collectSectionProperties (const char *footer, const char *footerLeft, const char *footerFirst, const char *footerLast, const char *header, const char *headerLeft, const char *headerFirst, const char *headerLast, const char *props) override
void | collectCharacterProperties (const char *style, const char *props) override
void | collectPageSize (const char *width, const char *height, const char *units, const char *pageScale) override
void | closeParagraphOrListElement () override
void | closeSpan () override
void | openLink (const char *href) override
void | closeLink () override
void | openFoot (const char *id) override
void | closeFoot () override
void | openEndnote (const char *id) override
void | closeEndnote () override
void | openField (const char *type, const char *id) override
void | closeField () override
void | endSection () override
void | startDocument () override
void | endDocument () override
void | insertLineBreak () override
void | insertColumnBreak () override
void | insertPageBreak () override
void | insertText (const char *text) override
void | insertImage (const char *dataid, const char *props) override
void | collectList (const char *, const char *, const char *, const char *, const char *, const char *) override
void | collectData (const char *name, const char *mimeType, const librevenge::RVNGBinaryData &data) override
void | collectHeaderFooter (const char *id, const char *type) override
void | openTable (const char *props) override
void | closeTable () override
void | openCell (const char *props) override
void | closeCell () override
void | openFrame (const char *props, const char *imageId, const char *title, const char *alt) override
void | closeFrame (ABWOutputElements *(&elements), bool &pageFrame) override
void | addFrameElements (ABWOutputElements &elements, bool pageFrame) override
void | addMetadataEntry (const char *name, const char *value) override
Public Member Functions inherited from libabw::ABWCollector
| ABWCollector ()
virtual | ~ABWCollector ()

## Private Member Functions
| ABWContentCollector (const ABWContentCollector &)
ABWContentCollector & | operator= (const ABWContentCollector &)
void | _setMetadata ()
void | _addBorderProperties (const std::map< std::string, std::string > &map, librevenge::RVNGPropertyList &propList, const std::string &defaultUndefBorderProp="")
void | _openPageSpan ()
void | _closePageSpan ()
void | _openSection ()
void | _closeSection ()
void | _openBlock ()
| open a paragraph or a list element (depend on m_currentListLevel) More...
void | _closeBlock ()
| close the current paragraph or list element More...
void | _openParagraph ()
void | _closeParagraph ()
void | _openListElement ()
void | _closeListElement ()
void | _handleListChange ()
void | _changeList ()
void | _recurseListLevels (int oldLevel, int newLevel, int listId)
void | _writeOutDummyListLevels (int oldLevel, int newLevel)
void | _openSpan ()
void | _closeSpan ()
void | _openTable ()
void | _closeTable ()
void | _openTableRow ()
void | _closeTableRow ()
void | _openTableCell ()
void | _closeTableCell ()
void | _openHeader ()
void | _closeHeader ()
void | _openFooter ()
void | _closeFooter ()
void | _recurseTextProperties (const char *name, ABWPropertyMap &styleProps)
std::string | _findDocumentProperty (const char *name)
std::string | _findParagraphProperty (const char *name)
std::string | _findCharacterProperty (const char *name)
std::string | _findTableProperty (const char *name)
std::string | _findCellProperty (const char *name)
std::string | _findSectionProperty (const char *name)
std::string | _findMetadataEntry (const char *name)
void | _fillParagraphProperties (librevenge::RVNGPropertyList &propList, bool isListElement)
bool | _convertFieldDTFormat (std::string const &dtFormat, librevenge::RVNGPropertyListVector &propVect)
int | getCellPos (const char *startProp, const char *endProp, int defStart)

## Private Attributes
std::shared_ptr< ABWContentParsingState > | m_ps
librevenge::RVNGTextInterface * | m_iface
std::stack< std::shared_ptr< ABWContentParsingState > > | m_parsingStates
std::set< std::string > | m_dontLoop
std::map< std::string, ABWStyle > | m_textStyles
ABWPropertyMap | m_documentStyle
ABWPropertyMap | m_metadata
const std::map< std::string, ABWData > & | m_data
const std::map< int, int > & | m_tableSizes
int | m_tableCounter
ABWOutputElements | m_outputElements
ABWOutputElements | m_pageOutputElements
const std::map< int, std::shared_ptr< ABWListElement > > & | m_listElements
std::vector< std::shared_ptr< ABWListElement > > | m_dummyListElements

## Constructor & Destructor Documentation

## ◆ ABWContentCollector() [1/2]

libabw::ABWContentCollector::ABWContentCollector | ( | librevenge::RVNGTextInterface * | iface,
|  | const std::map< int, int > & | tableSizes,
|  | const std::map< std::string, ABWData > & | data,
|  | const std::map< int, std::shared_ptr< ABWListElement >> & | listElements
| ) |  |

## ◆ ~ABWContentCollector()

libabw::ABWContentCollector::~ABWContentCollector | ( |  | ) |
| override

## ◆ ABWContentCollector() [2/2]

libabw::ABWContentCollector::ABWContentCollector | ( | const ABWContentCollector & |  | ) |
| private

## Member Function Documentation

## ◆ _addBorderProperties()

void libabw::ABWContentCollector::_addBorderProperties | ( | const std::map< std::string, std::string > & | map,
|  | librevenge::RVNGPropertyList & | propList,
|  | const std::string & | defaultUndefBorderProp = `""`
| ) |  |
| private

Referenced by _fillParagraphProperties(), and _openTableCell().

## ◆ _changeList()

void libabw::ABWContentCollector::_changeList | ( |  | ) |
| private

Referenced by _closeFooter(), _closeHeader(), _closeSection(), _closeTableCell(), _openListElement(), _openParagraph(), closeEndnote(), closeFoot(), closeFrame(), closeTable(), endDocument(), endSection(), and openTable().

## ◆ _closeBlock()

void libabw::ABWContentCollector::_closeBlock | ( |  | ) |
| private

close the current paragraph or list element

Referenced by _changeList(), _closeFooter(), _closeHeader(), _closeSection(), _closeTableCell(), closeEndnote(), closeFoot(), closeFrame(), closeParagraphOrListElement(), closeTable(), collectParagraphProperties(), endDocument(), insertColumnBreak(), insertPageBreak(), and openTable().

## ◆ _closeFooter()

void libabw::ABWContentCollector::_closeFooter | ( |  | ) |
| private

Referenced by _closePageSpan(), collectSectionProperties(), endDocument(), and endSection().

## ◆ _closeHeader()

void libabw::ABWContentCollector::_closeHeader | ( |  | ) |
| private

Referenced by _closePageSpan(), collectSectionProperties(), endDocument(), and endSection().

## ◆ _closeListElement()

void libabw::ABWContentCollector::_closeListElement | ( |  | ) |
| private

Referenced by _closeBlock().

## ◆ _closePageSpan()

void libabw::ABWContentCollector::_closePageSpan | ( |  | ) |
| private

Referenced by collectSectionProperties(), and endDocument().

## ◆ _closeParagraph()

void libabw::ABWContentCollector::_closeParagraph | ( |  | ) |
| private

Referenced by _closeBlock().

## ◆ _closeSection()

void libabw::ABWContentCollector::_closeSection | ( |  | ) |
| private

Referenced by _closePageSpan(), collectSectionProperties(), endDocument(), and endSection().

## ◆ _closeSpan()

void libabw::ABWContentCollector::_closeSpan | ( |  | ) |
| private

Referenced by _closeBlock(), _closeListElement(), _closeParagraph(), closeLink(), closeSpan(), collectCharacterProperties(), openEndnote(), openFoot(), and openLink().

## ◆ _closeTable()

void libabw::ABWContentCollector::_closeTable | ( |  | ) |
| private

Referenced by _closeFooter(), _closeHeader(), _closeSection(), closeFrame(), and closeTable().

## ◆ _closeTableCell()

void libabw::ABWContentCollector::_closeTableCell | ( |  | ) |
| private

Referenced by _closeTableRow(), and closeCell().

## ◆ _closeTableRow()

void libabw::ABWContentCollector::_closeTableRow | ( |  | ) |
| private

Referenced by _closeTable(), _openTableRow(), and openCell().

## ◆ _convertFieldDTFormat()

bool libabw::ABWContentCollector::_convertFieldDTFormat | ( | std::string const & | dtFormat,
|  | librevenge::RVNGPropertyListVector & | propVect
| ) |  |
| private

Referenced by openField().

## ◆ _fillParagraphProperties()

void libabw::ABWContentCollector::_fillParagraphProperties | ( | librevenge::RVNGPropertyList & | propList,
|  | bool | isListElement
| ) |  |
| private

Referenced by _openListElement(), and _openParagraph().

## ◆ _findCellProperty()

std::string libabw::ABWContentCollector::_findCellProperty | ( | const char * | name | ) |
| private

Referenced by _openTableCell(), and getCellPos().

## ◆ _findCharacterProperty()

std::string libabw::ABWContentCollector::_findCharacterProperty | ( | const char * | name | ) |
| private

Referenced by _openSpan().

## ◆ _findDocumentProperty()

std::string libabw::ABWContentCollector::_findDocumentProperty | ( | const char * | name | ) |
| private

Referenced by _openSection(), and _openSpan().

## ◆ _findMetadataEntry()

std::string libabw::ABWContentCollector::_findMetadataEntry | ( | const char * | name | ) |
| private

Referenced by _setMetadata().

## ◆ _findParagraphProperty()

std::string libabw::ABWContentCollector::_findParagraphProperty | ( | const char * | name | ) |
| private

Referenced by _fillParagraphProperties().

## ◆ _findSectionProperty()

std::string libabw::ABWContentCollector::_findSectionProperty | ( | const char * | name | ) |
| private

Referenced by _openSection().

## ◆ _findTableProperty()

std::string libabw::ABWContentCollector::_findTableProperty | ( | const char * | name | ) |
| private

Referenced by _openTable().

## ◆ _handleListChange()

void libabw::ABWContentCollector::_handleListChange | ( |  | ) |
| private

Referenced by _changeList().

## ◆ _openBlock()

void libabw::ABWContentCollector::_openBlock | ( |  | ) |
| private

open a paragraph or a list element (depend on m_currentListLevel)

Referenced by _openSpan(), addFrameElements(), and openLink().

## ◆ _openFooter()

void libabw::ABWContentCollector::_openFooter | ( |  | ) |
| private

Referenced by _openListElement(), _openParagraph(), _openTable(), and openTable().

## ◆ _openHeader()

void libabw::ABWContentCollector::_openHeader | ( |  | ) |
| private

Referenced by _openListElement(), _openParagraph(), _openTable(), and openTable().

## ◆ _openListElement()

void libabw::ABWContentCollector::_openListElement | ( |  | ) |
| private

Referenced by _openBlock().

## ◆ _openPageSpan()

void libabw::ABWContentCollector::_openPageSpan | ( |  | ) |
| private

Referenced by _openSection(), and endDocument().

## ◆ _openParagraph()

void libabw::ABWContentCollector::_openParagraph | ( |  | ) |
| private

Referenced by _openBlock().

## ◆ _openSection()

void libabw::ABWContentCollector::_openSection | ( |  | ) |
| private

Referenced by _handleListChange(), _openListElement(), _openParagraph(), _openTable(), and openTable().

## ◆ _openSpan()

void libabw::ABWContentCollector::_openSpan | ( |  | ) |
| private

Referenced by _closeTableCell(), closeParagraphOrListElement(), insertImage(), insertLineBreak(), insertText(), openEndnote(), openField(), openFoot(), and openLink().

## ◆ _openTable()

void libabw::ABWContentCollector::_openTable | ( |  | ) |
| private

Referenced by openTable().

## ◆ _openTableCell()

void libabw::ABWContentCollector::_openTableCell | ( |  | ) |
| private

Referenced by _openListElement(), and _openParagraph().

## ◆ _openTableRow()

void libabw::ABWContentCollector::_openTableRow | ( |  | ) |
| private

Referenced by openCell().

## ◆ _recurseListLevels()

void libabw::ABWContentCollector::_recurseListLevels | ( | int | oldLevel,
|  | int | newLevel,
|  | int | listId
| ) |  |
| private

Referenced by _handleListChange().

## ◆ _recurseTextProperties()

void libabw::ABWContentCollector::_recurseTextProperties | ( | const char * | name,
|  | ABWPropertyMap & | styleProps
| ) |  |
| private

Referenced by collectCharacterProperties(), and collectParagraphProperties().

## ◆ _setMetadata()

void libabw::ABWContentCollector::_setMetadata | ( |  | ) |
| private

Referenced by startDocument().

## ◆ _writeOutDummyListLevels()

void libabw::ABWContentCollector::_writeOutDummyListLevels | ( | int | oldLevel,
|  | int | newLevel
| ) |  |
| private

Referenced by _recurseListLevels().

## ◆ addFrameElements()

void libabw::ABWContentCollector::addFrameElements | ( | ABWOutputElements & | elements,
|  | bool | pageFrame
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ addMetadataEntry()

void libabw::ABWContentCollector::addMetadataEntry | ( | const char * | name,
|  | const char * | value
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ closeCell()

void libabw::ABWContentCollector::closeCell | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ closeEndnote()

void libabw::ABWContentCollector::closeEndnote | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ closeField()

void libabw::ABWContentCollector::closeField | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ closeFoot()

void libabw::ABWContentCollector::closeFoot | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ closeFrame()

void libabw::ABWContentCollector::closeFrame | ( | libabw::ABWOutputElements *& | elements,
|  | bool & | pageFrame
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ closeLink()

void libabw::ABWContentCollector::closeLink | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ closeParagraphOrListElement()

void libabw::ABWContentCollector::closeParagraphOrListElement | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ closeSpan()

void libabw::ABWContentCollector::closeSpan | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ closeTable()

void libabw::ABWContentCollector::closeTable | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ collectCharacterProperties()

void libabw::ABWContentCollector::collectCharacterProperties | ( | const char * | style,
|  | const char * | props
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ collectData()

void libabw::ABWContentCollector::collectData | ( | const char * | name,
|  | const char * | mimeType,
|  | const librevenge::RVNGBinaryData & | data
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ collectDocumentProperties()

void libabw::ABWContentCollector::collectDocumentProperties | ( | const char * | props | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ collectHeaderFooter()

void libabw::ABWContentCollector::collectHeaderFooter | ( | const char * | id,
|  | const char * | type
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ collectList()

void libabw::ABWContentCollector::collectList | ( | const char * | ,
|  | const char * | ,
|  | const char * | ,
|  | const char * | ,
|  | const char * | ,
|  | const char * |
| ) |  |
| inlineoverridevirtual

Implements libabw::ABWCollector.

## ◆ collectPageSize()

void libabw::ABWContentCollector::collectPageSize | ( | const char * | width,
|  | const char * | height,
|  | const char * | units,
|  | const char * | pageScale
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ collectParagraphProperties()

void libabw::ABWContentCollector::collectParagraphProperties | ( | const char * | level,
|  | const char * | listid,
|  | const char * | parentid,
|  | const char * | style,
|  | const char * | props
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ collectSectionProperties()

void libabw::ABWContentCollector::collectSectionProperties | ( | const char * | footer,
|  | const char * | footerLeft,
|  | const char * | footerFirst,
|  | const char * | footerLast,
|  | const char * | header,
|  | const char * | headerLeft,
|  | const char * | headerFirst,
|  | const char * | headerLast,
|  | const char * | props
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ collectTextStyle()

void libabw::ABWContentCollector::collectTextStyle | ( | const char * | name,
|  | const char * | basedon,
|  | const char * | followedby,
|  | const char * | props
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ endDocument()

void libabw::ABWContentCollector::endDocument | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ endSection()

void libabw::ABWContentCollector::endSection | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ getCellPos()

int libabw::ABWContentCollector::getCellPos | ( | const char * | startProp,
|  | const char * | endProp,
|  | int | defStart
| ) |  |
| private

Referenced by openCell().

## ◆ insertColumnBreak()

void libabw::ABWContentCollector::insertColumnBreak | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ insertImage()

void libabw::ABWContentCollector::insertImage | ( | const char * | dataid,
|  | const char * | props
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ insertLineBreak()

void libabw::ABWContentCollector::insertLineBreak | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ insertPageBreak()

void libabw::ABWContentCollector::insertPageBreak | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ insertText()

void libabw::ABWContentCollector::insertText | ( | const char * | text | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ openCell()

void libabw::ABWContentCollector::openCell | ( | const char * | props | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ openEndnote()

void libabw::ABWContentCollector::openEndnote | ( | const char * | id | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ openField()

void libabw::ABWContentCollector::openField | ( | const char * | type,
|  | const char * | id
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ openFoot()

void libabw::ABWContentCollector::openFoot | ( | const char * | id | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ openFrame()

void libabw::ABWContentCollector::openFrame | ( | const char * | props,
|  | const char * | imageId,
|  | const char * | title,
|  | const char * | alt
| ) |  |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ openLink()

void libabw::ABWContentCollector::openLink | ( | const char * | href | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ openTable()

void libabw::ABWContentCollector::openTable | ( | const char * | props | ) |
| overridevirtual

Implements libabw::ABWCollector.

## ◆ operator=()

ABWContentCollector& libabw::ABWContentCollector::operator= | ( | const ABWContentCollector & |  | ) |
| private

## ◆ startDocument()

void libabw::ABWContentCollector::startDocument | ( |  | ) |
| overridevirtual

Implements libabw::ABWCollector.

Referenced by _openPageSpan().

## Member Data Documentation

## ◆ m_data

const std::map<std::string, ABWData>& libabw::ABWContentCollector::m_data
| private

Referenced by insertImage(), and openFrame().

## ◆ m_documentStyle

ABWPropertyMap libabw::ABWContentCollector::m_documentStyle
| private

Referenced by _findDocumentProperty(), and collectDocumentProperties().

## ◆ m_dontLoop

std::set<std::string> libabw::ABWContentCollector::m_dontLoop
| private

Referenced by _recurseTextProperties().

## ◆ m_dummyListElements

std::vector<std::shared_ptr<ABWListElement> > libabw::ABWContentCollector::m_dummyListElements
| private

Referenced by _writeOutDummyListLevels().

## ◆ m_iface

librevenge::RVNGTextInterface* libabw::ABWContentCollector::m_iface
| private

Referenced by _setMetadata(), endDocument(), and startDocument().

## ◆ m_listElements

const std::map<int, std::shared_ptr<ABWListElement> >& libabw::ABWContentCollector::m_listElements
| private

Referenced by _recurseListLevels().

## ◆ m_metadata

ABWPropertyMap libabw::ABWContentCollector::m_metadata
| private

Referenced by _findMetadataEntry(), and addMetadataEntry().

## ◆ m_outputElements

ABWOutputElements libabw::ABWContentCollector::m_outputElements
| private

Referenced by _closeFooter(), _closeHeader(), _closeListElement(), _closePageSpan(), _closeParagraph(), _closeSection(), _closeSpan(), _closeTable(), _closeTableCell(), _closeTableRow(), _handleListChange(), _openFooter(), _openHeader(), _openListElement(), _openPageSpan(), _openParagraph(), _openSection(), _openSpan(), _openTable(), _openTableCell(), _openTableRow(), _recurseListLevels(), _writeOutDummyListLevels(), addFrameElements(), closeEndnote(), closeFoot(), closeFrame(), closeLink(), endDocument(), insertImage(), insertLineBreak(), insertText(), openEndnote(), openField(), openFoot(), openFrame(), and openLink().

## ◆ m_pageOutputElements

ABWOutputElements libabw::ABWContentCollector::m_pageOutputElements
| private

Referenced by addFrameElements(), and endDocument().

## ◆ m_parsingStates

std::stack<std::shared_ptr<ABWContentParsingState> > libabw::ABWContentCollector::m_parsingStates
| private

Referenced by closeEndnote(), closeFoot(), openEndnote(), and openFoot().

## ◆ m_ps

std::shared_ptr<ABWContentParsingState> libabw::ABWContentCollector::m_ps
| private

Referenced by _closeBlock(), _closeFooter(), _closeHeader(), _closeListElement(), _closePageSpan(), _closeParagraph(), _closeSection(), _closeSpan(), _closeTable(), _closeTableCell(), _closeTableRow(), _fillParagraphProperties(), _findCellProperty(), _findCharacterProperty(), _findParagraphProperty(), _findSectionProperty(), _findTableProperty(), _handleListChange(), _openBlock(), _openFooter(), _openHeader(), _openListElement(), _openPageSpan(), _openParagraph(), _openSection(), _openSpan(), _openTable(), _openTableCell(), _openTableRow(), _recurseListLevels(), _writeOutDummyListLevels(), closeCell(), closeEndnote(), closeFoot(), closeFrame(), closeLink(), closeParagraphOrListElement(), closeSpan(), closeTable(), collectCharacterProperties(), collectHeaderFooter(), collectPageSize(), collectParagraphProperties(), collectSectionProperties(), endDocument(), endSection(), insertColumnBreak(), insertImage(), insertLineBreak(), insertPageBreak(), insertText(), openCell(), openEndnote(), openField(), openFoot(), openFrame(), openLink(), openTable(), and startDocument().

## ◆ m_tableCounter

int libabw::ABWContentCollector::m_tableCounter
| private

Referenced by openTable().

## ◆ m_tableSizes

const std::map<int, int>& libabw::ABWContentCollector::m_tableSizes
| private

Referenced by _openTable().

## ◆ m_textStyles

std::map<std::string, ABWStyle> libabw::ABWContentCollector::m_textStyles
| private

Referenced by _recurseTextProperties(), and collectTextStyle().

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

- ABWContentCollector.h
- ABWContentCollector.cpp