the main class to read the text part of Microsoft Word file More...
#include <MSWText.hxx>
Classes | |
struct | PLC |
Internal: the plc. More... | |
Public Member Functions | |
MSWText (MSWParser &parser) | |
constructor | |
virtual | ~MSWText () |
destructor | |
int | version () const |
returns the file version | |
int | numPages () const |
returns the number of pages | |
MWAWEntry | getHeader () const |
returns the header entry | |
MWAWEntry | getFooter () const |
returns the footer entry | |
Protected Member Functions | |
shared_ptr< MWAWParserState > & | getParserState () |
returns the parser state | |
bool | sendMainText () |
send a main zone | |
bool | sendText (MWAWEntry const &textEntry, bool mainZone, bool tableCell=false) |
send a text zone | |
bool | sendSection (int sectionId) |
try to open a section | |
bool | readHeaderTextLength () |
reads the three different zone size | |
bool | createZones (long bot) |
finds the different zones | |
bool | readTextStruct (MSWEntry &entry) |
read the text structure(some paragraph style+some text position?) | |
bool | readPageBreak (MSWEntry &entry) |
read the page limit ? | |
bool | readParagraphInfo (MSWEntry entry) |
read the paragraph height info | |
bool | readFields (MSWEntry &entry, std::vector< long > const &fieldPos) |
read the field data | |
bool | sendFieldComment (int id) |
send a field note to a listener | |
bool | readFootnotesPos (MSWEntry &entry, std::vector< long > const ¬eDef) |
read the footnote pos in text + val | |
bool | readFootnotesData (MSWEntry &entry) |
read the footnote data | |
bool | sendFootnote (int id) |
send a note to a listener | |
bool | readFontNames (MSWEntry &entry) |
read the font names | |
void | flushExtra () |
sends the data which have not yet been sent to the listener | |
bool | sendTable (MSWTextInternal::Table const &table) |
try to send a table. | |
long | getMainTextLength () const |
returns the main text length | |
std::multimap< long, MSWText::PLC > & | getTextPLCMap () |
returns the text correspondance zone ( textpos, plc ) | |
std::multimap< long, MSWText::PLC > & | getFilePLCMap () |
returns the file correspondance zone ( filepos, plc ) | |
void | prepareData () |
prepare the data to be send | |
void | prepareLines () |
cut the text in line/cell pos | |
void | convertFilePLCPos () |
convert the file position in character position and compute the paragraph limit | |
void | prepareParagraphProperties () |
retrieve the paragraph properties | |
void | prepareFontProperties () |
retrieve the font properties | |
void | prepareTableLimits () |
find the table end position knowing the end cell/pos delimiter | |
bool | updateTableBeginnningAt (long cPos, long &nextCPos) |
try to find a table which begin at position cPos, if so, update its data... | |
bool | readLongZone (MSWEntry &entry, int sz, std::vector< long > &list) |
read a zone which consists in a list of int | |
Protected Attributes | |
MWAWParserStatePtr | m_parserState |
the parser state | |
shared_ptr < MSWTextInternal::State > | m_state |
the state | |
shared_ptr< MSWTextStyles > | m_stylesManager |
the style manager | |
MSWParser * | m_mainParser |
the main parser; | |
Private Member Functions | |
MSWText (MSWText const &orig) | |
MSWText & | operator= (MSWText const &orig) |
Friends | |
class | MSWParser |
class | MSWTextStyles |
the main class to read the text part of Microsoft Word file
MSWText::MSWText | ( | MSWParser & | parser | ) |
constructor
MSWText::~MSWText | ( | ) | [virtual] |
destructor
MSWText::MSWText | ( | MSWText const & | orig | ) | [private] |
void MSWText::convertFilePLCPos | ( | ) | [protected] |
convert the file position in character position and compute the paragraph limit
Referenced by prepareData().
bool MSWText::createZones | ( | long | bot | ) | [protected] |
finds the different zones
the break position
read the header footer limit
read the note
read the footenote
void MSWText::flushExtra | ( | ) | [protected] |
sends the data which have not yet been sent to the listener
std::multimap< long, MSWText::PLC > & MSWText::getFilePLCMap | ( | ) | [protected] |
returns the file correspondance zone ( filepos, plc )
Referenced by MSWTextStyles::readPLC().
MWAWEntry MSWText::getFooter | ( | ) | const |
returns the footer entry
MWAWEntry MSWText::getHeader | ( | ) | const |
returns the header entry
long MSWText::getMainTextLength | ( | ) | const [protected] |
returns the main text length
Referenced by MSWTextStyles::readSection().
shared_ptr<MWAWParserState>& MSWText::getParserState | ( | ) | [inline, protected] |
returns the parser state
std::multimap< long, MSWText::PLC > & MSWText::getTextPLCMap | ( | ) | [protected] |
returns the text correspondance zone ( textpos, plc )
Referenced by MSWTextStyles::readSection().
int MSWText::numPages | ( | ) | const |
returns the number of pages
void MSWText::prepareData | ( | ) | [protected] |
prepare the data to be send
Referenced by createZones().
void MSWText::prepareFontProperties | ( | ) | [protected] |
retrieve the font properties
Referenced by prepareData().
void MSWText::prepareLines | ( | ) | [protected] |
cut the text in line/cell pos
Referenced by prepareData().
void MSWText::prepareParagraphProperties | ( | ) | [protected] |
retrieve the paragraph properties
Referenced by prepareData().
void MSWText::prepareTableLimits | ( | ) | [protected] |
find the table end position knowing the end cell/pos delimiter
Referenced by prepareData().
bool MSWText::readFields | ( | MSWEntry & | entry, |
std::vector< long > const & | fieldPos | ||
) | [protected] |
read the field data
Referenced by createZones().
bool MSWText::readFontNames | ( | MSWEntry & | entry | ) | [protected] |
read the font names
Referenced by createZones().
bool MSWText::readFootnotesData | ( | MSWEntry & | entry | ) | [protected] |
read the footnote data
Referenced by createZones().
bool MSWText::readFootnotesPos | ( | MSWEntry & | entry, |
std::vector< long > const & | noteDef | ||
) | [protected] |
read the footnote pos in text + val
Referenced by createZones().
bool MSWText::readHeaderTextLength | ( | ) | [protected] |
reads the three different zone size
bool MSWText::readLongZone | ( | MSWEntry & | entry, |
int | sz, | ||
std::vector< long > & | list | ||
) | [protected] |
read a zone which consists in a list of int
Referenced by createZones().
bool MSWText::readPageBreak | ( | MSWEntry & | entry | ) | [protected] |
read the page limit ?
Referenced by createZones().
bool MSWText::readParagraphInfo | ( | MSWEntry | entry | ) | [protected] |
read the paragraph height info
Referenced by createZones().
bool MSWText::readTextStruct | ( | MSWEntry & | entry | ) | [protected] |
read the text structure(some paragraph style+some text position?)
Referenced by createZones().
bool MSWText::sendFieldComment | ( | int | id | ) | [protected] |
send a field note to a listener
bool MSWText::sendFootnote | ( | int | id | ) | [protected] |
send a note to a listener
bool MSWText::sendMainText | ( | ) | [protected] |
send a main zone
bool MSWText::sendSection | ( | int | sectionId | ) | [protected] |
try to open a section
Referenced by sendText().
bool MSWText::sendTable | ( | MSWTextInternal::Table const & | table | ) | [protected] |
try to send a table.
Referenced by sendText().
bool MSWText::sendText | ( | MWAWEntry const & | textEntry, |
bool | mainZone, | ||
bool | tableCell = false |
||
) | [protected] |
send a text zone
Referenced by flushExtra(), sendFootnote(), sendMainText(), and sendTable().
bool MSWText::updateTableBeginnningAt | ( | long | cPos, |
long & | nextCPos | ||
) | [protected] |
try to find a table which begin at position cPos, if so, update its data...
Referenced by prepareParagraphProperties().
int MSWText::version | ( | ) | const |
returns the file version
Referenced by prepareData(), prepareFontProperties(), prepareParagraphProperties(), prepareTableLimits(), readFields(), readPageBreak(), and readParagraphInfo().
friend class MSWParser [friend] |
friend class MSWTextStyles [friend] |
Referenced by MSWText().
MSWParser* MSWText::m_mainParser [protected] |
the main parser;
Referenced by createZones(), and sendText().
MWAWParserStatePtr MSWText::m_parserState [protected] |
the parser state
Referenced by getFooter(), getHeader(), getParserState(), prepareData(), prepareLines(), prepareTableLimits(), readFields(), readFontNames(), readFootnotesData(), readFootnotesPos(), readHeaderTextLength(), readLongZone(), readPageBreak(), readParagraphInfo(), readTextStruct(), sendFieldComment(), sendFootnote(), sendTable(), sendText(), and version().
shared_ptr<MSWTextInternal::State> MSWText::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(), sendText(), updateTableBeginnningAt(), and version().
shared_ptr<MSWTextStyles> MSWText::m_stylesManager [protected] |
the style manager
Referenced by createZones(), MSWText(), prepareData(), prepareFontProperties(), prepareParagraphProperties(), prepareTableLimits(), readTextStruct(), sendFieldComment(), sendSection(), and sendText().