WP5ContentListener Class Reference documentation

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
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 ()
virtual void | startDocument ()=0
virtual void | startSubDocument ()=0
virtual void | setFont (const librevenge::RVNGString &fontName, double fontSize)=0
virtual void | setTabs (const std::vector< WPXTabStop > &tabStops, unsigned short tabOffset)=0
virtual void | insertCharacter (unsigned character)=0
virtual void | insertTab (unsigned char tabType, double tabPosition)=0
virtual void | insertIndent (unsigned char indentType, double indentPosition)=0
virtual void | insertEOL ()=0
virtual void | insertBreak (unsigned char breakType)=0
virtual void | lineSpacingChange (double lineSpacing)=0
virtual void | justificationChange (unsigned char justification)=0
virtual void | characterColorChange (unsigned char red, unsigned char green, unsigned char blue)=0
virtual void | attributeChange (bool isOn, unsigned char attribute)=0
virtual void | pageMarginChange (unsigned char side, unsigned short margin)=0
virtual void | pageFormChange (unsigned short length, unsigned short width, WPXFormOrientation orientation)=0
virtual void | marginChange (unsigned char side, unsigned short margin)=0
virtual void | endDocument ()=0
virtual void | endSubDocument ()=0
virtual void | defineTable (unsigned char position, unsigned short leftOffset)=0
virtual void | addTableColumnDefinition (unsigned width, unsigned leftGutter, unsigned rightGutter, unsigned attributes, unsigned char alignment)=0
virtual void | startTable ()=0
virtual void | insertRow (unsigned short rowHeight, bool isMinimumHeight, bool isHeaderRow)=0
virtual 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)=0
virtual void | endTable ()=0
virtual void | insertNoteReference (const librevenge::RVNGString &noteReference)=0
virtual void | insertNote (WPXNoteType noteType, const WP5SubDocument *subDocument)=0
virtual void | headerFooterGroup (unsigned char headerFooterType, unsigned char occurrenceBits, const std::shared_ptr< WP5SubDocument > &subDocument)=0
virtual void | suppressPageCharacteristics (unsigned char suppressCode)=0
virtual void | boxOn (unsigned char positionAndType, unsigned char alignment, unsigned short width, unsigned short height, unsigned short x, unsigned short y)=0
virtual void | boxOff ()=0
virtual void | insertGraphicsData (const librevenge::RVNGBinaryData *data)=0
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. More...
void | insertBreak (const unsigned char breakType)
void | lineSpacingChange (const double lineSpacing)
void | justificationChange (const unsigned char justification)
virtual void | _handleSubDocument (const WPXSubDocument *subDocument, WPXSubDocumentType subDocumentType, WPXTableList tableList, unsigned nextTableIndice)=0
virtual void | _flushText ()=0
virtual void | _changeList ()=0
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
| ) |  |

## ◆ ~WP5ContentListener()

WP5ContentListener::~WP5ContentListener | ( |  | ) |
| override

## ◆ WP5ContentListener() [2/2]

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

## Member Function Documentation

## ◆ _changeList()

void WP5ContentListener::_changeList | ( |  | ) |
| inlineoverrideprotectedvirtual

Implements WPXContentListener.

Referenced by _handleSubDocument().

## ◆ _flushText()

void WP5ContentListener::_flushText | ( |  | ) |
| overrideprotectedvirtual

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`
| ) |  |
| overrideprotectedvirtual

Implements WPXContentListener.

## ◆ addTableColumnDefinition()

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

Implements WP5Listener.

## ◆ attributeChange()

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

Implements WP5Listener.

## ◆ boxOff()

void WP5ContentListener::boxOff | ( |  | ) |
| overridevirtual

Implements WP5Listener.

## ◆ boxOn()

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

Implements WP5Listener.

## ◆ characterColorChange()

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

Implements WP5Listener.

## ◆ defineTable()

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

Implements WP5Listener.

## ◆ endDocument()

void WP5ContentListener::endDocument | ( |  | ) |
| inlineoverridevirtual

Implements WP5Listener.

## ◆ endSubDocument()

void WP5ContentListener::endSubDocument | ( |  | ) |
| inlineoverridevirtual

Implements WP5Listener.

Referenced by WP5Parser::parseSubDocument().

## ◆ endTable()

void WP5ContentListener::endTable | ( |  | ) |
| overridevirtual

Implements WP5Listener.

## ◆ headerFooterGroup()

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

Implements WP5Listener.

## ◆ insertBreak()

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

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
| ) |  |
| overridevirtual

Implements WP5Listener.

## ◆ insertCharacter()

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

Implements WP5Listener.

## ◆ insertEOL()

void WP5ContentListener::insertEOL | ( |  | ) |
| overridevirtual

Implements WP5Listener.

## ◆ insertGraphicsData()

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

Implements WP5Listener.

## ◆ insertIndent()

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

Implements WP5Listener.

## ◆ insertNote()

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

Implements WP5Listener.

## ◆ insertNoteReference()

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

Implements WP5Listener.

## ◆ insertRow()

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

Implements WP5Listener.

## ◆ insertTab()

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

Implements WP5Listener.

## ◆ justificationChange()

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

Implements WP5Listener.

Referenced by insertCell().

## ◆ lineSpacingChange()

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

Implements WP5Listener.

## ◆ marginChange()

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

Implements WP5Listener.

Referenced by _handleSubDocument().

## ◆ operator=()

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

## ◆ pageFormChange()

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

Implements WP5Listener.

## ◆ pageMarginChange()

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

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
| ) |  |
| overridevirtual

Implements WP5Listener.

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

## ◆ setTabs()

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

Implements WP5Listener.

## ◆ startDocument()

void WP5ContentListener::startDocument | ( |  | ) |
| inlineoverridevirtual

Implements WP5Listener.

## ◆ startSubDocument()

void WP5ContentListener::startSubDocument | ( |  | ) |
| inlineoverridevirtual

Implements WP5Listener.

Referenced by WP5Parser::parseSubDocument().

## ◆ startTable()

void WP5ContentListener::startTable | ( |  | ) |
| overridevirtual

Implements WP5Listener.

## ◆ suppressPageCharacteristics()

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

Implements WP5Listener.

## Member Data Documentation

## ◆ m_defaultFontName

librevenge::RVNGString WP5ContentListener::m_defaultFontName
| private

Referenced by _handleSubDocument(), and setDefaultFont().

## ◆ m_defaultFontSize

double WP5ContentListener::m_defaultFontSize
| private

Referenced by _handleSubDocument(), and setDefaultFont().

## ◆ m_parseState

std::unique_ptr<WP5ContentParsingState> WP5ContentListener::m_parseState
| private

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

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

- WP5ContentListener.h
- WP5ContentListener.cpp