HanMacWrdJText Class Reference documentation

Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Friends | List of all members
HanMacWrdJText Class Reference

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

`#include <HanMacWrdJText.hxx>`

## Public Member Functions
| HanMacWrdJText (HanMacWrdJParser &parser)
| constructor More...
virtual | ~HanMacWrdJText ()
| 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 cPos, MWAWListenerPtr listener=MWAWListenerPtr())
| send a text zone More...
bool | canSendTextAsGraphic (long id, long cPos)
| check if we can send a textzone as graphic More...
bool | sendText (HanMacWrdJTextInternal::TextZone const &zone, long cPos, MWAWListenerPtr listener=MWAWListenerPtr())
| send a text zone More...
bool | canSendTextAsGraphic (HanMacWrdJTextInternal::TextZone const &zone, long cPos)
| check if we can send a textzone has graphic More...
void | flushExtra ()
| sends the data which have not yet been sent to the listener More...
int | computeNumPages (HanMacWrdJTextInternal::TextZone const &zone)
| compute the number of pages present in a zone More...
std::vector< long > | getTokenIdList () const
| returns the list of zoneId which corresponds to the token More...
void | updateTextZoneTypes (std::map< long, int > const &idTypeMap)
| update the text zone type with map id->type More...
void | updateFootnoteInformations (long const &textZId, std::vector< long > const &fPosList)
| update the footnote text zone id and the list of first char position More...
bool | readFontNames (MWAWEntry const &entry)
| try to read the fonts name zone (type 15) More...
bool | readFonts (MWAWEntry const &entry)
| try to read the fonts zone (type 0) More...
bool | readFont (MWAWFont &font, long endPos=-1)
| try to read the font ( reading up to endPos if endPos is defined ) More...
bool | readParagraphs (MWAWEntry const &entry)
| try to read the paragraphs zone (type 1) More...
bool | readParagraph (HanMacWrdJTextInternal::Paragraph &para, long endPos=-1)
| try to read a paragraph ( reading up to endPos if endPos is defined ) More...
bool | readStyles (MWAWEntry const &entry)
| try to read the style zone (type 2) More...
bool | readTextZonesList (MWAWEntry const &entry)
| try to read the list of textzones ( type 4) More...
bool | readTextZone (MWAWEntry const &entry, int actZone)
| try to read a text zone ( type 5 ) More...
bool | readTextToken (long endPos, HanMacWrdJTextInternal::TextZone &zone)
| try to read the token in the text zone More...
bool | readSections (MWAWEntry const &entry)
| try to read the different sections More...
bool | readFtnPos (MWAWEntry const &entry)
| try to read the footnote position More...

## Protected Attributes
MWAWParserStatePtr | m_parserState
| the parser state More...
std::shared_ptr< HanMacWrdJTextInternal::State > | m_state
| the state More...
HanMacWrdJParser * | m_mainParser
| the main parser; More...

## Private Member Functions
| HanMacWrdJText (HanMacWrdJText const &orig)=delete
HanMacWrdJText & | operator= (HanMacWrdJText const &orig)=delete

## Friends
class | HanMacWrdJTextInternal::SubDocument
class | HanMacWrdJParser

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ HanMacWrdJText() [1/2]

HanMacWrdJText::HanMacWrdJText | ( | HanMacWrdJParser & | parser | ) |
| explicit

constructor

## ◆ ~HanMacWrdJText()

HanMacWrdJText::~HanMacWrdJText | ( |  | ) |
| virtual

destructor

## ◆ HanMacWrdJText() [2/2]

HanMacWrdJText::HanMacWrdJText | ( | HanMacWrdJText const & | orig | ) |
| privatedelete

## Member Function Documentation

## ◆ canSendTextAsGraphic() [1/2]

bool HanMacWrdJText::canSendTextAsGraphic | ( | long | id,
|  | long | cPos
| ) |  |
| protected

check if we can send a textzone as graphic

## ◆ canSendTextAsGraphic() [2/2]

bool HanMacWrdJText::canSendTextAsGraphic | ( | HanMacWrdJTextInternal::TextZone const & | zone,
|  | long | cPos
| ) |  |
| protected

check if we can send a textzone has graphic

## ◆ computeNumPages()

int HanMacWrdJText::computeNumPages | ( | HanMacWrdJTextInternal::TextZone const & | zone | ) |
| protected

compute the number of pages present in a zone

Referenced by numPages().

## ◆ flushExtra()

void HanMacWrdJText::flushExtra | ( |  | ) |
| protected

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

send data to the listener

## ◆ getTokenIdList()

std::vector< long > HanMacWrdJText::getTokenIdList | ( |  | ) | const
| protected

returns the list of zoneId which corresponds to the token

## ◆ numPages()

int HanMacWrdJText::numPages | ( |  | ) | const

returns the number of pages

## ◆ operator=()

HanMacWrdJText& HanMacWrdJText::operator= | ( | HanMacWrdJText const & | orig | ) |
| privatedelete

## ◆ readFont()

bool HanMacWrdJText::readFont | ( | MWAWFont & | font,
|  | long | endPos = `-1`
| ) |  |
| protected

try to read the font ( reading up to endPos if endPos is defined )

Referenced by readFonts().

## ◆ readFontNames()

bool HanMacWrdJText::readFontNames | ( | MWAWEntry const & | entry | ) |
| protected

try to read the fonts name zone (type 15)

## ◆ readFonts()

bool HanMacWrdJText::readFonts | ( | MWAWEntry const & | entry | ) |
| protected

try to read the fonts zone (type 0)

## ◆ readFtnPos()

bool HanMacWrdJText::readFtnPos | ( | MWAWEntry const & | entry | ) |
| protected

try to read the footnote position

## ◆ readParagraph()

bool HanMacWrdJText::readParagraph | ( | HanMacWrdJTextInternal::Paragraph & | para,
|  | long | endPos = `-1`
| ) |  |
| protected

try to read a paragraph ( reading up to endPos if endPos is defined )

Referenced by readParagraphs().

## ◆ readParagraphs()

bool HanMacWrdJText::readParagraphs | ( | MWAWEntry const & | entry | ) |
| protected

try to read the paragraphs zone (type 1)

## ◆ readSections()

bool HanMacWrdJText::readSections | ( | MWAWEntry const & | entry | ) |
| protected

try to read the different sections

## ◆ readStyles()

bool HanMacWrdJText::readStyles | ( | MWAWEntry const & | entry | ) |
| protected

try to read the style zone (type 2)

## ◆ readTextToken()

bool HanMacWrdJText::readTextToken | ( | long | endPos,
|  | HanMacWrdJTextInternal::TextZone & | zone
| ) |  |
| protected

try to read the token in the text zone

Referenced by readTextZone().

## ◆ readTextZone()

bool HanMacWrdJText::readTextZone | ( | MWAWEntry const & | entry,
|  | int | actZone
| ) |  |
| protected

try to read a text zone ( type 5 )

## ◆ readTextZonesList()

bool HanMacWrdJText::readTextZonesList | ( | MWAWEntry const & | entry | ) |
| protected

try to read the list of textzones ( type 4)

## ◆ sendMainText()

bool HanMacWrdJText::sendMainText | ( |  | ) |
| protected

send the main text zone

## ◆ sendText() [1/2]

bool HanMacWrdJText::sendText | ( | long | id,
|  | long | cPos,
|  | MWAWListenerPtr | listener = `MWAWListenerPtr()`
| ) |  |
| protected

send a text zone

Referenced by flushExtra(), and sendMainText().

## ◆ sendText() [2/2]

bool HanMacWrdJText::sendText | ( | HanMacWrdJTextInternal::TextZone const & | zone,
|  | long | cPos,
|  | MWAWListenerPtr | listener = `MWAWListenerPtr()`
| ) |  |
| protected

send a text zone

## ◆ updateFootnoteInformations()

void HanMacWrdJText::updateFootnoteInformations | ( | long const & | textZId,
|  | std::vector< long > const & | fPosList
| ) |  |
| protected

update the footnote text zone id and the list of first char position

## ◆ updateTextZoneTypes()

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

update the text zone type with map id->type

## ◆ version()

int HanMacWrdJText::version | ( |  | ) | const

returns the file version

## Friends And Related Function Documentation

## ◆ HanMacWrdJParser

friend class HanMacWrdJParser
| friend

## ◆ HanMacWrdJTextInternal::SubDocument

friend class HanMacWrdJTextInternal::SubDocument
| friend

## Member Data Documentation

## ◆ m_mainParser

HanMacWrdJParser* HanMacWrdJText::m_mainParser
| protected

the main parser;

Referenced by computeNumPages(), readFont(), readFonts(), readFtnPos(), readParagraph(), readParagraphs(), readSections(), readStyles(), readTextToken(), readTextZone(), readTextZonesList(), and sendText().

## ◆ m_parserState

MWAWParserStatePtr HanMacWrdJText::m_parserState
| protected

the parser state

Referenced by flushExtra(), readFont(), readFontNames(), readFonts(), readFtnPos(), readParagraph(), readParagraphs(), readSections(), readStyles(), readTextToken(), readTextZone(), readTextZonesList(), sendText(), and version().

## ◆ m_state

std::shared_ptr<HanMacWrdJTextInternal::State> HanMacWrdJText::m_state
| protected

the state

Referenced by canSendTextAsGraphic(), computeNumPages(), flushExtra(), getTokenIdList(), numPages(), readFonts(), readParagraphs(), readSections(), readTextZone(), readTextZonesList(), sendMainText(), sendText(), updateFootnoteInformations(), updateTextZoneTypes(), and version().

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

- HanMacWrdJText.hxx
- HanMacWrdJText.cxx