WP5ContentListener Class Reference

`#include <WP5ContentListener.h>`

Inheritance diagram for WP5ContentListener:

## Public Member Functions

| WP5ContentListener (std::list< WPXPageSpan > &pageList, librevenge::RVNGTextInterface *documentInterface)
| ~WP5ContentListener () override
void | startDocument () override
void | startSubDocument () override
void | setFont (const librevenge::RVNGString &fontName, double fontSize) override
void | setTabs (const std::vector< WPXTabStop > &tabStops, unsigned short tabOffset) override
void | insertCharacter (unsigned character) override
void | insertTab (unsigned char tabType, double tabPosition) override
void | insertIndent (unsigned char indentType, double indentPosition) override
void | insertEOL () override
void | insertBreak (unsigned char breakType) override
void | lineSpacingChange (double lineSpacing) override
void | justificationChange (unsigned char justification) override
void | characterColorChange (unsigned char red, unsigned char green, unsigned char blue) override
void | attributeChange (bool isOn, unsigned char attribute) override
void | pageMarginChange (unsigned char, unsigned short) override
void | pageFormChange (unsigned short, unsigned short, WPXFormOrientation) override
void | marginChange (unsigned char side, unsigned short margin) override
void | paragraphMarginChange (unsigned char, signed short)
void | endDocument () override
void | endSubDocument () override
void | defineTable (unsigned char position, unsigned short leftOffset) override
void | addTableColumnDefinition (unsigned width, unsigned leftGutter, unsigned rightGutter, unsigned attributes, unsigned char alignment) override
void | startTable () override
void | insertRow (unsigned short rowHeight, bool isMinimumHeight, bool isHeaderRow) override
void | insertCell (unsigned char colSpan, unsigned char rowSpan, unsigned char borderBits, const RGBSColor *cellFgColor, const RGBSColor *cellBgColor, const RGBSColor *cellBorderColor, WPXVerticalAlignment cellVerticalAlignment, bool useCellAttributes, unsigned cellAttributes) override
void | endTable () override
void | insertNoteReference (const librevenge::RVNGString &noteReference) override
void | insertNote (WPXNoteType noteType, const WP5SubDocument *subDocument) override
void | headerFooterGroup (unsigned char headerFooterType, unsigned char occurrenceBits, const std::shared_ptr< WP5SubDocument > &subDocument) override
void | suppressPageCharacteristics (unsigned char) override
void | setDefaultFont (const librevenge::RVNGString &fontName, double fontSize)
void | boxOn (unsigned char positionAndType, unsigned char alignment, unsigned short width, unsigned short height, unsigned short x, unsigned short y) override
void | boxOff () override
void | insertGraphicsData (const librevenge::RVNGBinaryData *data) override
Public Member Functions inherited from WP5Listener
| WP5Listener ()
virtual | ~WP5Listener ()
void | setPrefixData (WP5PrefixData *prefixData)
const WP5GeneralPacketData * | getGeneralPacketData (const int type) const

## Protected Member Functions

void | _handleSubDocument (const WPXSubDocument *subDocument, WPXSubDocumentType subDocumentType, WPXTableList tableList, unsigned nextTableIndice=0) override
void | _flushText () override
void | _changeList () override
Protected Member Functions inherited from WPXContentListener
| WPXContentListener (std::list< WPXPageSpan > &pageList, librevenge::RVNGTextInterface *documentInterface)
| ~WPXContentListener () override
void | startDocument ()
void | startSubDocument ()
void | endDocument ()
void | endSubDocument ()
void | handleSubDocument (const WPXSubDocument *subDocument, WPXSubDocumentType subDocumentType, WPXTableList tableList, unsigned nextTableIndice)
| Creates an new document state.
void | insertBreak (const unsigned char breakType)
void | lineSpacingChange (const double lineSpacing)
void | justificationChange (const unsigned char justification)
void | _openSection ()
void | _closeSection ()
void | _openPageSpan ()
void | _closePageSpan ()
void | _appendParagraphProperties (librevenge::RVNGPropertyList &propList, const bool isListElement=false)
void | _getTabStops (librevenge::RVNGPropertyListVector &tabStops)
void | _appendJustification (librevenge::RVNGPropertyList &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 unsigned char colSpan, const unsigned char rowSpan, const unsigned char 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 librevenge::RVNGString &textBuffer)
void | _insertBreakIfNecessary (librevenge::RVNGPropertyList &propList)
void | _insertPageNumberParagraph (WPXPageNumberPosition position, WPXNumberingType type, librevenge::RVNGString fontName, double fontSize)
unsigned | _mapNonUnicodeCharacter (unsigned character)
Protected Member Functions inherited from WPXListener
| WPXListener (std::list< WPXPageSpan > &pageList)
virtual | ~WPXListener ()
bool | isUndoOn ()
void | setUndoOn (bool isOn)

## Private Member Functions

| WP5ContentListener (const WP5ContentListener &)
WP5ContentListener & | operator= (const WP5ContentListener &)

## Private Attributes

std::unique_ptr< WP5ContentParsingState > | m_parseState
double | m_defaultFontSize
librevenge::RVNGString | m_defaultFontName

## Additional Inherited Members

Protected Attributes inherited from WPXContentListener
std::unique_ptr< WPXContentParsingState > | m_ps
librevenge::RVNGTextInterface * | m_documentInterface
librevenge::RVNGPropertyList | m_metaData
Protected Attributes inherited from WPXListener
std::list< WPXPageSpan > & | m_pageList

## Constructor & Destructor Documentation

## WP5ContentListener() [1/2]

WP5ContentListener::WP5ContentListener | ( | std::list< WPXPageSpan > & | pageList,
|  | librevenge::RVNGTextInterface * | documentInterface )

Referenced by operator=(), and WP5ContentListener().

## ~WP5ContentListener()

WP5ContentListener::~WP5ContentListener | ( |  | ) |

override

## WP5ContentListener() [2/2]

WP5ContentListener::WP5ContentListener | ( | const WP5ContentListener & |  | ) |

private

## Member Function Documentation

## _changeList()

void WP5ContentListener::_changeList | ( |  | ) |

inline override protected virtual

Implements WPXContentListener.

Referenced by _handleSubDocument().

## _flushText()

void WP5ContentListener::_flushText | ( |  | ) |

override protected virtual

Implements WPXContentListener.

Referenced by boxOn(), endTable(), insertCell(), insertIndent(), insertNote(), insertRow(), and insertTab().

## _handleSubDocument()

void WP5ContentListener::_handleSubDocument | ( | const WPXSubDocument * | subDocument,
|  | WPXSubDocumentType | subDocumentType,
|  | WPXTableList | tableList,
|  | unsigned | nextTableIndice = 0 )

override protected virtual

Implements WPXContentListener.

## addTableColumnDefinition()

void WP5ContentListener::addTableColumnDefinition | ( | unsigned | width,
|  | unsigned | leftGutter,
|  | unsigned | rightGutter,
|  | unsigned | attributes,
|  | unsigned char | alignment )

override virtual

Implements WP5Listener.

## attributeChange()

void WP5ContentListener::attributeChange | ( | bool | isOn,
|  | unsigned char | attribute )

override virtual

Implements WP5Listener.

## boxOff()

void WP5ContentListener::boxOff | ( |  | ) |

override virtual

Implements WP5Listener.

## boxOn()

void WP5ContentListener::boxOn | ( | unsigned char | positionAndType,
|  | unsigned char | alignment,
|  | unsigned short | width,
|  | unsigned short | height,
|  | unsigned short | x,
|  | unsigned short | y )

override virtual

Implements WP5Listener.

## characterColorChange()

void WP5ContentListener::characterColorChange | ( | unsigned char | red,
|  | unsigned char | green,
|  | unsigned char | blue )

override virtual

Implements WP5Listener.

## defineTable()

void WP5ContentListener::defineTable | ( | unsigned char | position,
|  | unsigned short | leftOffset )

override virtual

Implements WP5Listener.

## endDocument()

void WP5ContentListener::endDocument | ( |  | ) |

inline override virtual

Implements WP5Listener.

## endSubDocument()

void WP5ContentListener::endSubDocument | ( |  | ) |

inline override virtual

Implements WP5Listener.

Referenced by WP5Parser::parseSubDocument().

## endTable()

void WP5ContentListener::endTable | ( |  | ) |

override virtual

Implements WP5Listener.

## headerFooterGroup()

void WP5ContentListener::headerFooterGroup | ( | unsigned char | headerFooterType,
|  | unsigned char | occurrenceBits,
|  | const std::shared_ptr< WP5SubDocument > & | subDocument )

override virtual

Implements WP5Listener.

## insertBreak()

void WP5ContentListener::insertBreak | ( | unsigned char | breakType | ) |

inline override virtual

Implements WP5Listener.

## insertCell()

void WP5ContentListener::insertCell | ( | unsigned char | colSpan,
|  | unsigned char | rowSpan,
|  | unsigned char | borderBits,
|  | const RGBSColor * | cellFgColor,
|  | const RGBSColor * | cellBgColor,
|  | const RGBSColor * | cellBorderColor,
|  | WPXVerticalAlignment | cellVerticalAlignment,
|  | bool | useCellAttributes,
|  | unsigned | cellAttributes )

override virtual

Implements WP5Listener.

## insertCharacter()

void WP5ContentListener::insertCharacter | ( | unsigned | character | ) |

override virtual

Implements WP5Listener.

## insertEOL()

void WP5ContentListener::insertEOL | ( |  | ) |

override virtual

Implements WP5Listener.

## insertGraphicsData()

void WP5ContentListener::insertGraphicsData | ( | const librevenge::RVNGBinaryData * | data | ) |

override virtual

Implements WP5Listener.

## insertIndent()

void WP5ContentListener::insertIndent | ( | unsigned char | indentType,
|  | double | indentPosition )

override virtual

Implements WP5Listener.

## insertNote()

void WP5ContentListener::insertNote | ( | WPXNoteType | noteType,
|  | const WP5SubDocument * | subDocument )

override virtual

Implements WP5Listener.

## insertNoteReference()

void WP5ContentListener::insertNoteReference | ( | const librevenge::RVNGString & | noteReference | ) |

override virtual

Implements WP5Listener.

## insertRow()

void WP5ContentListener::insertRow | ( | unsigned short | rowHeight,
|  | bool | isMinimumHeight,
|  | bool | isHeaderRow )

override virtual

Implements WP5Listener.

## insertTab()

void WP5ContentListener::insertTab | ( | unsigned char | tabType,
|  | double | tabPosition )

override virtual

Implements WP5Listener.

## justificationChange()

void WP5ContentListener::justificationChange | ( | unsigned char | justification | ) |

inline override virtual

Implements WP5Listener.

Referenced by insertCell().

## lineSpacingChange()

void WP5ContentListener::lineSpacingChange | ( | double | lineSpacing | ) |

inline override virtual

Implements WP5Listener.

## marginChange()

void WP5ContentListener::marginChange | ( | unsigned char | side,
|  | unsigned short | margin )

override virtual

Implements WP5Listener.

Referenced by _handleSubDocument().

## operator=()

WP5ContentListener & WP5ContentListener::operator= | ( | const WP5ContentListener & |  | ) |

private

## pageFormChange()

void WP5ContentListener::pageFormChange | ( | unsigned short | ,
|  | unsigned short | ,
|  | WPXFormOrientation | )

inline override virtual

Implements WP5Listener.

## pageMarginChange()

void WP5ContentListener::pageMarginChange | ( | unsigned char | ,
|  | unsigned short | )

inline override virtual

Implements WP5Listener.

## paragraphMarginChange()

void WP5ContentListener::paragraphMarginChange | ( | unsigned char | ,
|  | signed short | )

inline

## setDefaultFont()

void WP5ContentListener::setDefaultFont | ( | const librevenge::RVNGString & | fontName,
|  | double | fontSize )

Referenced by WP5Parser::parse().

## setFont()

void WP5ContentListener::setFont | ( | const librevenge::RVNGString & | fontName,
|  | double | fontSize )

override virtual

Implements WP5Listener.

Referenced by _handleSubDocument(), and WP5Parser::parse().

## setTabs()

void WP5ContentListener::setTabs | ( | const std::vector< WPXTabStop > & | tabStops,
|  | unsigned short | tabOffset )

override virtual

Implements WP5Listener.

## startDocument()

void WP5ContentListener::startDocument | ( |  | ) |

inline override virtual

Implements WP5Listener.

## startSubDocument()

void WP5ContentListener::startSubDocument | ( |  | ) |

inline override virtual

Implements WP5Listener.

Referenced by WP5Parser::parseSubDocument().

## startTable()

void WP5ContentListener::startTable | ( |  | ) |

override virtual

Implements WP5Listener.

## suppressPageCharacteristics()

void WP5ContentListener::suppressPageCharacteristics | ( | unsigned char |  | ) |

inline override virtual

Implements WP5Listener.

## Member Data Documentation

## m_defaultFontName

librevenge::RVNGString WP5ContentListener::m_defaultFontName

private

Referenced by _handleSubDocument(), setDefaultFont(), and WP5ContentListener().

## m_defaultFontSize

double WP5ContentListener::m_defaultFontSize

private

Referenced by _handleSubDocument(), setDefaultFont(), and WP5ContentListener().

## m_parseState

std::unique_ptr<WP5ContentParsingState> WP5ContentListener::m_parseState

private

Referenced by _flushText(), _handleSubDocument(), boxOff(), boxOn(), insertCharacter(), insertGraphicsData(), insertNote(), insertNoteReference(), and WP5ContentListener().

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

- WP5ContentListener.h
- WP5ContentListener.cpp