CWText Class Reference

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

#include <CWText.hxx>

Public Member Functions

 CWText (CWParser &parser)
 constructor
virtual ~CWText ()
 destructor
int version () const
 returns the file version
int numPages () const
 returns the number of pages
shared_ptr< CWStruct::DSETreadDSETZone (CWStruct::DSET const &zone, MWAWEntry const &entry, bool &complete)
 reads the zone Text DSET

Protected Member Functions

void setProperty (CWTextInternal::Paragraph const &ruler, int listId=-1)
 sends a paragraph property to the listener
bool sendZone (int number)
 sends the zone data to the listener (if it exists )
void flushExtra ()
 sends the data which have not yet been sent to the listener
bool readParagraphs (MWAWEntry const &entry, CWTextInternal::Zone &zone)
 try to read the paragraph
bool readFonts (MWAWEntry const &entry, CWTextInternal::Zone &zone)
 try to read a font sequence
bool readTokens (MWAWEntry const &entry, CWTextInternal::Zone &zone)
 try to the token zone)
bool readTextZoneSize (MWAWEntry const &entry, CWTextInternal::Zone &zone)
 try to read the text zone size
bool readTextSection (CWTextInternal::Zone &zone)
 try to read the section
bool sendText (CWTextInternal::Zone const &zone)
 send the text zone to the listener
int findListId (CWTextInternal::Zone const &zone, int actListId, long cPos, long &lastPos)
 try to find a list id which corresponds to the list beginning in actPos
bool readFont (int id, int &posC, MWAWFont &font)
 try to read a font
bool readChar (int id, int fontSize, MWAWFont &font)
 try to read a named font
bool readParagraphs ()
 read the rulers block which is present at the beginning of the text in the first version of Claris Works : v1-2
bool readParagraph (int id=-1)
 the definition of ruler : present at the beginning of the text in the first version of Claris Works : v1-2, present in the STYL entries in v4-v6 files
bool readSTYL_CHAR (int N, int fSz)
 read a STYL Font sequence
bool readSTYL_RULR (int N, int fSz)
 read a STYL Paragraph sequence

Protected Attributes

MWAWParserStatePtr m_parserState
 the parser state
shared_ptr< CWTextInternal::Statem_state
 the state
CWParserm_mainParser
 the main parser;
shared_ptr< CWStyleManagerm_styleManager
 the style manager

Private Member Functions

 CWText (CWText const &orig)
CWTextoperator= (CWText const &orig)

Friends

class CWParser
class CWStyleManager

Detailed Description

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

Constructor & Destructor Documentation

CWText::CWText ( CWParser parser)

constructor

CWText::~CWText ( )
virtual

destructor

CWText::CWText ( CWText const &  orig)
private

Member Function Documentation

int CWText::findListId ( CWTextInternal::Zone const &  zone,
int  actListId,
long  cPos,
long &  lastPos 
)
protected

try to find a list id which corresponds to the list beginning in actPos

Referenced by sendText().

void CWText::flushExtra ( )
protected

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

int CWText::numPages ( ) const

returns the number of pages

CWText& CWText::operator= ( CWText const &  orig)
private
bool CWText::readChar ( int  id,
int  fontSize,
MWAWFont font 
)
protected

try to read a named font

Referenced by readSTYL_CHAR().

shared_ptr< CWStruct::DSET > CWText::readDSETZone ( CWStruct::DSET const &  zone,
MWAWEntry const &  entry,
bool &  complete 
)

reads the zone Text DSET

bool CWText::readFont ( int  id,
int &  posC,
MWAWFont font 
)
protected

try to read a font

Referenced by readFonts().

bool CWText::readFonts ( MWAWEntry const &  entry,
CWTextInternal::Zone zone 
)
protected

try to read a font sequence

Referenced by readDSETZone().

bool CWText::readParagraph ( int  id = -1)
protected

the definition of ruler : present at the beginning of the text in the first version of Claris Works : v1-2, present in the STYL entries in v4-v6 files

Referenced by readParagraphs(), and readSTYL_RULR().

bool CWText::readParagraphs ( MWAWEntry const &  entry,
CWTextInternal::Zone zone 
)
protected

try to read the paragraph

bool CWText::readParagraphs ( )
protected

read the rulers block which is present at the beginning of the text in the first version of Claris Works : v1-2

Referenced by readDSETZone().

bool CWText::readSTYL_CHAR ( int  N,
int  fSz 
)
protected

read a STYL Font sequence

bool CWText::readSTYL_RULR ( int  N,
int  fSz 
)
protected

read a STYL Paragraph sequence

bool CWText::readTextSection ( CWTextInternal::Zone zone)
protected

try to read the section

find f0=0|1, f1=O| (for second section)[1|2|4]

f2=0| (for second section [2e,4e,5b] , f3=0|2d|4d|5a

Referenced by readDSETZone().

bool CWText::readTextZoneSize ( MWAWEntry const &  entry,
CWTextInternal::Zone zone 
)
protected

try to read the text zone size

Referenced by readDSETZone().

bool CWText::readTokens ( MWAWEntry const &  entry,
CWTextInternal::Zone zone 
)
protected

try to the token zone)

Referenced by readDSETZone().

bool CWText::sendText ( CWTextInternal::Zone const &  zone)
protected

send the text zone to the listener

Referenced by flushExtra(), and sendZone().

bool CWText::sendZone ( int  number)
protected

sends the zone data to the listener (if it exists )

void CWText::setProperty ( CWTextInternal::Paragraph const &  ruler,
int  listId = -1 
)
protected

sends a paragraph property to the listener

Referenced by sendText().

int CWText::version ( ) const

Friends And Related Function Documentation

friend class CWParser
friend
friend class CWStyleManager
friend

Member Data Documentation

CWParser* CWText::m_mainParser
protected

the main parser;

Referenced by readFont(), and sendText().

shared_ptr<CWTextInternal::State> CWText::m_state
protected
shared_ptr<CWStyleManager> CWText::m_styleManager
protected

the style manager

Referenced by readChar(), readFont(), and readParagraphs().


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

Generated on Wed May 22 2013 18:12:39 for libmwaw by doxygen 1.8.1.2