WP3ContentListener Class Reference documentation

Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
WP3ContentListener Class Reference

`#include <WP3ContentListener.h>`

Inheritance diagram for WP3ContentListener:

## Public Member Functions
| WP3ContentListener (std::list< WPXPageSpan > &pageList, librevenge::RVNGTextInterface *documentInterface)
| ~WP3ContentListener () override
void | startDocument () override
void | startSubDocument () override
void | insertCharacter (unsigned character) override
void | insertTab () override
void | insertTab (unsigned char tabType, double tabPosition) override
void | insertBreak (unsigned char breakType) override
void | insertEOL () override
void | attributeChange (bool isOn, unsigned char attribute) override
void | lineSpacingChange (double lineSpacing) 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 | indentFirstLineChange (double offset) override
void | setTabs (bool isRelative, const std::vector< WPXTabStop > tabStops) override
void | columnChange (WPXTextColumnType columnType, unsigned char numColumns, const std::vector< double > &columnWidth, const std::vector< bool > &isFixedWidth) override
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 ()
void | insertCell ()
void | closeCell () override
void | closeRow () override
void | setTableCellSpan (unsigned short colSpan, unsigned short rowSpan) override
void | setTableCellFillColor (const RGBSColor *cellFillColor) override
void | endTable () override
void | undoChange (unsigned char undoType, unsigned short undoLevel) override
void | justificationChange (unsigned char justification) override
void | setTextColor (const RGBSColor *fontColor) override
void | setTextFont (const librevenge::RVNGString &fontName) override
void | setFontSize (unsigned short fontSize) override
void | insertPageNumber (const librevenge::RVNGString &pageNumber) override
void | insertNoteReference (const librevenge::RVNGString &noteReference) override
void | insertNote (WPXNoteType noteType, const WP3SubDocument *subDocument) override
void | headerFooterGroup (unsigned char headerFooterType, unsigned char occurrenceBits, const std::shared_ptr< WP3SubDocument > &subDocument) override
void | suppressPage (unsigned short) override
void | backTab () override
void | leftIndent () override
void | leftIndent (double offset) override
void | leftRightIndent () override
void | leftRightIndent (double offset) override
void | insertPicture (double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn, unsigned short figureFlags, const librevenge::RVNGBinaryData &binaryData) override
void | insertTextBox (double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn, unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption) override
void | insertWP51Table (double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn, unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption) override
Public Member Functions inherited from WP3Listener
| WP3Listener ()
virtual | ~WP3Listener ()
virtual void | startDocument ()=0
virtual void | startSubDocument ()=0
virtual void | insertCharacter (unsigned character)=0
virtual void | insertTab ()=0
virtual void | insertTab (unsigned char tabType, double tabPosition)=0
virtual void | insertBreak (unsigned char breakType)=0
virtual void | insertEOL ()=0
virtual void | lineSpacingChange (double lineSpacing)=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 | indentFirstLineChange (double offset)=0
virtual void | setTabs (bool isRelative, const std::vector< WPXTabStop > tabStops)=0
virtual void | columnChange (WPXTextColumnType columnType, unsigned char numColumns, const std::vector< double > &columnWidth, const std::vector< bool > &isFixedWidth)=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 | closeCell ()=0
virtual void | closeRow ()=0
virtual void | setTableCellSpan (unsigned short colSpan, unsigned short rowSpan)=0
virtual void | setTableCellFillColor (const RGBSColor *cellFillColor)=0
virtual void | endTable ()=0
virtual void | undoChange (unsigned char undoType, unsigned short undoLevel)=0
virtual void | justificationChange (unsigned char justification)=0
virtual void | setTextColor (const RGBSColor *fontColor)=0
virtual void | setTextFont (const librevenge::RVNGString &fontName)=0
virtual void | setFontSize (unsigned short fontSize)=0
virtual void | insertPageNumber (const librevenge::RVNGString &pageNumber)=0
virtual void | insertNoteReference (const librevenge::RVNGString &noteReference)=0
virtual void | insertNote (WPXNoteType noteType, const WP3SubDocument *subDocument)=0
virtual void | headerFooterGroup (unsigned char headerFooterType, unsigned char occurrenceBits, const std::shared_ptr< WP3SubDocument > &subDocument)=0
virtual void | suppressPage (unsigned short suppressCode)=0
virtual void | backTab ()=0
virtual void | leftIndent ()=0
virtual void | leftIndent (double offset)=0
virtual void | leftRightIndent ()=0
virtual void | leftRightIndent (double offset)=0
virtual void | insertPicture (double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn, unsigned short figureFlags, const librevenge::RVNGBinaryData &binaryData)=0
virtual void | insertTextBox (double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn, unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption)=0
virtual void | insertWP51Table (double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn, unsigned short figureFlags, const WP3SubDocument *subDocument, const WP3SubDocument *caption)=0
void | setResourceFork (WP3ResourceFork *resourceFork)
const WP3ResourceFork * | getResourceFork () const

## Protected Member Functions
void | _handleSubDocument (const WPXSubDocument *subDocument, WPXSubDocumentType subDocumentType, WPXTableList tableList, unsigned nextTableIndice=0) override
void | _openParagraph () override
void | _flushText () override
void | _changeList () override
void | _handleFrameParameters (librevenge::RVNGPropertyList &propList, double height, double width, double verticalOffset, double horizontalOffset, unsigned char leftColumn, unsigned char rightColumn, unsigned short figureFlags)
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
| WP3ContentListener (const WP3ContentListener &)
WP3ContentListener & | operator= (const WP3ContentListener &)

## Private Attributes
std::unique_ptr< WP3ContentParsingState > | m_parseState

## 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

## ◆ WP3ContentListener() [1/2]

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

## ◆ ~WP3ContentListener()

WP3ContentListener::~WP3ContentListener | ( |  | ) |
| override

## ◆ WP3ContentListener() [2/2]

WP3ContentListener::WP3ContentListener | ( | const WP3ContentListener & |  | ) |
| private

## Member Function Documentation

## ◆ _changeList()

void WP3ContentListener::_changeList | ( |  | ) |
| inlineoverrideprotectedvirtual

Implements WPXContentListener.

Referenced by _handleSubDocument().

## ◆ _flushText()

void WP3ContentListener::_flushText | ( |  | ) |
| overrideprotectedvirtual

Implements WPXContentListener.

Referenced by endTable(), insertNote(), and insertTab().

## ◆ _handleFrameParameters()

void WP3ContentListener::_handleFrameParameters | ( | librevenge::RVNGPropertyList & | propList,
|  | double | height,
|  | double | width,
|  | double | verticalOffset,
|  | double | horizontalOffset,
|  | unsigned char | leftColumn,
|  | unsigned char | rightColumn,
|  | unsigned short | figureFlags
| ) |  |
| protected

Referenced by insertPicture(), insertTextBox(), and insertWP51Table().

## ◆ _handleSubDocument()

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

Implements WPXContentListener.

## ◆ _openParagraph()

void WP3ContentListener::_openParagraph | ( |  | ) |
| overrideprotectedvirtual

Reimplemented from WPXContentListener.

Referenced by insertNote().

## ◆ addTableColumnDefinition()

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

Implements WP3Listener.

## ◆ attributeChange()

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

Implements WP3Listener.

## ◆ backTab()

void WP3ContentListener::backTab | ( |  | ) |
| overridevirtual

Implements WP3Listener.

## ◆ closeCell()

void WP3ContentListener::closeCell | ( |  | ) |
| overridevirtual

Implements WP3Listener.

Referenced by closeRow().

## ◆ closeRow()

void WP3ContentListener::closeRow | ( |  | ) |
| overridevirtual

Implements WP3Listener.

## ◆ columnChange()

void WP3ContentListener::columnChange | ( | WPXTextColumnType | columnType,
|  | unsigned char | numColumns,
|  | const std::vector< double > & | columnWidth,
|  | const std::vector< bool > & | isFixedWidth
| ) |  |
| overridevirtual

Implements WP3Listener.

## ◆ defineTable()

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

Implements WP3Listener.

## ◆ endDocument()

void WP3ContentListener::endDocument | ( |  | ) |
| inlineoverridevirtual

Implements WP3Listener.

## ◆ endSubDocument()

void WP3ContentListener::endSubDocument | ( |  | ) |
| inlineoverridevirtual

Implements WP3Listener.

Referenced by WP3Parser::parseSubDocument().

## ◆ endTable()

void WP3ContentListener::endTable | ( |  | ) |
| overridevirtual

Implements WP3Listener.

## ◆ headerFooterGroup()

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

Implements WP3Listener.

## ◆ indentFirstLineChange()

void WP3ContentListener::indentFirstLineChange | ( | double | offset | ) |
| overridevirtual

Implements WP3Listener.

## ◆ insertBreak()

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

Implements WP3Listener.

## ◆ insertCell()

void WP3ContentListener::insertCell | ( |  | ) |

Referenced by _openParagraph(), and insertEOL().

## ◆ insertCharacter()

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

Implements WP3Listener.

## ◆ insertEOL()

void WP3ContentListener::insertEOL | ( |  | ) |
| overridevirtual

Implements WP3Listener.

Referenced by closeCell().

## ◆ insertNote()

void WP3ContentListener::insertNote | ( | WPXNoteType | noteType,
|  | const WP3SubDocument * | subDocument
| ) |  |
| overridevirtual

Implements WP3Listener.

## ◆ insertNoteReference()

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

Implements WP3Listener.

## ◆ insertPageNumber()

void WP3ContentListener::insertPageNumber | ( | const librevenge::RVNGString & | pageNumber | ) |
| overridevirtual

Implements WP3Listener.

## ◆ insertPicture()

void WP3ContentListener::insertPicture | ( | double | height,
|  | double | width,
|  | double | verticalOffset,
|  | double | horizontalOffset,
|  | unsigned char | leftColumn,
|  | unsigned char | rightColumn,
|  | unsigned short | figureFlags,
|  | const librevenge::RVNGBinaryData & | binaryData
| ) |  |
| overridevirtual

Implements WP3Listener.

## ◆ insertRow()

void WP3ContentListener::insertRow | ( |  | ) |

Referenced by _openParagraph(), and insertEOL().

## ◆ insertTab() [1/2]

void WP3ContentListener::insertTab | ( |  | ) |
| overridevirtual

Implements WP3Listener.

Referenced by insertTab(), leftIndent(), and leftRightIndent().

## ◆ insertTab() [2/2]

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

Implements WP3Listener.

## ◆ insertTextBox()

void WP3ContentListener::insertTextBox | ( | double | height,
|  | double | width,
|  | double | verticalOffset,
|  | double | horizontalOffset,
|  | unsigned char | leftColumn,
|  | unsigned char | rightColumn,
|  | unsigned short | figureFlags,
|  | const WP3SubDocument * | subDocument,
|  | const WP3SubDocument * | caption
| ) |  |
| overridevirtual

Implements WP3Listener.

## ◆ insertWP51Table()

void WP3ContentListener::insertWP51Table | ( | double | height,
|  | double | width,
|  | double | verticalOffset,
|  | double | horizontalOffset,
|  | unsigned char | leftColumn,
|  | unsigned char | rightColumn,
|  | unsigned short | figureFlags,
|  | const WP3SubDocument * | subDocument,
|  | const WP3SubDocument * | caption
| ) |  |
| overridevirtual

Implements WP3Listener.

## ◆ justificationChange()

void WP3ContentListener::justificationChange | ( | unsigned char | justification | ) |
| overridevirtual

Implements WP3Listener.

## ◆ leftIndent() [1/2]

void WP3ContentListener::leftIndent | ( |  | ) |
| overridevirtual

Implements WP3Listener.

## ◆ leftIndent() [2/2]

void WP3ContentListener::leftIndent | ( | double | offset | ) |
| overridevirtual

Implements WP3Listener.

## ◆ leftRightIndent() [1/2]

void WP3ContentListener::leftRightIndent | ( |  | ) |
| overridevirtual

Implements WP3Listener.

## ◆ leftRightIndent() [2/2]

void WP3ContentListener::leftRightIndent | ( | double | offset | ) |
| overridevirtual

Implements WP3Listener.

## ◆ lineSpacingChange()

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

Implements WP3Listener.

## ◆ marginChange()

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

Implements WP3Listener.

Referenced by _handleSubDocument().

## ◆ operator=()

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

## ◆ pageFormChange()

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

Implements WP3Listener.

## ◆ pageMarginChange()

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

Implements WP3Listener.

## ◆ setFontSize()

void WP3ContentListener::setFontSize | ( | unsigned short | fontSize | ) |
| overridevirtual

Implements WP3Listener.

## ◆ setTableCellFillColor()

void WP3ContentListener::setTableCellFillColor | ( | const RGBSColor * | cellFillColor | ) |
| overridevirtual

Implements WP3Listener.

## ◆ setTableCellSpan()

void WP3ContentListener::setTableCellSpan | ( | unsigned short | colSpan,
|  | unsigned short | rowSpan
| ) |  |
| overridevirtual

Implements WP3Listener.

## ◆ setTabs()

void WP3ContentListener::setTabs | ( | bool | isRelative,
|  | const std::vector< WPXTabStop > | tabStops
| ) |  |
| overridevirtual

Implements WP3Listener.

## ◆ setTextColor()

void WP3ContentListener::setTextColor | ( | const RGBSColor * | fontColor | ) |
| overridevirtual

Implements WP3Listener.

## ◆ setTextFont()

void WP3ContentListener::setTextFont | ( | const librevenge::RVNGString & | fontName | ) |
| overridevirtual

Implements WP3Listener.

## ◆ startDocument()

void WP3ContentListener::startDocument | ( |  | ) |
| inlineoverridevirtual

Implements WP3Listener.

## ◆ startSubDocument()

void WP3ContentListener::startSubDocument | ( |  | ) |
| inlineoverridevirtual

Implements WP3Listener.

Referenced by WP3Parser::parseSubDocument().

## ◆ startTable()

void WP3ContentListener::startTable | ( |  | ) |
| overridevirtual

Implements WP3Listener.

## ◆ suppressPage()

void WP3ContentListener::suppressPage | ( | unsigned short |  | ) |
| inlineoverridevirtual

Implements WP3Listener.

## ◆ undoChange()

void WP3ContentListener::undoChange | ( | unsigned char | undoType,
|  | unsigned short | undoLevel
| ) |  |
| overridevirtual

Implements WP3Listener.

## Member Data Documentation

## ◆ m_parseState

std::unique_ptr<WP3ContentParsingState> WP3ContentListener::m_parseState
| private

Referenced by _flushText(), _handleSubDocument(), closeCell(), insertCell(), insertCharacter(), insertNote(), insertNoteReference(), insertPageNumber(), insertTextBox(), insertWP51Table(), setTableCellFillColor(), and setTableCellSpan().

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

- WP3ContentListener.h
- WP3ContentListener.cpp