the main class to read the text part of Microsoft Works file More...
#include <MSK3Text.hxx>
Public Member Functions | |
MSK3Text (MSK3Parser &parser) | |
constructor | |
virtual | ~MSK3Text () |
destructor | |
int | version () const |
returns the file version | |
int | numPages (int zoneId) const |
returns the number of pages | |
Protected Member Functions | |
int | createZones (int numLines=-1, bool mainZone=false) |
finds the different text zones. Returns the zoneId or -1. | |
std::string | readHeaderFooterString (bool header) |
void | flushExtra () |
sends the data which have not yet been sent to the listener | |
void | sendZone (int zoneId) |
send a zone | |
void | sendNote (int zoneId, int noteId) |
send a note | |
int | getHeader () const |
returns a header zone id ( or -1 ) | |
int | getFooter () const |
returns a footer zone id ( or -1 ) | |
bool | getLinesPagesHeight (int zoneId, std::vector< int > &lines, std::vector< int > &pages) |
return the lines and pages height ( for v1, ...) | |
bool | readZoneHeader (MSK3TextInternal::LineZone &zone) const |
try to read a zone header | |
void | update (MSK3TextInternal::TextZone &zone) |
prepare a zone | |
void | updateNotes (MSK3TextInternal::TextZone &zone, int firstNote) |
prepare the note zones given a zone and the position of the first note | |
void | send (MSK3TextInternal::TextZone &zone, Vec2i limit=Vec2i(-1,-1)) |
sends the zone data to the listener. | |
bool | readFont (MSK3TextInternal::Font &font, long endPos) |
tries to read a font | |
bool | readParagraph (MSK3TextInternal::LineZone &zone, MWAWParagraph ¶g) |
tries to read a paragraph | |
bool | sendText (MSK3TextInternal::LineZone &zone, int zoneId) |
tries to send a text zone | |
bool | sendString (std::string &str) |
tries to send a string (for v1-2, header/footer zone) | |
Protected Attributes | |
MWAWParserStatePtr | m_parserState |
the parser state | |
shared_ptr < MSK3TextInternal::State > | m_state |
the state | |
MSK3Parser * | m_mainParser |
the main parser; | |
Private Member Functions | |
MSK3Text (MSK3Text const &orig) | |
MSK3Text & | operator= (MSK3Text const &orig) |
Friends | |
class | MSK3Parser |
the main class to read the text part of Microsoft Works file
MSK3Text::MSK3Text | ( | MSK3Parser & | parser | ) |
constructor
MSK3Text::~MSK3Text | ( | ) | [virtual] |
destructor
MSK3Text::MSK3Text | ( | MSK3Text const & | orig | ) | [private] |
int MSK3Text::createZones | ( | int | numLines = -1 , |
bool | mainZone = false |
||
) | [protected] |
finds the different text zones. Returns the zoneId or -1.
void MSK3Text::flushExtra | ( | ) | [protected] |
sends the data which have not yet been sent to the listener
int MSK3Text::getFooter | ( | ) | const [protected] |
returns a footer zone id ( or -1 )
int MSK3Text::getHeader | ( | ) | const [protected] |
returns a header zone id ( or -1 )
bool MSK3Text::getLinesPagesHeight | ( | int | zoneId, |
std::vector< int > & | lines, | ||
std::vector< int > & | pages | ||
) | [protected] |
return the lines and pages height ( for v1, ...)
int MSK3Text::numPages | ( | int | zoneId | ) | const |
returns the number of pages
bool MSK3Text::readFont | ( | MSK3TextInternal::Font & | font, |
long | endPos | ||
) | [protected] |
tries to read a font
Referenced by sendText(), and updateNotes().
std::string MSK3Text::readHeaderFooterString | ( | bool | header | ) | [protected] |
bool MSK3Text::readParagraph | ( | MSK3TextInternal::LineZone & | zone, |
MWAWParagraph & | parag | ||
) | [protected] |
tries to read a paragraph
Referenced by send().
bool MSK3Text::readZoneHeader | ( | MSK3TextInternal::LineZone & | zone | ) | const [protected] |
try to read a zone header
Referenced by createZones().
void MSK3Text::send | ( | MSK3TextInternal::TextZone & | zone, |
Vec2i | limit = Vec2i(-1,-1) |
||
) | [protected] |
sends the zone data to the listener.
You can set limit to send a subzone data ( like note )
Referenced by flushExtra(), sendNote(), and sendZone().
void MSK3Text::sendNote | ( | int | zoneId, |
int | noteId | ||
) | [protected] |
send a note
bool MSK3Text::sendString | ( | std::string & | str | ) | [protected] |
tries to send a string (for v1-2, header/footer zone)
Referenced by send().
bool MSK3Text::sendText | ( | MSK3TextInternal::LineZone & | zone, |
int | zoneId | ||
) | [protected] |
tries to send a text zone
Referenced by send().
void MSK3Text::sendZone | ( | int | zoneId | ) | [protected] |
send a zone
void MSK3Text::update | ( | MSK3TextInternal::TextZone & | zone | ) | [protected] |
prepare a zone
Referenced by createZones().
void MSK3Text::updateNotes | ( | MSK3TextInternal::TextZone & | zone, |
int | firstNote | ||
) | [protected] |
prepare the note zones given a zone and the position of the first note
Referenced by createZones().
int MSK3Text::version | ( | ) | const |
returns the file version
Referenced by readFont(), and sendText().
friend class MSK3Parser [friend] |
MSK3Parser* MSK3Text::m_mainParser [protected] |
the main parser;
Referenced by createZones(), readFont(), readHeaderFooterString(), readParagraph(), readZoneHeader(), send(), sendText(), update(), and updateNotes().
MWAWParserStatePtr MSK3Text::m_parserState [protected] |
the parser state
Referenced by send(), sendNote(), sendString(), sendText(), and version().
shared_ptr<MSK3TextInternal::State> MSK3Text::m_state [protected] |
the state
Referenced by createZones(), flushExtra(), getFooter(), getHeader(), numPages(), readHeaderFooterString(), send(), sendNote(), sendZone(), and version().