HanMacWrdKText Class Reference

the main class to read the text part of HanMac Word file More...

#include <HanMacWrdKText.hxx>

Public Member Functions

 HanMacWrdKText (HanMacWrdKParser &parser)
 constructor More...
 
virtual ~HanMacWrdKText ()
 destructor More...
 
int version () const
 returns the file version More...
 
int numPages () const
 returns the number of pages More...
 

Protected Member Functions

bool sendMainText ()
 send the main text zone More...
 
bool sendText (long id, long subId, MWAWListenerPtr listener=MWAWListenerPtr())
 send a text zone More...
 
bool canSendTextAsGraphic (long id, long subId)
 check if we can send a textzone as graphic More...
 
void flushExtra ()
 sends the data which have not yet been sent to the listener More...
 
void updateTextZoneTypes (std::map< long, int > const &idTypeMap)
 update the text zone type with map id->type More...
 
int computeNumPages (HanMacWrdKZone const &zone) const
 compute the number of pages present in a zone More...
 
std::vector< long > const & getTokenIdList () const
 returns the list of zoneId which corresponds to the token More...
 
void getHeaderFooterId (long &headerId, long &footerId) const
 return sthe header/footer id More...
 
bool readTextZone (shared_ptr< HanMacWrdKZone > zone)
 try to read a text zone (type 1) More...
 
bool readFontNames (shared_ptr< HanMacWrdKZone > zone)
 try to read the fonts name zone (type 5) More...
 
bool readStyles (shared_ptr< HanMacWrdKZone > zone)
 try to read the style zone (type 3) More...
 
bool readSections (shared_ptr< HanMacWrdKZone > zone)
 try to read a section info zone (type 4) More...
 
bool sendText (HanMacWrdKZone &zone, MWAWListenerPtr listener=MWAWListenerPtr())
 try to send a text zone (type 1) More...
 
bool canSendTextAsGraphic (HanMacWrdKZone &zone)
 check if we can send a textzone has graphic More...
 
bool readFont (HanMacWrdKZone const &zone, MWAWFont &font) const
 try to read a font in a text zone More...
 
bool readParagraph (HanMacWrdKZone const &zone, HanMacWrdKTextInternal::Paragraph &para) const
 try to read a paragraph in a text zone More...
 
void setProperty (HanMacWrdKTextInternal::Paragraph const &para, float width)
 send the ruler properties More...
 
bool readToken (HanMacWrdKZone const &zone, HanMacWrdKTextInternal::Token &token) const
 try to read an token in a text zone More...
 

Protected Attributes

MWAWParserStatePtr m_parserState
 the parser state More...
 
shared_ptr
< HanMacWrdKTextInternal::State
m_state
 the state More...
 
HanMacWrdKParserm_mainParser
 the main parser; More...
 

Private Member Functions

 HanMacWrdKText (HanMacWrdKText const &orig)
 
HanMacWrdKTextoperator= (HanMacWrdKText const &orig)
 

Friends

class HanMacWrdKParser
 

Detailed Description

the main class to read the text part of HanMac Word file

Constructor & Destructor Documentation

HanMacWrdKText::HanMacWrdKText ( HanMacWrdKParser parser)

constructor

HanMacWrdKText::~HanMacWrdKText ( )
virtual

destructor

HanMacWrdKText::HanMacWrdKText ( HanMacWrdKText const &  orig)
private

Member Function Documentation

bool HanMacWrdKText::canSendTextAsGraphic ( long  id,
long  subId 
)
protected

check if we can send a textzone as graphic

bool HanMacWrdKText::canSendTextAsGraphic ( HanMacWrdKZone zone)
protected

check if we can send a textzone has graphic

int HanMacWrdKText::computeNumPages ( HanMacWrdKZone const &  zone) const
protected

compute the number of pages present in a zone

Referenced by numPages().

void HanMacWrdKText::flushExtra ( )
protected

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

send data to the listener

void HanMacWrdKText::getHeaderFooterId ( long &  headerId,
long &  footerId 
) const
protected

return sthe header/footer id

std::vector< long > const & HanMacWrdKText::getTokenIdList ( ) const
protected

returns the list of zoneId which corresponds to the token

int HanMacWrdKText::numPages ( ) const

returns the number of pages

HanMacWrdKText& HanMacWrdKText::operator= ( HanMacWrdKText const &  orig)
private
bool HanMacWrdKText::readFont ( HanMacWrdKZone const &  zone,
MWAWFont font 
) const
protected

try to read a font in a text zone

Referenced by canSendTextAsGraphic(), computeNumPages(), and sendText().

bool HanMacWrdKText::readFontNames ( shared_ptr< HanMacWrdKZone zone)
protected

try to read the fonts name zone (type 5)

bool HanMacWrdKText::readParagraph ( HanMacWrdKZone const &  zone,
HanMacWrdKTextInternal::Paragraph para 
) const
protected

try to read a paragraph in a text zone

Referenced by canSendTextAsGraphic(), computeNumPages(), readTextZone(), and sendText().

bool HanMacWrdKText::readSections ( shared_ptr< HanMacWrdKZone zone)
protected

try to read a section info zone (type 4)

bool HanMacWrdKText::readStyles ( shared_ptr< HanMacWrdKZone zone)
protected

try to read the style zone (type 3)

bool HanMacWrdKText::readTextZone ( shared_ptr< HanMacWrdKZone zone)
protected

try to read a text zone (type 1)

bool HanMacWrdKText::readToken ( HanMacWrdKZone const &  zone,
HanMacWrdKTextInternal::Token token 
) const
protected

try to read an token in a text zone

Referenced by computeNumPages(), readTextZone(), and sendText().

bool HanMacWrdKText::sendMainText ( )
protected

send the main text zone

bool HanMacWrdKText::sendText ( long  id,
long  subId,
MWAWListenerPtr  listener = MWAWListenerPtr() 
)
protected

send a text zone

Referenced by flushExtra(), and sendMainText().

bool HanMacWrdKText::sendText ( HanMacWrdKZone zone,
MWAWListenerPtr  listener = MWAWListenerPtr() 
)
protected

try to send a text zone (type 1)

void HanMacWrdKText::setProperty ( HanMacWrdKTextInternal::Paragraph const &  para,
float  width 
)
protected

send the ruler properties

Referenced by sendText().

void HanMacWrdKText::updateTextZoneTypes ( std::map< long, int > const &  idTypeMap)
protected

update the text zone type with map id->type

int HanMacWrdKText::version ( ) const

returns the file version

Friends And Related Function Documentation

friend class HanMacWrdKParser
friend

Member Data Documentation

HanMacWrdKParser* HanMacWrdKText::m_mainParser
protected

the main parser;

Referenced by readFont(), readParagraph(), and sendText().

MWAWParserStatePtr HanMacWrdKText::m_parserState
protected

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

Generated on Thu Jul 9 2015 20:26:38 for libmwaw by doxygen 1.8.8