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
virtual ~HanMacWrdKText ()
 destructor
int version () const
 returns the file version
int numPages () const
 returns the number of pages

Protected Member Functions

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

Protected Attributes

MWAWParserStatePtr m_parserState
 the parser state
std::shared_ptr< HanMacWrdKTextInternal::Statem_state
 the state
HanMacWrdKParserm_mainParser
 the main parser;

Private Member Functions

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

Friends

class HanMacWrdKParser

Detailed Description

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

Constructor & Destructor Documentation

◆ HanMacWrdKText() [1/2]

HanMacWrdKText::HanMacWrdKText ( HanMacWrdKParser & parser)
explicit

constructor

Referenced by HanMacWrdKText(), numPages(), and operator=().

◆ ~HanMacWrdKText()

HanMacWrdKText::~HanMacWrdKText ( )
virtual

destructor

◆ HanMacWrdKText() [2/2]

HanMacWrdKText::HanMacWrdKText ( HanMacWrdKText const & orig)
privatedelete

Member Function Documentation

◆ canSendTextAsGraphic() [1/2]

bool HanMacWrdKText::canSendTextAsGraphic ( HanMacWrdKZone & zone)
protected

check if we can send a textzone has graphic

◆ canSendTextAsGraphic() [2/2]

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

check if we can send a textzone as graphic

Referenced by canSendTextAsGraphic().

◆ computeNumPages()

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

compute the number of pages present in a zone

Referenced by numPages().

◆ flushExtra()

void HanMacWrdKText::flushExtra ( )
protected

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

send data to the listener

◆ getHeaderFooterId()

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

return sthe header/footer id

◆ getTokenIdList()

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

returns the list of zoneId which corresponds to the token

◆ numPages()

int HanMacWrdKText::numPages ( ) const

returns the number of pages

◆ operator=()

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

◆ readFont()

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

◆ readFontNames()

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

try to read the fonts name zone (type 5)

◆ readParagraph()

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

◆ readSections()

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

try to read a section info zone (type 4)

◆ readStyles()

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

try to read the style zone (type 3)

◆ readTextZone()

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

try to read a text zone (type 1)

◆ readToken()

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

◆ sendMainText()

bool HanMacWrdKText::sendMainText ( )
protected

send the main text zone

◆ sendText() [1/2]

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

try to send a text zone (type 1)

◆ sendText() [2/2]

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

send a text zone

Referenced by flushExtra(), sendMainText(), and sendText().

◆ setProperty()

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

send the ruler properties

Referenced by sendText().

◆ updateTextZoneTypes()

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

update the text zone type with map id->type

◆ version()

int HanMacWrdKText::version ( ) const

returns the file version

◆ HanMacWrdKParser

friend class HanMacWrdKParser
friend

Referenced by HanMacWrdKParser, and HanMacWrdKText().

Member Data Documentation

◆ m_mainParser

HanMacWrdKParser* HanMacWrdKText::m_mainParser
protected

the main parser;

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

◆ m_parserState

MWAWParserStatePtr HanMacWrdKText::m_parserState
protected

◆ m_state


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

Generated on Mon Jan 20 2025 00:00:00 for libmwaw by doxygen 1.14.0