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
 
virtual ~NisusWrtText ()
 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
 
std::shared_ptr< MWAWSubDocumentgetHeader (int page, int &numSimillar)
 return an header subdocument
 
std::shared_ptr< MWAWSubDocumentgetFooter (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 const &entry, NisusWrtStruct::Position fPos=NisusWrtStruct::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 (NisusWrtTextInternal::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, NisusWrtStruct::ZoneType zoneId)
 read the FRMT resource: a list of filepos -> fontId
 
bool readParagraphs (MWAWEntry const &entry, NisusWrtStruct::ZoneType zoneId)
 read the RULE resource: a list of paragraphs
 
bool readPICD (MWAWEntry const &entry, NisusWrtStruct::ZoneType zoneId)
 read the PICD resource: a list of pict link to the paragraph
 
long findFilePos (NisusWrtStruct::ZoneType zoneId, NisusWrtStruct::Position const &pos)
 find the file pos which correspond to a pos
 

Protected Attributes

MWAWParserStatePtr m_parserState
 the parser state
 
std::shared_ptr< NisusWrtTextInternal::Statem_state
 the state
 
NisusWrtParserm_mainParser
 the main parser;
 

Private Member Functions

 NisusWrtText (NisusWrtText const &orig)=delete
 
NisusWrtTextoperator= (NisusWrtText const &orig)=delete
 

Friends

class NisusWrtTextInternal::SubDocument
 
class NisusWrtParser
 

Detailed Description

the main class to read the text part of Nisus file

Constructor & Destructor Documentation

◆ NisusWrtText() [1/2]

NisusWrtText::NisusWrtText ( NisusWrtParser parser)
explicit

constructor

◆ ~NisusWrtText()

NisusWrtText::~NisusWrtText ( )
virtual

destructor

◆ NisusWrtText() [2/2]

NisusWrtText::NisusWrtText ( NisusWrtText const &  orig)
privatedelete

Member Function Documentation

◆ computePositions()

void NisusWrtText::computePositions ( )
protected

compute the positions

Referenced by createZones(), and numPages().

◆ createZones()

bool NisusWrtText::createZones ( )
protected

finds the different text zones

◆ findFilePos()

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().

◆ flushExtra()

void NisusWrtText::flushExtra ( )
protected

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

◆ getFooter()

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

return a footer subdocument

◆ getHeader()

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

return an header subdocument

◆ numPages()

int NisusWrtText::numPages ( ) const

returns the number of pages

◆ operator=()

NisusWrtText & NisusWrtText::operator= ( NisusWrtText const &  orig)
privatedelete

◆ readFonts()

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

read the FTAB/STYL resource: a list of fonts

Referenced by createZones().

◆ readFontsList()

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

read the list of fonts

Referenced by createZones().

◆ readFootnotes()

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

read the footnote main entry

Referenced by createZones().

◆ readHeaderFooter()

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

read the header/footer main entry

Referenced by createZones().

◆ readParagraphs()

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

read the RULE resource: a list of paragraphs

Referenced by createZones().

◆ readPICD()

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().

◆ readPosToFont()

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

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

Referenced by createZones().

◆ sendFootnote()

bool NisusWrtText::sendFootnote ( int  footnoteId)
protected

try to send the ith footnote

Referenced by flushExtra(), and NisusWrtTextInternal::SubDocument::parse().

◆ sendHeaderFooter()

bool NisusWrtText::sendHeaderFooter ( int  hfId)
protected

try to send the ith header footer

Referenced by flushExtra(), and NisusWrtTextInternal::SubDocument::parse().

◆ sendMainText()

bool NisusWrtText::sendMainText ( )
protected

send a main zone

send data to the listener

◆ sendText()

bool NisusWrtText::sendText ( MWAWEntry const &  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().

◆ setProperty()

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

sends a paragraph property to the listener

Referenced by sendText().

◆ version()

int NisusWrtText::version ( ) const

returns the file version

Friends And Related Function Documentation

◆ NisusWrtParser

friend class NisusWrtParser
friend

◆ NisusWrtTextInternal::SubDocument

friend class NisusWrtTextInternal::SubDocument
friend

Member Data Documentation

◆ m_mainParser

◆ m_parserState

◆ m_state


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

Generated on Thu Jan 19 2023 00:00:00 for libmwaw by doxygen 1.9.6