the main class to read the text part of Nisus file More...
#include <NSText.hxx>
Public Member Functions | |
NSText (NSParser &parser) | |
constructor | |
virtual | ~NSText () |
destructor | |
int | version () const |
returns the file version | |
int | numPages () const |
returns the number of pages | |
Protected Member Functions | |
bool | createZones () |
finds the different text zones | |
shared_ptr< MWAWSubDocument > | getHeader (int page, int &numSimillar) |
return an header subdocument | |
shared_ptr< MWAWSubDocument > | getFooter (int page, int &numSimillar) |
return a footer subdocument | |
bool | sendMainText () |
send a main zone | |
void | flushExtra () |
sends the data which have not yet been sent to the listener | |
bool | sendText (MWAWEntry entry, NSStruct::Position fPos=NSStruct::Position()) |
read a text entry. | |
bool | sendFootnote (int footnoteId) |
try to send the ith footnote | |
bool | sendHeaderFooter (int hfId) |
try to send the ith header footer | |
void | computePositions () |
compute the positions | |
void | setProperty (NSTextInternal::Paragraph const &ruler, int width) |
sends a paragraph property to the listener | |
bool | readFontsList (MWAWEntry const &entry) |
read the list of fonts | |
bool | readHeaderFooter (MWAWEntry const &entry) |
read the header/footer main entry | |
bool | readFootnotes (MWAWEntry const &entry) |
read the footnote main entry | |
bool | readFonts (MWAWEntry const &entry) |
read the FTAB/STYL resource: a list of fonts | |
bool | readPosToFont (MWAWEntry const &entry, NSStruct::ZoneType zoneId) |
read the FRMT resource: a list of filepos -> fontId | |
bool | readParagraphs (MWAWEntry const &entry, NSStruct::ZoneType zoneId) |
read the RULE resource: a list of paragraphs | |
bool | readPICD (MWAWEntry const &entry, NSStruct::ZoneType zoneId) |
read the PICD resource: a list of pict link to the paragraph | |
long | findFilePos (NSStruct::ZoneType zoneId, NSStruct::Position const &pos) |
find the file pos which correspond to a pos | |
Protected Attributes | |
MWAWParserStatePtr | m_parserState |
the parser state | |
shared_ptr< NSTextInternal::State > | m_state |
the state | |
NSParser * | m_mainParser |
the main parser; | |
Private Member Functions | |
NSText (NSText const &orig) | |
NSText & | operator= (NSText const &orig) |
Friends | |
class | NSTextInternal::SubDocument |
class | NSParser |
the main class to read the text part of Nisus file
NSText::NSText | ( | NSParser & | parser | ) |
constructor
NSText::~NSText | ( | ) | [virtual] |
destructor
NSText::NSText | ( | NSText const & | orig | ) | [private] |
void NSText::computePositions | ( | ) | [protected] |
compute the positions
Referenced by createZones(), and numPages().
bool NSText::createZones | ( | ) | [protected] |
finds the different text zones
long NSText::findFilePos | ( | NSStruct::ZoneType | zoneId, |
NSStruct::Position const & | pos | ||
) | [protected] |
find the file pos which correspond to a pos
Referenced by sendFootnote(), and sendHeaderFooter().
void NSText::flushExtra | ( | ) | [protected] |
sends the data which have not yet been sent to the listener
shared_ptr< MWAWSubDocument > NSText::getFooter | ( | int | page, |
int & | numSimillar | ||
) | [protected] |
return a footer subdocument
shared_ptr< MWAWSubDocument > NSText::getHeader | ( | int | page, |
int & | numSimillar | ||
) | [protected] |
return an header subdocument
int NSText::numPages | ( | ) | const |
returns the number of pages
bool NSText::readFonts | ( | MWAWEntry const & | entry | ) | [protected] |
read the FTAB/STYL resource: a list of fonts
Referenced by createZones().
bool NSText::readFontsList | ( | MWAWEntry const & | entry | ) | [protected] |
read the list of fonts
Referenced by createZones().
bool NSText::readFootnotes | ( | MWAWEntry const & | entry | ) | [protected] |
read the footnote main entry
Referenced by createZones().
bool NSText::readHeaderFooter | ( | MWAWEntry const & | entry | ) | [protected] |
read the header/footer main entry
Referenced by createZones().
bool NSText::readParagraphs | ( | MWAWEntry const & | entry, |
NSStruct::ZoneType | zoneId | ||
) | [protected] |
read the RULE resource: a list of paragraphs
Referenced by createZones().
bool NSText::readPICD | ( | MWAWEntry const & | entry, |
NSStruct::ZoneType | zoneId | ||
) | [protected] |
read the PICD resource: a list of pict link to the paragraph
Referenced by createZones().
bool NSText::readPosToFont | ( | MWAWEntry const & | entry, |
NSStruct::ZoneType | zoneId | ||
) | [protected] |
read the FRMT resource: a list of filepos -> fontId
Referenced by createZones().
bool NSText::sendFootnote | ( | int | footnoteId | ) | [protected] |
try to send the ith footnote
Referenced by flushExtra(), and NSTextInternal::SubDocument::parse().
bool NSText::sendHeaderFooter | ( | int | hfId | ) | [protected] |
try to send the ith header footer
Referenced by flushExtra(), and NSTextInternal::SubDocument::parse().
bool NSText::sendMainText | ( | ) | [protected] |
send a main zone
send data to the listener
bool NSText::sendText | ( | MWAWEntry | entry, |
NSStruct::Position | fPos = NSStruct::Position() |
||
) | [protected] |
read a text entry.
Referenced by sendFootnote(), sendHeaderFooter(), and sendMainText().
void NSText::setProperty | ( | NSTextInternal::Paragraph const & | ruler, |
int | width | ||
) | [protected] |
sends a paragraph property to the listener
Referenced by sendText().
int NSText::version | ( | ) | const |
returns the file version
friend class NSParser [friend] |
friend class NSTextInternal::SubDocument [friend] |
NSParser* NSText::m_mainParser [protected] |
the main parser;
Referenced by computePositions(), createZones(), findFilePos(), getFooter(), getHeader(), readFonts(), readFontsList(), readFootnotes(), readHeaderFooter(), readParagraphs(), readPICD(), readPosToFont(), and sendText().
MWAWParserStatePtr NSText::m_parserState [protected] |
the parser state
Referenced by flushExtra(), readFonts(), readFontsList(), readParagraphs(), sendFootnote(), sendHeaderFooter(), sendMainText(), sendText(), setProperty(), and version().
shared_ptr<NSTextInternal::State> NSText::m_state [protected] |
the state
Referenced by computePositions(), createZones(), findFilePos(), flushExtra(), getFooter(), getHeader(), numPages(), readFonts(), readFootnotes(), readHeaderFooter(), readParagraphs(), readPICD(), readPosToFont(), sendFootnote(), sendHeaderFooter(), sendMainText(), sendText(), and version().