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

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

`#include <MsWks3Text.hxx>`

## Public Member Functions
| MsWks3Text (MsWksDocument &zone)
| constructor More...
virtual | ~MsWks3Text ()
| destructor More...
int | version () const
| returns the file version More...
int | numPages (int zoneId) const
| returns the number of pages More...

## Protected Member Functions
int | createZones (int numLines=-1, bool mainZone=false)
| finds the different text zones. Returns the zoneId or -1. More...
std::string | readHeaderFooterString (bool header)
| reads the header/footer string : version v1-2 More...
void | flushExtra ()
| sends the data which have not yet been sent to the listener More...
void | sendZone (int zoneId)
| send a zone More...
void | sendNote (int zoneId, int noteId)
| send a note More...
int | getHeader () const
| returns a header zone id ( or -1 ) More...
int | getFooter () const
| returns a footer zone id ( or -1 ) More...
bool | getLinesPagesHeight (int zoneId, std::vector< int > &lines, std::vector< int > &pages)
| return the lines and pages height ( for v1, ...) More...
bool | readZoneHeader (MsWks3TextInternal::LineZone &zone) const
| try to read a zone header More...
void | update (MsWks3TextInternal::TextZone &zone)
| prepare a zone More...
void | updateNotes (MsWks3TextInternal::TextZone &zone, int firstNote)
| prepare the note zones given a zone and the position of the first note More...
void | send (MsWks3TextInternal::TextZone &zone, MWAWVec2i limit=MWAWVec2i(-1,-1))
| sends the zone data to the listener. More...
bool | readFont (MsWks3TextInternal::Font &font, long endPos)
| tries to read a font More...
bool | readParagraph (MsWks3TextInternal::LineZone &zone, MWAWParagraph &parag)
| tries to read a paragraph More...
bool | sendText (MsWks3TextInternal::LineZone &zone, int zoneId)
| tries to send a text zone More...
bool | sendString (std::string &str)
| tries to send a string (for v1-2, header/footer zone) More...

## Protected Attributes
MWAWParserStatePtr | m_parserState
| the parser state More...
shared_ptr< MsWks3TextInternal::State > | m_state
| the state More...
MWAWParser * | m_mainParser
| the main parser; More...
MsWksDocument & | m_document
| the input zone More...

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

## Friends
class | MsWksDocument
class | MsWksParser
class | MsWksDRParser
class | MsWksSSParser
class | MsWks3TextInternal::SubDocument

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ MsWks3Text() [1/2]

MsWks3Text::MsWks3Text | ( | MsWksDocument & | zone | ) |
| explicit

constructor

## ◆ ~MsWks3Text()

MsWks3Text::~MsWks3Text | ( |  | ) |
| virtual

destructor

## ◆ MsWks3Text() [2/2]

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

## Member Function Documentation

## ◆ createZones()

int MsWks3Text::createZones | ( | int | numLines = `-1`,
|  | bool | mainZone = `false`
| ) |  |
| protected

finds the different text zones. Returns the zoneId or -1.

## ◆ flushExtra()

void MsWks3Text::flushExtra | ( |  | ) |
| protected

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

## ◆ getFooter()

int MsWks3Text::getFooter | ( |  | ) | const
| protected

returns a footer zone id ( or -1 )

## ◆ getHeader()

int MsWks3Text::getHeader | ( |  | ) | const
| protected

returns a header zone id ( or -1 )

## ◆ getLinesPagesHeight()

bool MsWks3Text::getLinesPagesHeight | ( | int | zoneId,
|  | std::vector< int > & | lines,
|  | std::vector< int > & | pages
| ) |  |
| protected

return the lines and pages height ( for v1, ...)

Referenced by numPages().

## ◆ numPages()

int MsWks3Text::numPages | ( | int | zoneId | ) | const

returns the number of pages

## ◆ operator=()

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

## ◆ readFont()

bool MsWks3Text::readFont | ( | MsWks3TextInternal::Font & | font,
|  | long | endPos
| ) |  |
| protected

tries to read a font

Referenced by sendText(), and updateNotes().

## ◆ readHeaderFooterString()

std::string MsWks3Text::readHeaderFooterString | ( | bool | header | ) |
| protected

reads the header/footer string : version v1-2

## ◆ readParagraph()

bool MsWks3Text::readParagraph | ( | MsWks3TextInternal::LineZone & | zone,
|  | MWAWParagraph & | parag
| ) |  |
| protected

tries to read a paragraph

Referenced by send().

## ◆ readZoneHeader()

bool MsWks3Text::readZoneHeader | ( | MsWks3TextInternal::LineZone & | zone | ) | const
| protected

try to read a zone header

Referenced by createZones().

## ◆ send()

void MsWks3Text::send | ( | MsWks3TextInternal::TextZone & | zone,
|  | MWAWVec2i | limit = `MWAWVec2i(-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().

## ◆ sendNote()

void MsWks3Text::sendNote | ( | int | zoneId,
|  | int | noteId
| ) |  |
| protected

send a note

## ◆ sendString()

bool MsWks3Text::sendString | ( | std::string & | str | ) |
| protected

tries to send a string (for v1-2, header/footer zone)

Referenced by send().

## ◆ sendText()

bool MsWks3Text::sendText | ( | MsWks3TextInternal::LineZone & | zone,
|  | int | zoneId
| ) |  |
| protected

tries to send a text zone

Referenced by send().

## ◆ sendZone()

void MsWks3Text::sendZone | ( | int | zoneId | ) |
| protected

send a zone

## ◆ update()

void MsWks3Text::update | ( | MsWks3TextInternal::TextZone & | zone | ) |
| protected

prepare a zone

Referenced by createZones().

## ◆ updateNotes()

void MsWks3Text::updateNotes | ( | MsWks3TextInternal::TextZone & | zone,
|  | int | firstNote
| ) |  |
| protected

prepare the note zones given a zone and the position of the first note

Referenced by createZones().

## ◆ version()

int MsWks3Text::version | ( |  | ) | const

returns the file version

Referenced by readFont(), and sendText().

## Friends And Related Function Documentation

## ◆ MsWks3TextInternal::SubDocument

friend class MsWks3TextInternal::SubDocument
| friend

## ◆ MsWksDocument

friend class MsWksDocument
| friend

## ◆ MsWksDRParser

friend class MsWksDRParser
| friend

## ◆ MsWksParser

friend class MsWksParser
| friend

## ◆ MsWksSSParser

friend class MsWksSSParser
| friend

## Member Data Documentation

## ◆ m_document

MsWksDocument& MsWks3Text::m_document
| protected

the input zone

Referenced by createZones(), readFont(), readHeaderFooterString(), readParagraph(), readZoneHeader(), send(), sendText(), and updateNotes().

## ◆ m_mainParser

MWAWParser* MsWks3Text::m_mainParser
| protected

the main parser;

Referenced by MsWks3Text(), readParagraph(), and update().

## ◆ m_parserState

MWAWParserStatePtr MsWks3Text::m_parserState
| protected

the parser state

Referenced by MsWks3Text(), send(), sendNote(), sendString(), sendText(), and version().

## ◆ m_state

shared_ptr<MsWks3TextInternal::State> MsWks3Text::m_state
| protected

the state

Referenced by createZones(), flushExtra(), getFooter(), getHeader(), getLinesPagesHeight(), numPages(), readHeaderFooterString(), send(), sendNote(), sendZone(), and version().

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

- MsWks3Text.hxx
- MsWks3Text.cxx