HMWJText Class Reference

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

`#include <HMWJText.hxx>`

## Public Member Functions

| HMWJText (HMWJParser &parser)
| constructor More...
virtual | ~HMWJText ()
| 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)
| send a text zone (not implemented) More...
bool | sendText (HMWJTextInternal::TextZone const &zone, long cPos=0)
| send a text zone More...
void | flushExtra ()
| sends the data which have not yet been sent to the listener More...
int | computeNumPages (HMWJTextInternal::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 (HMWJTextInternal::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, HMWJTextInternal::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...
shared_ptr < HMWJTextInternal::State > | m_state
| the state More...
HMWJParser * | m_mainParser
| the main parser; More...

## Private Member Functions

| HMWJText (HMWJText const &orig)
HMWJText & | operator= (HMWJText const &orig)

## Friends

class | HMWJTextInternal::SubDocument
class | HMWJParser

## Detailed Description

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

## Constructor & Destructor Documentation

HMWJText::HMWJText | ( | HMWJParser & | parser | ) |

constructor

HMWJText::~HMWJText | ( |  | ) |

virtual

destructor

HMWJText::HMWJText | ( | HMWJText const & | orig | ) |

private

## Member Function Documentation

int HMWJText::computeNumPages | ( | HMWJTextInternal::TextZone const & | zone | ) |

protected

compute the number of pages present in a zone

Referenced by numPages().

void HMWJText::flushExtra | ( |  | ) |

protected

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

send data to the listener

std::vector< long > HMWJText::getTokenIdList | ( |  | ) | const

protected

returns the list of zoneId which corresponds to the token

int HMWJText::numPages | ( |  | ) | const

returns the number of pages

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

private

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

protected

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

Referenced by readFonts().

bool HMWJText::readFontNames | ( | MWAWEntry const & | entry | ) |

protected

try to read the fonts name zone (type 15)

bool HMWJText::readFonts | ( | MWAWEntry const & | entry | ) |

protected

try to read the fonts zone (type 0)

bool HMWJText::readFtnPos | ( | MWAWEntry const & | entry | ) |

protected

try to read the footnote position

bool HMWJText::readParagraph | ( | HMWJTextInternal::Paragraph & | para,
|  | long | endPos = `-1`
| ) |  |

protected

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

Referenced by readParagraphs().

bool HMWJText::readParagraphs | ( | MWAWEntry const & | entry | ) |

protected

try to read the paragraphs zone (type 1)

bool HMWJText::readSections | ( | MWAWEntry const & | entry | ) |

protected

try to read the different sections

bool HMWJText::readStyles | ( | MWAWEntry const & | entry | ) |

protected

try to read the style zone (type 2)

bool HMWJText::readTextToken | ( | long | endPos,
|  | HMWJTextInternal::TextZone & | zone
| ) |  |

protected

try to read the token in the text zone

Referenced by readTextZone().

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

protected

try to read a text zone ( type 5 )

bool HMWJText::readTextZonesList | ( | MWAWEntry const & | entry | ) |

protected

try to read the list of textzones ( type 4)

bool HMWJText::sendMainText | ( |  | ) |

protected

send the main text zone

bool HMWJText::sendText | ( | long | id,
|  | long | cPos
| ) |  |

protected

send a text zone (not implemented)

Referenced by flushExtra(), HMWJTextInternal::SubDocument::parse(), and sendMainText().

bool HMWJText::sendText | ( | HMWJTextInternal::TextZone const & | zone,
|  | long | cPos = `0`
| ) |  |

protected

send a text zone

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

protected

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

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

protected

update the text zone type with map id->type

int HMWJText::version | ( |  | ) | const

returns the file version

## Friends And Related Function Documentation

friend class HMWJParser

friend

friend class HMWJTextInternal::SubDocument

friend

## Member Data Documentation

HMWJParser* HMWJText::m_mainParser

protected

the main parser;

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

MWAWParserStatePtr HMWJText::m_parserState

protected

the parser state

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

shared_ptr<HMWJTextInternal::State> HMWJText::m_state

protected

the state

Referenced by 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:

- HMWJText.hxx
- HMWJText.cxx