NisusWrtText Class Reference documentation

- Main Page
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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

the main class to read the text part of Nisus file More...

`#include <NisusWrtText.hxx>`

## Public Member Functions
| NisusWrtText (NisusWrtParser &parser)
| constructor More...
virtual | ~NisusWrtText ()
| destructor More...
int | version () const
| returns the file version More...
int | numPages () const
| returns the number of pages More...

## Protected Member Functions
bool | createZones ()
| finds the different text zones More...
shared_ptr< MWAWSubDocument > | getHeader (int page, int &numSimillar)
| return an header subdocument More...
shared_ptr< MWAWSubDocument > | getFooter (int page, int &numSimillar)
| return a footer subdocument More...
bool | sendMainText ()
| send a main zone More...
void | flushExtra ()
| sends the data which have not yet been sent to the listener More...
bool | sendText (MWAWEntry entry, NisusWrtStruct::Position fPos=NisusWrtStruct::Position())
| read a text entry. More...
bool | sendFootnote (int footnoteId)
| try to send the ith footnote More...
bool | sendHeaderFooter (int hfId)
| try to send the ith header footer More...
void | computePositions ()
| compute the positions More...
void | setProperty (NisusWrtTextInternal::Paragraph const &ruler, int width)
| sends a paragraph property to the listener More...
bool | readFontsList (MWAWEntry const &entry)
| read the list of fonts More...
bool | readHeaderFooter (MWAWEntry const &entry)
| read the header/footer main entry More...
bool | readFootnotes (MWAWEntry const &entry)
| read the footnote main entry More...
bool | readFonts (MWAWEntry const &entry)
| read the FTAB/STYL resource: a list of fonts More...
bool | readPosToFont (MWAWEntry const &entry, NisusWrtStruct::ZoneType zoneId)
| read the FRMT resource: a list of filepos -> fontId More...
bool | readParagraphs (MWAWEntry const &entry, NisusWrtStruct::ZoneType zoneId)
| read the RULE resource: a list of paragraphs More...
bool | readPICD (MWAWEntry const &entry, NisusWrtStruct::ZoneType zoneId)
| read the PICD resource: a list of pict link to the paragraph More...
long | findFilePos (NisusWrtStruct::ZoneType zoneId, NisusWrtStruct::Position const &pos)
| find the file pos which correspond to a pos More...

## Protected Attributes
MWAWParserStatePtr | m_parserState
| the parser state More...
shared_ptr< NisusWrtTextInternal::State > | m_state
| the state More...
NisusWrtParser * | m_mainParser
| the main parser; More...

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

## Friends
class | NisusWrtTextInternal::SubDocument
class | NisusWrtParser

## Detailed Description

the main class to read the text part of Nisus file

## Constructor & Destructor Documentation

NisusWrtText::NisusWrtText | ( | NisusWrtParser & | parser | ) |
| explicit

constructor

NisusWrtText::~NisusWrtText | ( |  | ) |
| virtual

destructor

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

## Member Function Documentation

void NisusWrtText::computePositions | ( |  | ) |
| protected

compute the positions

Referenced by createZones(), and numPages().

bool NisusWrtText::createZones | ( |  | ) |
| protected

finds the different text zones

long NisusWrtText::findFilePos | ( | NisusWrtStruct::ZoneType | zoneId,
|  | NisusWrtStruct::Position const & | pos
| ) |  |
| protected

find the file pos which correspond to a pos

Referenced by sendFootnote(), and sendHeaderFooter().

void NisusWrtText::flushExtra | ( |  | ) |
| protected

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

shared_ptr< MWAWSubDocument > NisusWrtText::getFooter | ( | int | page,
|  | int & | numSimillar
| ) |  |
| protected

return a footer subdocument

shared_ptr< MWAWSubDocument > NisusWrtText::getHeader | ( | int | page,
|  | int & | numSimillar
| ) |  |
| protected

return an header subdocument

int NisusWrtText::numPages | ( |  | ) | const

returns the number of pages

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

bool NisusWrtText::readFonts | ( | MWAWEntry const & | entry | ) |
| protected

read the FTAB/STYL resource: a list of fonts

Referenced by createZones().

bool NisusWrtText::readFontsList | ( | MWAWEntry const & | entry | ) |
| protected

read the list of fonts

Referenced by createZones().

bool NisusWrtText::readFootnotes | ( | MWAWEntry const & | entry | ) |
| protected

read the footnote main entry

Referenced by createZones().

bool NisusWrtText::readHeaderFooter | ( | MWAWEntry const & | entry | ) |
| protected

read the header/footer main entry

Referenced by createZones().

bool NisusWrtText::readParagraphs | ( | MWAWEntry const & | entry,
|  | NisusWrtStruct::ZoneType | zoneId
| ) |  |
| protected

read the RULE resource: a list of paragraphs

Referenced by createZones().

bool NisusWrtText::readPICD | ( | MWAWEntry const & | entry,
|  | NisusWrtStruct::ZoneType | zoneId
| ) |  |
| protected

read the PICD resource: a list of pict link to the paragraph

Referenced by createZones().

bool NisusWrtText::readPosToFont | ( | MWAWEntry const & | entry,
|  | NisusWrtStruct::ZoneType | zoneId
| ) |  |
| protected

read the FRMT resource: a list of filepos -> fontId

Referenced by createZones().

bool NisusWrtText::sendFootnote | ( | int | footnoteId | ) |
| protected

try to send the ith footnote

Referenced by flushExtra().

bool NisusWrtText::sendHeaderFooter | ( | int | hfId | ) |
| protected

try to send the ith header footer

Referenced by flushExtra().

bool NisusWrtText::sendMainText | ( |  | ) |
| protected

send a main zone

send data to the listener

bool NisusWrtText::sendText | ( | MWAWEntry | entry,
|  | NisusWrtStruct::Position | fPos = `NisusWrtStruct::Position()`
| ) |  |
| protected

read a text entry.

Note
  entry.id() must correspond to the zone id.
  while the main text is in the data fork, the footnote/header footer is in a ??TX rsrc.

Referenced by sendFootnote(), sendHeaderFooter(), and sendMainText().

void NisusWrtText::setProperty | ( | NisusWrtTextInternal::Paragraph const & | ruler,
|  | int | width
| ) |  |
| protected

sends a paragraph property to the listener

Referenced by sendText().

int NisusWrtText::version | ( |  | ) | const

returns the file version

## Friends And Related Function Documentation

friend class NisusWrtParser
| friend

friend class NisusWrtTextInternal::SubDocument
| friend

## Member Data Documentation

NisusWrtParser* NisusWrtText::m_mainParser
| protected

the main parser;

Referenced by computePositions(), createZones(), findFilePos(), getFooter(), getHeader(), readFonts(), readFontsList(), readFootnotes(), readHeaderFooter(), readParagraphs(), readPICD(), readPosToFont(), and sendText().

MWAWParserStatePtr NisusWrtText::m_parserState
| protected

the parser state

Referenced by flushExtra(), readFonts(), readFontsList(), readParagraphs(), sendFootnote(), sendHeaderFooter(), sendMainText(), sendText(), setProperty(), and version().

shared_ptr<NisusWrtTextInternal::State> NisusWrtText::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().

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

- NisusWrtText.hxx
- NisusWrtText.cxx