ClarisWksText Class Reference

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

`#include <ClarisWksText.hxx>`

## Public Member Functions

| ClarisWksText (ClarisWksDocument &document)
| constructor
virtual | ~ClarisWksText ()
| destructor
int | version () const
| returns the file version
int | numPages () const
| returns the number of pages
bool | updatePageSpanList (MWAWPageSpan const &page, std::vector< MWAWPageSpan > &spanList)
| updates the page span list and returns true if this is possible
std::shared_ptr< ClarisWksStruct::DSET > | readDSETZone (ClarisWksStruct::DSET const &zone, MWAWEntry const &entry, bool &complete)
| reads the zone Text DSET

## Protected Member Functions

void | setProperty (MWAWListener &listener, ClarisWksTextInternal::Paragraph const &ruler, int listId=-1)
| sends a paragraph property to the listener
bool | sendZone (int number, MWAWListenerPtr const &listener=MWAWListenerPtr())
| sends the zone data to the listener (if it exists )
bool | canSendTextAsGraphic (int number) const
| check if we can send a textzone as graphic
void | flushExtra ()
| sends the data which have not yet been sent to the listener
bool | readParagraphs (MWAWEntry const &entry, ClarisWksTextInternal::Zone &zone)
| try to read the paragraph
bool | readFonts (MWAWEntry const &entry, ClarisWksTextInternal::Zone &zone)
| try to read a font sequence
bool | readTokens (MWAWEntry const &entry, ClarisWksTextInternal::Zone &zone)
| try to the token zone)
bool | readTextZoneSize (MWAWEntry const &entry, ClarisWksTextInternal::Zone &zone)
| try to read the text zone size
bool | readTextSection (ClarisWksTextInternal::Zone &zone)
| try to read the section
bool | sendText (ClarisWksTextInternal::Zone const &zone, MWAWListenerPtr listener)
| send the text zone to the listener
bool | canSendTextAsGraphic (ClarisWksTextInternal::Zone const &zone) const
| check if we can send a textzone has graphic
int | findListId (ClarisWksTextInternal::Zone const &zone, int actListId, long cPos, long &lastPos)
| try to find a list id which corresponds to the list beginning in actPos
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_RULR (int N, int fSz)
| read a STYL Paragraph sequence

## Protected Attributes

ClarisWksDocument & | m_document
| the document
MWAWParserStatePtr | m_parserState
| the parser state
std::shared_ptr< ClarisWksTextInternal::State > | m_state
| the state
MWAWParser * | m_mainParser
| the main parser;

## Private Member Functions

| ClarisWksText (ClarisWksText const &orig)=delete
ClarisWksText & | operator= (ClarisWksText const &orig)=delete

## Friends

class | ClarisWksTextInternal::SubDocument
class | ClarisWksDocument
class | ClarisWksParser
class | ClarisWksStyleManager

## Detailed Description

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

## Constructor & Destructor Documentation

## ClarisWksText() [1/2]

ClarisWksText::ClarisWksText | ( | ClarisWksDocument & | document | ) |

explicit

constructor

Referenced by ClarisWksText(), and operator=().

## ~ClarisWksText()

ClarisWksText::~ClarisWksText | ( |  | ) |

virtual

destructor

## ClarisWksText() [2/2]

ClarisWksText::ClarisWksText | ( | ClarisWksText const & | orig | ) |

private delete

## Member Function Documentation

## canSendTextAsGraphic() [1/2]

bool ClarisWksText::canSendTextAsGraphic | ( | ClarisWksTextInternal::Zone const & | zone | ) | const

protected

check if we can send a textzone has graphic

## canSendTextAsGraphic() [2/2]

bool ClarisWksText::canSendTextAsGraphic | ( | int | number | ) | const

protected

check if we can send a textzone as graphic

Referenced by canSendTextAsGraphic().

## findListId()

int ClarisWksText::findListId | ( | ClarisWksTextInternal::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().

## flushExtra()

void ClarisWksText::flushExtra | ( |  | ) |

protected

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

## numPages()

int ClarisWksText::numPages | ( |  | ) | const

returns the number of pages

## operator=()

ClarisWksText & ClarisWksText::operator= | ( | ClarisWksText const & | orig | ) |

private delete

## readDSETZone()

std::shared_ptr< ClarisWksStruct::DSET > ClarisWksText::readDSETZone | ( | ClarisWksStruct::DSET const & | zone,
|  | MWAWEntry const & | entry,
|  | bool & | complete )

reads the zone Text DSET

## readFonts()

bool ClarisWksText::readFonts | ( | MWAWEntry const & | entry,
|  | ClarisWksTextInternal::Zone & | zone )

protected

try to read a font sequence

Referenced by readDSETZone().

## readParagraph()

bool ClarisWksText::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().

## readParagraphs() [1/2]

bool ClarisWksText::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().

## readParagraphs() [2/2]

bool ClarisWksText::readParagraphs | ( | MWAWEntry const & | entry,
|  | ClarisWksTextInternal::Zone & | zone )

protected

try to read the paragraph

## readSTYL_RULR()

bool ClarisWksText::readSTYL_RULR | ( | int | N,
|  | int | fSz )

protected

read a STYL Paragraph sequence

## readTextSection()

bool ClarisWksText::readTextSection | ( | ClarisWksTextInternal::Zone & | zone | ) |

protected

try to read the section

find f0=O| (for second section)[1|2|4] f1=0| (for second section [2e,4e,5b] , f2=0|2d|4d|5a

Referenced by readDSETZone().

## readTextZoneSize()

bool ClarisWksText::readTextZoneSize | ( | MWAWEntry const & | entry,
|  | ClarisWksTextInternal::Zone & | zone )

protected

try to read the text zone size

Referenced by readDSETZone().

## readTokens()

bool ClarisWksText::readTokens | ( | MWAWEntry const & | entry,
|  | ClarisWksTextInternal::Zone & | zone )

protected

try to the token zone)

Referenced by readDSETZone().

## sendText()

bool ClarisWksText::sendText | ( | ClarisWksTextInternal::Zone const & | zone,
|  | MWAWListenerPtr | listener )

protected

send the text zone to the listener

Referenced by flushExtra(), and sendZone().

## sendZone()

bool ClarisWksText::sendZone | ( | int | number,
|  | MWAWListenerPtr const & | listener = MWAWListenerPtr() )

protected

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

## setProperty()

void ClarisWksText::setProperty | ( | MWAWListener & | listener,
|  | ClarisWksTextInternal::Paragraph const & | ruler,
|  | int | listId = -1 )

protected

sends a paragraph property to the listener

Referenced by sendText().

## updatePageSpanList()

bool ClarisWksText::updatePageSpanList | ( | MWAWPageSpan const & | page,
|  | std::vector< MWAWPageSpan > & | spanList )

updates the page span list and returns true if this is possible

## version()

int ClarisWksText::version | ( |  | ) | const

returns the file version

Referenced by readDSETZone(), readFonts(), readParagraph(), readParagraphs(), readTextSection(), and readTokens().

## Friends And Related Symbol Documentation

## ClarisWksDocument

friend class ClarisWksDocument

friend

Referenced by ClarisWksDocument, ClarisWksStyleManager, and ClarisWksText().

## ClarisWksParser

friend class ClarisWksParser

friend

Referenced by ClarisWksParser.

## ClarisWksStyleManager

friend class ClarisWksStyleManager

friend

Referenced by ClarisWksStyleManager.

## ClarisWksTextInternal::SubDocument

friend class ClarisWksTextInternal::SubDocument

friend

## Member Data Documentation

## m_document

ClarisWksDocument& ClarisWksText::m_document

protected

the document

Referenced by ClarisWksText(), readFonts(), readParagraphs(), sendText(), and updatePageSpanList().

## m_mainParser

MWAWParser* ClarisWksText::m_mainParser

protected

the main parser;

Referenced by ClarisWksText().

## m_parserState

MWAWParserStatePtr ClarisWksText::m_parserState

protected

the parser state

Referenced by ClarisWksText(), findListId(), flushExtra(), numPages(), readDSETZone(), readFonts(), readParagraph(), readParagraphs(), readParagraphs(), readSTYL_RULR(), readTextSection(), readTextZoneSize(), readTokens(), sendText(), updatePageSpanList(), and version().

## m_state

std::shared_ptr<ClarisWksTextInternal::State> ClarisWksText::m_state

protected

the state

Referenced by canSendTextAsGraphic(), ClarisWksText(), findListId(), flushExtra(), numPages(), readDSETZone(), readParagraph(), sendText(), sendZone(), updatePageSpanList(), and version().

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

- ClarisWksText.hxx
- ClarisWksText.cxx