MsWrdText Class Reference documentation

Classes | Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
MsWrdText Class Reference

the main class to read the text part of Microsoft Word file More...

`#include <MsWrdText.hxx>`

## Classes
struct | PLC
| Internal: the plc. More...

## Public Member Functions
| MsWrdText (MsWrdParser &parser)
| constructor More...
virtual | ~MsWrdText ()
| destructor More...
int | version () const
| returns the file version More...
int | numPages () const
| returns the number of pages More...
MWAWEntry | getHeader () const
| returns the header entry More...
MWAWEntry | getFooter () const
| returns the footer entry More...

## Protected Member Functions
shared_ptr< MWAWParserState > & | getParserState ()
| returns the parser state More...
bool | sendMainText ()
| send a main zone More...
bool | sendText (MWAWEntry const &textEntry, bool mainZone, bool tableCell=false)
| send a text zone More...
bool | sendSection (int sectionId)
| try to open a section More...
bool | readHeaderTextLength ()
| reads the three different zone size More...
bool | createZones (long bot)
| finds the different zones More...
bool | readTextStruct (MsWrdEntry &entry)
| read the text structure(some paragraph style+some text position?) More...
bool | readPageBreak (MsWrdEntry &entry)
| read the page limit ? More...
bool | readParagraphInfo (MsWrdEntry &entry)
| read the paragraph height info More...
bool | readFields (MsWrdEntry &entry, std::vector< long > const &fieldPos)
| read the field data More...
bool | sendFieldComment (int id)
| send a field note to a listener More...
bool | readFootnotesPos (MsWrdEntry &entry, std::vector< long > const &noteDef)
| read the footnote pos in text + val More...
bool | readFootnotesData (MsWrdEntry &entry)
| read the footnote data More...
bool | sendFootnote (int id)
| send a note to a listener More...
bool | readFontNames (MsWrdEntry &entry)
| read the font names More...
void | flushExtra ()
| sends the data which have not yet been sent to the listener More...
bool | sendTable (MsWrdTextInternal::Table const &table)
| try to send a table. More...
long | getMainTextLength () const
| returns the main text length More...
std::multimap< long, MsWrdText::PLC > & | getTextPLCMap ()
| returns the text correspondance zone ( textpos, plc ) More...
std::multimap< long, MsWrdText::PLC > & | getFilePLCMap ()
| returns the file correspondance zone ( filepos, plc ) More...
void | prepareData ()
| prepare the data to be send More...
void | prepareLines ()
| cut the text in line/cell pos More...
void | convertFilePLCPos ()
| convert the file position in character position and compute the paragraph limit More...
void | prepareParagraphProperties ()
| retrieve the paragraph properties More...
void | prepareFontProperties ()
| retrieve the font properties More...
void | prepareTableLimits ()
| find the table end position knowing the end cell/pos delimiter More...
bool | updateTableBeginnningAt (long cPos, long &nextCPos)
| try to find a table which begin at position cPos, if so, update its data... More...
bool | readLongZone (MsWrdEntry &entry, int sz, std::vector< long > &list)
| read a zone which consists in a list of int More...

## Protected Attributes
MWAWParserStatePtr | m_parserState
| the parser state More...
shared_ptr< MsWrdTextInternal::State > | m_state
| the state More...
shared_ptr< MsWrdTextStyles > | m_stylesManager
| the style manager More...
MsWrdParser * | m_mainParser
| the main parser; More...

## Private Member Functions
| MsWrdText (MsWrdText const &orig)
MsWrdText & | operator= (MsWrdText const &orig)

## Friends
class | MsWrdParser
class | MsWrdTextStyles

## Detailed Description

the main class to read the text part of Microsoft Word file

## Constructor & Destructor Documentation

## § MsWrdText() [1/2]

MsWrdText::MsWrdText | ( | MsWrdParser & | parser | ) |
| explicit

constructor

## § ~MsWrdText()

MsWrdText::~MsWrdText | ( |  | ) |
| virtual

destructor

## § MsWrdText() [2/2]

MsWrdText::MsWrdText | ( | MsWrdText const & | orig | ) |
| private

## Member Function Documentation

## § convertFilePLCPos()

void MsWrdText::convertFilePLCPos | ( |  | ) |
| protected

convert the file position in character position and compute the paragraph limit

Referenced by prepareData().

## § createZones()

bool MsWrdText::createZones | ( | long | bot | ) |
| protected

finds the different zones

the break position

read the header footer limit

read the note

read the footenote

## § flushExtra()

void MsWrdText::flushExtra | ( |  | ) |
| protected

sends the data which have not yet been sent to the listener

## § getFilePLCMap()

std::multimap< long, MsWrdText::PLC > & MsWrdText::getFilePLCMap | ( |  | ) |
| protected

returns the file correspondance zone ( filepos, plc )

Referenced by MsWrdTextStyles::readPLC().

## § getFooter()

MWAWEntry MsWrdText::getFooter | ( |  | ) | const

returns the footer entry

## § getHeader()

MWAWEntry MsWrdText::getHeader | ( |  | ) | const

returns the header entry

## § getMainTextLength()

long MsWrdText::getMainTextLength | ( |  | ) | const
| protected

returns the main text length

Referenced by MsWrdTextStyles::readSection().

## § getParserState()

shared_ptr<MWAWParserState>& MsWrdText::getParserState | ( |  | ) |
| inlineprotected

returns the parser state

## § getTextPLCMap()

std::multimap< long, MsWrdText::PLC > & MsWrdText::getTextPLCMap | ( |  | ) |
| protected

returns the text correspondance zone ( textpos, plc )

Referenced by MsWrdTextStyles::readSection().

## § numPages()

int MsWrdText::numPages | ( |  | ) | const

returns the number of pages

## § operator=()

MsWrdText& MsWrdText::operator= | ( | MsWrdText const & | orig | ) |
| private

## § prepareData()

void MsWrdText::prepareData | ( |  | ) |
| protected

prepare the data to be send

Referenced by createZones().

## § prepareFontProperties()

void MsWrdText::prepareFontProperties | ( |  | ) |
| protected

retrieve the font properties

Referenced by prepareData().

## § prepareLines()

void MsWrdText::prepareLines | ( |  | ) |
| protected

cut the text in line/cell pos

Referenced by prepareData().

## § prepareParagraphProperties()

void MsWrdText::prepareParagraphProperties | ( |  | ) |
| protected

retrieve the paragraph properties

Referenced by prepareData().

## § prepareTableLimits()

void MsWrdText::prepareTableLimits | ( |  | ) |
| protected

find the table end position knowing the end cell/pos delimiter

Referenced by prepareData().

## § readFields()

bool MsWrdText::readFields | ( | MsWrdEntry & | entry,
|  | std::vector< long > const & | fieldPos
| ) |  |
| protected

read the field data

Referenced by createZones().

## § readFontNames()

bool MsWrdText::readFontNames | ( | MsWrdEntry & | entry | ) |
| protected

read the font names

Referenced by createZones().

## § readFootnotesData()

bool MsWrdText::readFootnotesData | ( | MsWrdEntry & | entry | ) |
| protected

read the footnote data

Referenced by createZones().

## § readFootnotesPos()

bool MsWrdText::readFootnotesPos | ( | MsWrdEntry & | entry,
|  | std::vector< long > const & | noteDef
| ) |  |
| protected

read the footnote pos in text + val

Referenced by createZones().

## § readHeaderTextLength()

bool MsWrdText::readHeaderTextLength | ( |  | ) |
| protected

reads the three different zone size

## § readLongZone()

bool MsWrdText::readLongZone | ( | MsWrdEntry & | entry,
|  | int | sz,
|  | std::vector< long > & | list
| ) |  |
| protected

read a zone which consists in a list of int

Referenced by createZones().

## § readPageBreak()

bool MsWrdText::readPageBreak | ( | MsWrdEntry & | entry | ) |
| protected

read the page limit ?

Referenced by createZones().

## § readParagraphInfo()

bool MsWrdText::readParagraphInfo | ( | MsWrdEntry & | entry | ) |
| protected

read the paragraph height info

Referenced by createZones().

## § readTextStruct()

bool MsWrdText::readTextStruct | ( | MsWrdEntry & | entry | ) |
| protected

read the text structure(some paragraph style+some text position?)

Referenced by createZones().

## § sendFieldComment()

bool MsWrdText::sendFieldComment | ( | int | id | ) |
| protected

send a field note to a listener

## § sendFootnote()

bool MsWrdText::sendFootnote | ( | int | id | ) |
| protected

send a note to a listener

## § sendMainText()

bool MsWrdText::sendMainText | ( |  | ) |
| protected

send a main zone

## § sendSection()

bool MsWrdText::sendSection | ( | int | sectionId | ) |
| protected

try to open a section

Referenced by sendText().

## § sendTable()

bool MsWrdText::sendTable | ( | MsWrdTextInternal::Table const & | table | ) |
| protected

try to send a table.

Referenced by sendText().

## § sendText()

bool MsWrdText::sendText | ( | MWAWEntry const & | textEntry,
|  | bool | mainZone,
|  | bool | tableCell = `false`
| ) |  |
| protected

send a text zone

Referenced by flushExtra(), sendFootnote(), sendMainText(), and sendTable().

## § updateTableBeginnningAt()

bool MsWrdText::updateTableBeginnningAt | ( | long | cPos,
|  | long & | nextCPos
| ) |  |
| protected

try to find a table which begin at position cPos, if so, update its data...

Referenced by prepareParagraphProperties().

## § version()

int MsWrdText::version | ( |  | ) | const

returns the file version

Referenced by prepareData(), prepareFontProperties(), prepareParagraphProperties(), prepareTableLimits(), readFields(), readPageBreak(), and readParagraphInfo().

## Friends And Related Function Documentation

## § MsWrdParser

friend class MsWrdParser
| friend

## § MsWrdTextStyles

friend class MsWrdTextStyles
| friend

Referenced by MsWrdText().

## Member Data Documentation

## § m_mainParser

MsWrdParser* MsWrdText::m_mainParser
| protected

the main parser;

Referenced by createZones(), and sendText().

## § m_parserState

MWAWParserStatePtr MsWrdText::m_parserState
| protected

the parser state

Referenced by getFooter(), getHeader(), prepareData(), prepareLines(), prepareTableLimits(), readFields(), readFontNames(), readFootnotesData(), readFootnotesPos(), readHeaderTextLength(), readLongZone(), readPageBreak(), readParagraphInfo(), readTextStruct(), sendFieldComment(), sendFootnote(), sendTable(), sendText(), and version().

## § m_state

shared_ptr<MsWrdTextInternal::State> MsWrdText::m_state
| protected

the state

Referenced by convertFilePLCPos(), createZones(), flushExtra(), getFilePLCMap(), getFooter(), getHeader(), getMainTextLength(), getTextPLCMap(), numPages(), prepareData(), prepareFontProperties(), prepareLines(), prepareParagraphProperties(), prepareTableLimits(), readFields(), readFootnotesData(), readFootnotesPos(), readHeaderTextLength(), readPageBreak(), readParagraphInfo(), readTextStruct(), sendFieldComment(), sendFootnote(), sendMainText(), sendSection(), sendTable(), sendText(), updateTableBeginnningAt(), and version().

## § m_stylesManager

shared_ptr<MsWrdTextStyles> MsWrdText::m_stylesManager
| protected

the style manager

Referenced by createZones(), MsWrdText(), prepareData(), prepareFontProperties(), prepareParagraphProperties(), prepareTableLimits(), readTextStruct(), sendFieldComment(), sendSection(), and sendText().

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

- MsWrdText.hxx
- MsWrdText.cxx