#include <WPXContentListener.h>
Protected Member Functions | |
WPXContentListener (std::list< WPXPageSpan > &pageList, WPXDocumentInterface *documentInterface) | |
virtual | ~WPXContentListener () |
void | startDocument () |
void | startSubDocument () |
void | endDocument () |
void | endSubDocument () |
void | handleSubDocument (const WPXSubDocument *subDocument, WPXSubDocumentType subDocumentType, WPXTableList tableList, int nextTableIndice) |
Creates an new document state. | |
void | insertBreak (const uint8_t breakType) |
void | lineSpacingChange (const double lineSpacing) |
void | justificationChange (const uint8_t justification) |
virtual void | _handleSubDocument (const WPXSubDocument *subDocument, WPXSubDocumentType subDocumentType, WPXTableList tableList, int nextTableIndice)=0 |
virtual void | _flushText ()=0 |
virtual void | _changeList ()=0 |
void | _openSection () |
void | _closeSection () |
void | _openPageSpan () |
void | _closePageSpan () |
void | _appendParagraphProperties (WPXPropertyList &propList, const bool isListElement=false) |
void | _getTabStops (WPXPropertyListVector &tabStops) |
void | _appendJustification (WPXPropertyList &propList, int justification) |
void | _resetParagraphState (const bool isListElement=false) |
virtual void | _openParagraph () |
void | _closeParagraph () |
void | _openListElement () |
void | _closeListElement () |
void | _openSpan () |
void | _closeSpan () |
void | _openTable () |
void | _closeTable () |
void | _openTableRow (const double height, const bool isMinimumHeight, const bool isHeaderRow) |
void | _closeTableRow () |
void | _openTableCell (const uint8_t colSpan, const uint8_t rowSpan, const uint8_t borderBits, const RGBSColor *cellFgColor, const RGBSColor *cellBgColor, const RGBSColor *cellBorderColor, const WPXVerticalAlignment cellVerticalAlignment) |
void | _closeTableCell () |
double | _movePositionToFirstColumn (double position) |
double | _getNextTabStop () const |
double | _getPreviousTabStop () const |
void | _insertText (const WPXString &textBuffer) |
void | _insertBreakIfNecessary (WPXPropertyList &propList) |
void | _insertPageNumberParagraph (WPXPageNumberPosition position, WPXNumberingType type, WPXString fontName, double fontSize) |
uint16_t | _mapNonUnicodeCharacter (uint16_t character) |
Protected Attributes | |
WPXContentParsingState * | m_ps |
WPXDocumentInterface * | m_documentInterface |
WPXPropertyList | m_metaData |
Private Member Functions | |
WPXContentListener (const WPXContentListener &) | |
WPXContentListener & | operator= (const WPXContentListener &) |
WPXString | _colorToString (const RGBSColor *color) |
WPXString | _mergeColorsToString (const RGBSColor *fgColor, const RGBSColor *bgColor) |
uint16_t | _mapSymbolFontCharacter (uint16_t character) |
uint16_t | _mapDingbatsFontCharacter (uint16_t character) |
WPXContentListener::WPXContentListener | ( | std::list< WPXPageSpan > & | pageList, |
WPXDocumentInterface * | documentInterface | ||
) | [protected] |
WPXContentListener::~WPXContentListener | ( | ) | [protected, virtual] |
WPXContentListener::WPXContentListener | ( | const WPXContentListener & | ) | [private] |
void WPXContentListener::_appendJustification | ( | WPXPropertyList & | propList, |
int | justification | ||
) | [protected] |
Referenced by _appendParagraphProperties().
void WPXContentListener::_appendParagraphProperties | ( | WPXPropertyList & | propList, |
const bool | isListElement = false |
||
) | [protected] |
Referenced by _openListElement(), and _openParagraph().
virtual void WPXContentListener::_changeList | ( | ) | [protected, pure virtual] |
Implemented in WP1ContentListener, WP3ContentListener, WP42ContentListener, WP5ContentListener, and WP6ContentListener.
Referenced by _closeSection(), _closeTable(), _closeTableCell(), _openSpan(), endDocument(), and endSubDocument().
void WPXContentListener::_closeListElement | ( | ) | [protected] |
Referenced by WP6ContentListener::_changeList(), _closeSection(), _closeTable(), _closeTableCell(), WP6ContentListener::_handleSubDocument(), WP5ContentListener::_handleSubDocument(), WP42ContentListener::_handleSubDocument(), WP3ContentListener::_handleSubDocument(), WP1ContentListener::_handleSubDocument(), WP6ContentListener::defineTable(), endDocument(), endSubDocument(), insertBreak(), WP6ContentListener::insertEOL(), WP5ContentListener::insertEOL(), WP42ContentListener::insertEOL(), WP3ContentListener::insertEOL(), WP1ContentListener::insertEOL(), justificationChange(), WP6ContentListener::paragraphMarginChange(), and WP6ContentListener::styleGroupOn().
void WPXContentListener::_closePageSpan | ( | ) | [protected] |
Referenced by _closeListElement(), _closeParagraph(), _closeTable(), endDocument(), and insertBreak().
void WPXContentListener::_closeParagraph | ( | ) | [protected] |
Referenced by WP6ContentListener::_changeList(), _closeSection(), _closeTable(), _closeTableCell(), WP6ContentListener::_handleSubDocument(), WP5ContentListener::_handleSubDocument(), WP42ContentListener::_handleSubDocument(), WP3ContentListener::_handleSubDocument(), WP1ContentListener::_handleSubDocument(), WP6ContentListener::defineTable(), endDocument(), endSubDocument(), handleSubDocument(), insertBreak(), WP6ContentListener::insertEOL(), WP5ContentListener::insertEOL(), WP42ContentListener::insertEOL(), WP3ContentListener::insertEOL(), WP1ContentListener::insertEOL(), justificationChange(), WP6ContentListener::paragraphMarginChange(), and WP6ContentListener::styleGroupOn().
void WPXContentListener::_closeSection | ( | ) | [protected] |
Referenced by _closePageSpan(), _closeTable(), WP6ContentListener::_handleSubDocument(), WP5ContentListener::_handleSubDocument(), WP42ContentListener::_handleSubDocument(), WP3ContentListener::_handleSubDocument(), WP1ContentListener::_handleSubDocument(), _openListElement(), _openParagraph(), WP6ContentListener::columnChange(), WP3ContentListener::columnChange(), endDocument(), handleSubDocument(), WP6ContentListener::startTable(), WP5ContentListener::startTable(), WP3ContentListener::startTable(), and WP6ContentListener::styleGroupOn().
void WPXContentListener::_closeSpan | ( | ) | [protected] |
Referenced by _closeListElement(), _closeParagraph(), WP6ContentListener::attributeChange(), WP5ContentListener::attributeChange(), WP42ContentListener::attributeChange(), WP3ContentListener::attributeChange(), WP1ContentListener::attributeChange(), WP6ContentListener::characterColorChange(), WP5ContentListener::characterColorChange(), WP6ContentListener::characterShadingChange(), WP6ContentListener::commentAnnotation(), WP6ContentListener::fontChange(), WP1ContentListener::fontId(), WP1ContentListener::fontPointSize(), WP6ContentListener::highlightChange(), WP5ContentListener::insertNote(), WP3ContentListener::insertNote(), WP1ContentListener::insertNote(), WP6ContentListener::noteOn(), WP5ContentListener::setFont(), WP3ContentListener::setFontSize(), WP3ContentListener::setTextColor(), and WP3ContentListener::setTextFont().
void WPXContentListener::_closeTable | ( | ) | [protected] |
void WPXContentListener::_closeTableCell | ( | ) | [protected] |
Referenced by _closeTableRow(), _openTableCell(), and WP3ContentListener::closeCell().
void WPXContentListener::_closeTableRow | ( | ) | [protected] |
Referenced by _closeTable(), _openTableRow(), and WP3ContentListener::closeRow().
Referenced by _openSpan(), and _openTableCell().
virtual void WPXContentListener::_flushText | ( | ) | [protected, pure virtual] |
Implemented in WP1ContentListener, WP3ContentListener, WP42ContentListener, WP5ContentListener, and WP6ContentListener.
Referenced by _closeSpan().
double WPXContentListener::_getNextTabStop | ( | ) | const [protected] |
double WPXContentListener::_getPreviousTabStop | ( | ) | const [protected] |
Referenced by WP3ContentListener::backTab().
void WPXContentListener::_getTabStops | ( | WPXPropertyListVector & | tabStops ) | [protected] |
Referenced by _openListElement(), and _openParagraph().
virtual void WPXContentListener::_handleSubDocument | ( | const WPXSubDocument * | subDocument, |
WPXSubDocumentType | subDocumentType, | ||
WPXTableList | tableList, | ||
int | nextTableIndice | ||
) | [protected, pure virtual] |
Implemented in WP1ContentListener, WP3ContentListener, WP42ContentListener, WP5ContentListener, and WP6ContentListener.
Referenced by handleSubDocument().
void WPXContentListener::_insertBreakIfNecessary | ( | WPXPropertyList & | propList ) | [protected] |
Referenced by _appendParagraphProperties(), and _openTable().
void WPXContentListener::_insertPageNumberParagraph | ( | WPXPageNumberPosition | position, |
WPXNumberingType | type, | ||
WPXString | fontName, | ||
double | fontSize | ||
) | [protected] |
Referenced by _openPageSpan().
void WPXContentListener::_insertText | ( | const WPXString & | textBuffer ) | [protected] |
uint16_t WPXContentListener::_mapDingbatsFontCharacter | ( | uint16_t | character ) | [private] |
Referenced by _mapNonUnicodeCharacter().
uint16_t WPXContentListener::_mapNonUnicodeCharacter | ( | uint16_t | character ) | [protected] |
uint16_t WPXContentListener::_mapSymbolFontCharacter | ( | uint16_t | character ) | [private] |
Referenced by _mapNonUnicodeCharacter().
WPXString WPXContentListener::_mergeColorsToString | ( | const RGBSColor * | fgColor, |
const RGBSColor * | bgColor | ||
) | [private] |
Referenced by _openTableCell().
double WPXContentListener::_movePositionToFirstColumn | ( | double | position ) | [protected] |
Referenced by _openTable(), WP3ContentListener::defineTable(), and WP6ContentListener::insertTab().
void WPXContentListener::_openListElement | ( | ) | [protected] |
Referenced by _openSpan(), WP6ContentListener::insertTab(), and WP5ContentListener::insertTab().
void WPXContentListener::_openPageSpan | ( | ) | [protected] |
void WPXContentListener::_openParagraph | ( | ) | [protected, virtual] |
void WPXContentListener::_openSection | ( | ) | [protected] |
void WPXContentListener::_openSpan | ( | ) | [protected] |
Referenced by _closeTableCell(), WP6ContentListener::_handleSubDocument(), WP5ContentListener::_handleSubDocument(), WP42ContentListener::_handleSubDocument(), WP3ContentListener::_handleSubDocument(), WP1ContentListener::_handleSubDocument(), WP6ContentListener::boxOn(), WP5ContentListener::boxOn(), WP6ContentListener::displayNumberReferenceGroupOff(), endDocument(), WP6ContentListener::handleLineBreak(), handleSubDocument(), insertBreak(), WP6ContentListener::insertCharacter(), WP5ContentListener::insertCharacter(), WP42ContentListener::insertCharacter(), WP3ContentListener::insertCharacter(), WP1ContentListener::insertCharacter(), WP6ContentListener::insertEOL(), WP5ContentListener::insertEOL(), WP42ContentListener::insertEOL(), WP3ContentListener::insertEOL(), WP1ContentListener::insertEOL(), WP1ContentListener::insertExtendedCharacter(), WP5ContentListener::insertIndent(), WP3ContentListener::insertPageNumber(), WP3ContentListener::insertPicture(), WP1ContentListener::insertPicture(), WP6ContentListener::insertTab(), WP5ContentListener::insertTab(), WP42ContentListener::insertTab(), WP3ContentListener::insertTab(), WP1ContentListener::insertTab(), WP3ContentListener::insertTextBox(), and WP3ContentListener::insertWP51Table().
void WPXContentListener::_openTable | ( | ) | [protected] |
void WPXContentListener::_openTableCell | ( | const uint8_t | colSpan, |
const uint8_t | rowSpan, | ||
const uint8_t | borderBits, | ||
const RGBSColor * | cellFgColor, | ||
const RGBSColor * | cellBgColor, | ||
const RGBSColor * | cellBorderColor, | ||
const WPXVerticalAlignment | cellVerticalAlignment | ||
) | [protected] |
void WPXContentListener::_openTableRow | ( | const double | height, |
const bool | isMinimumHeight, | ||
const bool | isHeaderRow | ||
) | [protected] |
void WPXContentListener::_resetParagraphState | ( | const bool | isListElement = false ) |
[protected] |
Referenced by _openListElement(), and _openParagraph().
void WPXContentListener::endDocument | ( | ) | [protected] |
Reimplemented in WP1ContentListener, WP3ContentListener, WP42ContentListener, WP5ContentListener, and WP6ContentListener.
void WPXContentListener::endSubDocument | ( | ) | [protected] |
Reimplemented in WP1ContentListener, WP3ContentListener, WP42ContentListener, WP5ContentListener, and WP6ContentListener.
void WPXContentListener::handleSubDocument | ( | const WPXSubDocument * | subDocument, |
WPXSubDocumentType | subDocumentType, | ||
WPXTableList | tableList, | ||
int | nextTableIndice | ||
) | [protected] |
Creates an new document state.
Saves the old state on a "stack".
Referenced by _openPageSpan(), WP6ContentListener::commentAnnotation(), WP5ContentListener::insertNote(), WP3ContentListener::insertNote(), WP1ContentListener::insertNote(), WP6ContentListener::insertTextBox(), WP3ContentListener::insertTextBox(), WP3ContentListener::insertWP51Table(), and WP6ContentListener::noteOff().
void WPXContentListener::insertBreak | ( | const uint8_t | breakType ) | [protected] |
Reimplemented in WP1ContentListener, WP3ContentListener, WP42ContentListener, WP5ContentListener, and WP6ContentListener.
void WPXContentListener::justificationChange | ( | const uint8_t | justification ) | [protected] |
Reimplemented in WP1ContentListener, WP3ContentListener, WP5ContentListener, and WP6ContentListener.
void WPXContentListener::lineSpacingChange | ( | const double | lineSpacing ) | [protected] |
Reimplemented in WP3ContentListener, WP5ContentListener, and WP6ContentListener.
WPXContentListener& WPXContentListener::operator= | ( | const WPXContentListener & | ) | [private] |
void WPXContentListener::startDocument | ( | ) | [protected] |
Reimplemented in WP1ContentListener, WP3ContentListener, WP42ContentListener, WP5ContentListener, and WP6ContentListener.
Referenced by _openPageSpan().
void WPXContentListener::startSubDocument | ( | ) | [protected] |
Reimplemented in WP1ContentListener, WP3ContentListener, WP42ContentListener, WP5ContentListener, and WP6ContentListener.
Referenced by _closeListElement(), _closePageSpan(), _closeParagraph(), _closeSection(), _closeSpan(), _closeTable(), _closeTableCell(), _closeTableRow(), WP6ContentListener::_flushText(), WP6ContentListener::_handleListChange(), _insertPageNumberParagraph(), _insertText(), _openListElement(), _openPageSpan(), _openParagraph(), _openSection(), _openSpan(), _openTable(), _openTableCell(), _openTableRow(), WP6ContentListener::boxOff(), WP5ContentListener::boxOff(), WP6ContentListener::boxOn(), WP5ContentListener::boxOn(), WP6ContentListener::commentAnnotation(), WP6ContentListener::displayNumberReferenceGroupOff(), endDocument(), WP6ContentListener::handleLineBreak(), WP1ContentListener::insertCharacter(), WP1ContentListener::insertEOL(), WP1ContentListener::insertExtendedCharacter(), WP6ContentListener::insertGraphicsData(), WP5ContentListener::insertGraphicsData(), WP5ContentListener::insertIndent(), WP5ContentListener::insertNote(), WP3ContentListener::insertNote(), WP1ContentListener::insertNote(), WP3ContentListener::insertPicture(), WP1ContentListener::insertPicture(), WP6ContentListener::insertTab(), WP5ContentListener::insertTab(), WP42ContentListener::insertTab(), WP3ContentListener::insertTab(), WP1ContentListener::insertTab(), WP6ContentListener::insertTextBox(), WP3ContentListener::insertTextBox(), WP3ContentListener::insertWP51Table(), WP6ContentListener::noteOff(), and startDocument().
WPXPropertyList WPXContentListener::m_metaData [protected] |
Referenced by WP6ContentListener::setDate(), WP6ContentListener::setExtendedInformation(), and startDocument().
WPXContentParsingState* WPXContentListener::m_ps [protected] |
Referenced by _appendParagraphProperties(), WP6ContentListener::_changeList(), _closeListElement(), _closePageSpan(), _closeParagraph(), _closeSection(), _closeSpan(), _closeTable(), _closeTableCell(), _closeTableRow(), WP6ContentListener::_flushText(), _getNextTabStop(), _getPreviousTabStop(), _getTabStops(), WP3ContentListener::_handleFrameParameters(), WP6ContentListener::_handleListChange(), WP6ContentListener::_handleSubDocument(), WP5ContentListener::_handleSubDocument(), WP42ContentListener::_handleSubDocument(), WP3ContentListener::_handleSubDocument(), WP1ContentListener::_handleSubDocument(), _insertBreakIfNecessary(), _mapNonUnicodeCharacter(), _movePositionToFirstColumn(), _openListElement(), _openPageSpan(), _openParagraph(), WP3ContentListener::_openParagraph(), _openSection(), _openSpan(), _openTable(), _openTableCell(), _openTableRow(), WP6ContentListener::_paragraphNumberOn(), _resetParagraphState(), WP6ContentListener::addTableColumnDefinition(), WP5ContentListener::addTableColumnDefinition(), WP3ContentListener::addTableColumnDefinition(), WP6ContentListener::attributeChange(), WP5ContentListener::attributeChange(), WP42ContentListener::attributeChange(), WP3ContentListener::attributeChange(), WP1ContentListener::attributeChange(), WP3ContentListener::backTab(), WP6ContentListener::boxOn(), WP5ContentListener::boxOn(), WP1ContentListener::centerOn(), WP6ContentListener::characterColorChange(), WP5ContentListener::characterColorChange(), WP6ContentListener::characterShadingChange(), WP6ContentListener::columnChange(), WP3ContentListener::columnChange(), WP6ContentListener::commentAnnotation(), WP6ContentListener::defineTable(), WP5ContentListener::defineTable(), WP3ContentListener::defineTable(), WP6ContentListener::defineTabStops(), WP6ContentListener::displayNumberReferenceGroupOn(), endDocument(), endSubDocument(), WP6ContentListener::endTable(), WP5ContentListener::endTable(), WP3ContentListener::endTable(), WP1ContentListener::flushRightOn(), WP6ContentListener::fontChange(), WP1ContentListener::fontId(), WP1ContentListener::fontPointSize(), WP6ContentListener::handleLineBreak(), handleSubDocument(), WP6ContentListener::highlightChange(), WP6ContentListener::indentFirstLineChange(), WP3ContentListener::indentFirstLineChange(), insertBreak(), WP6ContentListener::insertCell(), WP5ContentListener::insertCell(), WP3ContentListener::insertCell(), WP6ContentListener::insertCharacter(), WP5ContentListener::insertCharacter(), WP42ContentListener::insertCharacter(), WP3ContentListener::insertCharacter(), WP1ContentListener::insertCharacter(), WP6ContentListener::insertEOL(), WP5ContentListener::insertEOL(), WP42ContentListener::insertEOL(), WP3ContentListener::insertEOL(), WP1ContentListener::insertEOL(), WP1ContentListener::insertExtendedCharacter(), WP5ContentListener::insertIndent(), WP5ContentListener::insertNote(), WP3ContentListener::insertNote(), WP1ContentListener::insertNote(), WP5ContentListener::insertNoteReference(), WP3ContentListener::insertPageNumber(), WP3ContentListener::insertPicture(), WP1ContentListener::insertPicture(), WP6ContentListener::insertRow(), WP6ContentListener::insertTab(), WP5ContentListener::insertTab(), WP42ContentListener::insertTab(), WP3ContentListener::insertTab(), WP1ContentListener::insertTab(), WP3ContentListener::insertTextBox(), WP3ContentListener::insertWP51Table(), justificationChange(), WP3ContentListener::justificationChange(), WP1ContentListener::justificationChange(), WP3ContentListener::leftIndent(), WP1ContentListener::leftIndent(), WP1ContentListener::leftMarginRelease(), WP3ContentListener::leftRightIndent(), WP1ContentListener::leftRightIndent(), lineSpacingChange(), WP6ContentListener::marginChange(), WP5ContentListener::marginChange(), WP3ContentListener::marginChange(), WP42ContentListener::marginReset(), WP1ContentListener::marginReset(), WP6ContentListener::noteOff(), WP6ContentListener::noteOn(), WP6ContentListener::paragraphMarginChange(), WP6ContentListener::setAlignmentCharacter(), WP5ContentListener::setFont(), WP3ContentListener::setFontSize(), WP6ContentListener::setLeaderCharacter(), WP5ContentListener::setTabs(), WP3ContentListener::setTabs(), WP1ContentListener::setTabs(), WP3ContentListener::setTextColor(), WP3ContentListener::setTextFont(), WP6ContentListener::spacingAfterParagraphChange(), startDocument(), startSubDocument(), WP6ContentListener::startTable(), WP5ContentListener::startTable(), WP3ContentListener::startTable(), WP6ContentListener::styleGroupOn(), WP1ContentListener::WP1ContentListener(), WP42ContentListener::WP42ContentListener(), and ~WPXContentListener().