HanMacWrdJGraph Class Reference

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

`#include <HanMacWrdJGraph.hxx>`

## Public Member Functions
| HanMacWrdJGraph (HanMacWrdJParser &parser)
| constructor
virtual | ~HanMacWrdJGraph ()
| destructor
int | version () const
| returns the file version
int | numPages () const
| returns the number of pages

## Protected Member Functions
bool | getColor (int colId, int patternId, MWAWColor &color) const
| returns the color associated with a pattern
void | prepareStructures ()
| check the group structures, the linked textbox
bool | sendPageGraphics (std::vector< long > const &doNotSendIds)
| try to send the page graphic
void | flushExtra ()
| sends the data which have not yet been sent to the listener
bool | readFrames (MWAWEntry const &entry)
| try to read the frames definition (type 3)
std::shared_ptr< HanMacWrdJGraphInternal::Frame > | readFrame (int id)
| try to read a frame
std::shared_ptr< HanMacWrdJGraphInternal::ShapeGraph > | readShapeGraph (HanMacWrdJGraphInternal::Frame const &header, long endPos)
| try to read the basic graph data
std::shared_ptr< HanMacWrdJGraphInternal::CommentFrame > | readCommentData (HanMacWrdJGraphInternal::Frame const &header, long endPos)
| try to read the comment data
std::shared_ptr< HanMacWrdJGraphInternal::PictureFrame > | readPictureData (HanMacWrdJGraphInternal::Frame const &header, long endPos)
| try to read the picture data
std::shared_ptr< HanMacWrdJGraphInternal::TableFrame > | readTableData (HanMacWrdJGraphInternal::Frame const &header, long endPos)
| try to read the table data
std::shared_ptr< HanMacWrdJGraphInternal::TextboxFrame > | readTextboxData (HanMacWrdJGraphInternal::Frame const &header, long endPos)
| try to read a textbox data
std::shared_ptr< HanMacWrdJGraphInternal::TextFrame > | readTextData (HanMacWrdJGraphInternal::Frame const &header, long endPos)
| try to read a text data (text, header/footer, footnote)
bool | readGroupData (MWAWEntry const &entry, int actZone)
| try to read the groupd data ( type 9 )
bool | readGraphData (MWAWEntry const &entry, int actZone)
| try to read the graph data (zone 8)
bool | readPicture (MWAWEntry const &entry, int actZone)
| try to read the pictures definition (type 6)
bool | readTable (MWAWEntry const &entry, int actZone)
| try to read a table (zone 7)
bool | readTableFormatsList (HanMacWrdJGraphInternal::Table &table, long endPos)
| try to read a list of format
bool | sendFrame (HanMacWrdJGraphInternal::Frame const &frame, MWAWPosition const &pos)
| try to send a frame to the listener
bool | sendShapeGraph (HanMacWrdJGraphInternal::ShapeGraph const &pict, MWAWPosition const &pos)
| try to send a basic picture to the listener
bool | sendComment (HanMacWrdJGraphInternal::CommentFrame const &textbox, MWAWPosition const &pos, librevenge::RVNGPropertyList const &extras=librevenge::RVNGPropertyList())
| try to send a comment box to the listener
bool | sendPictureFrame (HanMacWrdJGraphInternal::PictureFrame const &pict, MWAWPosition const &pos)
| try to send a picture frame
bool | sendEmptyPicture (MWAWPosition const &pos)
| try to send an empty picture
bool | sendTextbox (HanMacWrdJGraphInternal::TextboxFrame const &textbox, MWAWPosition const &pos)
| try to send a textbox to the listener
bool | sendTableUnformatted (long zId)
| try to send a table unformatted
bool | sendGroup (long zId, MWAWPosition const &pos)
| try to send a group to the listener
bool | sendGroup (HanMacWrdJGraphInternal::Group const &group, MWAWPosition const &pos)
| try to send a group to the listener
bool | canCreateGraphic (HanMacWrdJGraphInternal::Group const &group)
| check if we can send a group as graphic
void | sendGroupChild (HanMacWrdJGraphInternal::Group const &group, MWAWPosition const &pos)
| try to send a group elements by elements
void | sendGroup (HanMacWrdJGraphInternal::Group const &group, MWAWGraphicListenerPtr const &listener)
| send the group as a graphic zone
std::map< long, int > | getTextFrameInformations () const
| return a list textZId -> type which type=0(main), 1(header), 2(footer), 3(footnote), 4(textbox), 9(table), 10(comment)
bool | getFootnoteInformations (long &textZId, std::vector< long > &fPosList) const
| return the footnote text zone id and the list of first char position
bool | sendFrame (long frameId, MWAWPosition const &pos)
| try to send a frame to the listener
bool | sendText (long textId, long fPos, MWAWListenerPtr const &listener=MWAWListenerPtr())
| ask main parser to send a text zone
bool | checkGroupStructures (long zId, std::set< long > &seens, bool inGroup)
| check the graph structures: ie.

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

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

## Friends
class | HanMacWrdJParser
struct | HanMacWrdJGraphInternal::Table
class | HanMacWrdJGraphInternal::SubDocument

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ HanMacWrdJGraph() [1/2]

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

constructor

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

## ◆ ~HanMacWrdJGraph()

HanMacWrdJGraph::~HanMacWrdJGraph | ( |  | ) |
| virtual

destructor

## ◆ HanMacWrdJGraph() [2/2]

HanMacWrdJGraph::HanMacWrdJGraph | ( | HanMacWrdJGraph const & | orig | ) |
| private delete

## Member Function Documentation

## ◆ canCreateGraphic()

bool HanMacWrdJGraph::canCreateGraphic | ( | HanMacWrdJGraphInternal::Group const & | group | ) |
| protected

check if we can send a group as graphic

Referenced by canCreateGraphic(), sendFrame(), and sendGroupChild().

## ◆ checkGroupStructures()

bool HanMacWrdJGraph::checkGroupStructures | ( | long | zId,
|  | std::set< long > & | seens,
|  | bool | inGroup )
| protected

check the graph structures: ie.

the group children

Referenced by checkGroupStructures(), and prepareStructures().

## ◆ flushExtra()

void HanMacWrdJGraph::flushExtra | ( |  | ) |
| protected

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

## ◆ getColor()

bool HanMacWrdJGraph::getColor | ( | int | colId,
|  | int | patternId,
|  | MWAWColor & | color ) const
| protected

returns the color associated with a pattern

## ◆ getFootnoteInformations()

bool HanMacWrdJGraph::getFootnoteInformations | ( | long & | textZId,
|  | std::vector< long > & | fPosList ) const
| protected

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

## ◆ getTextFrameInformations()

std::map< long, int > HanMacWrdJGraph::getTextFrameInformations | ( |  | ) | const
| protected

return a list textZId -> type which type=0(main), 1(header), 2(footer), 3(footnote), 4(textbox), 9(table), 10(comment)

## ◆ numPages()

int HanMacWrdJGraph::numPages | ( |  | ) | const

returns the number of pages

## ◆ operator=()

HanMacWrdJGraph & HanMacWrdJGraph::operator= | ( | HanMacWrdJGraph const & | orig | ) |
| private delete

## ◆ prepareStructures()

void HanMacWrdJGraph::prepareStructures | ( |  | ) |
| protected

check the group structures, the linked textbox

## ◆ readCommentData()

std::shared_ptr< HanMacWrdJGraphInternal::CommentFrame > HanMacWrdJGraph::readCommentData | ( | HanMacWrdJGraphInternal::Frame const & | header,
|  | long | endPos )
| protected

try to read the comment data

Referenced by readFrame().

## ◆ readFrame()

std::shared_ptr< HanMacWrdJGraphInternal::Frame > HanMacWrdJGraph::readFrame | ( | int | id | ) |
| protected

try to read a frame

Referenced by readFrames().

## ◆ readFrames()

bool HanMacWrdJGraph::readFrames | ( | MWAWEntry const & | entry | ) |
| protected

try to read the frames definition (type 3)

## ◆ readGraphData()

bool HanMacWrdJGraph::readGraphData | ( | MWAWEntry const & | entry,
|  | int | actZone )
| protected

try to read the graph data (zone 8)

## ◆ readGroupData()

bool HanMacWrdJGraph::readGroupData | ( | MWAWEntry const & | entry,
|  | int | actZone )
| protected

try to read the groupd data ( type 9 )

## ◆ readPicture()

bool HanMacWrdJGraph::readPicture | ( | MWAWEntry const & | entry,
|  | int | actZone )
| protected

try to read the pictures definition (type 6)

## ◆ readPictureData()

std::shared_ptr< HanMacWrdJGraphInternal::PictureFrame > HanMacWrdJGraph::readPictureData | ( | HanMacWrdJGraphInternal::Frame const & | header,
|  | long | endPos )
| protected

try to read the picture data

Referenced by readFrame().

## ◆ readShapeGraph()

std::shared_ptr< HanMacWrdJGraphInternal::ShapeGraph > HanMacWrdJGraph::readShapeGraph | ( | HanMacWrdJGraphInternal::Frame const & | header,
|  | long | endPos )
| protected

try to read the basic graph data

Referenced by readFrame().

## ◆ readTable()

bool HanMacWrdJGraph::readTable | ( | MWAWEntry const & | entry,
|  | int | actZone )
| protected

try to read a table (zone 7)

## ◆ readTableData()

std::shared_ptr< HanMacWrdJGraphInternal::TableFrame > HanMacWrdJGraph::readTableData | ( | HanMacWrdJGraphInternal::Frame const & | header,
|  | long | endPos )
| protected

try to read the table data

Referenced by readFrame().

## ◆ readTableFormatsList()

bool HanMacWrdJGraph::readTableFormatsList | ( | HanMacWrdJGraphInternal::Table & | table,
|  | long | endPos )
| protected

try to read a list of format

Referenced by readTable().

## ◆ readTextboxData()

std::shared_ptr< HanMacWrdJGraphInternal::TextboxFrame > HanMacWrdJGraph::readTextboxData | ( | HanMacWrdJGraphInternal::Frame const & | header,
|  | long | endPos )
| protected

try to read a textbox data

Referenced by readFrame().

## ◆ readTextData()

std::shared_ptr< HanMacWrdJGraphInternal::TextFrame > HanMacWrdJGraph::readTextData | ( | HanMacWrdJGraphInternal::Frame const & | header,
|  | long | endPos )
| protected

try to read a text data (text, header/footer, footnote)

Referenced by readFrame().

## ◆ sendComment()

bool HanMacWrdJGraph::sendComment | ( | HanMacWrdJGraphInternal::CommentFrame const & | textbox,
|  | MWAWPosition const & | pos,
|  | librevenge::RVNGPropertyList const & | extras = librevenge::RVNGPropertyList() )
| protected

try to send a comment box to the listener

Referenced by sendFrame().

## ◆ sendEmptyPicture()

bool HanMacWrdJGraph::sendEmptyPicture | ( | MWAWPosition const & | pos | ) |
| protected

try to send an empty picture

Referenced by sendPictureFrame().

## ◆ sendFrame() [1/2]

bool HanMacWrdJGraph::sendFrame | ( | HanMacWrdJGraphInternal::Frame const & | frame,
|  | MWAWPosition const & | pos )
| protected

try to send a frame to the listener

Referenced by flushExtra(), sendFrame(), sendGroupChild(), and sendPageGraphics().

## ◆ sendFrame() [2/2]

bool HanMacWrdJGraph::sendFrame | ( | long | frameId,
|  | MWAWPosition const & | pos )
| protected

try to send a frame to the listener

## ◆ sendGroup() [1/3]

void HanMacWrdJGraph::sendGroup | ( | HanMacWrdJGraphInternal::Group const & | group,
|  | MWAWGraphicListenerPtr const & | listener )
| protected

send the group as a graphic zone

## ◆ sendGroup() [2/3]

bool HanMacWrdJGraph::sendGroup | ( | HanMacWrdJGraphInternal::Group const & | group,
|  | MWAWPosition const & | pos )
| protected

try to send a group to the listener

## ◆ sendGroup() [3/3]

bool HanMacWrdJGraph::sendGroup | ( | long | zId,
|  | MWAWPosition const & | pos )
| protected

try to send a group to the listener

Referenced by sendFrame(), sendGroup(), sendGroup(), and sendGroupChild().

## ◆ sendGroupChild()

void HanMacWrdJGraph::sendGroupChild | ( | HanMacWrdJGraphInternal::Group const & | group,
|  | MWAWPosition const & | pos )
| protected

try to send a group elements by elements

Referenced by sendGroup().

## ◆ sendPageGraphics()

bool HanMacWrdJGraph::sendPageGraphics | ( | std::vector< long > const & | doNotSendIds | ) |
| protected

try to send the page graphic

## ◆ sendPictureFrame()

bool HanMacWrdJGraph::sendPictureFrame | ( | HanMacWrdJGraphInternal::PictureFrame const & | pict,
|  | MWAWPosition const & | pos )
| protected

try to send a picture frame

Referenced by sendFrame().

## ◆ sendShapeGraph()

bool HanMacWrdJGraph::sendShapeGraph | ( | HanMacWrdJGraphInternal::ShapeGraph const & | pict,
|  | MWAWPosition const & | pos )
| protected

try to send a basic picture to the listener

Referenced by sendFrame().

## ◆ sendTableUnformatted()

bool HanMacWrdJGraph::sendTableUnformatted | ( | long | zId | ) |
| protected

try to send a table unformatted

## ◆ sendText()

bool HanMacWrdJGraph::sendText | ( | long | textId,
|  | long | fPos,
|  | MWAWListenerPtr const & | listener = MWAWListenerPtr() )
| protected

ask main parser to send a text zone

## ◆ sendTextbox()

bool HanMacWrdJGraph::sendTextbox | ( | HanMacWrdJGraphInternal::TextboxFrame const & | textbox,
|  | MWAWPosition const & | pos )
| protected

try to send a textbox to the listener

Referenced by sendFrame().

## ◆ version()

int HanMacWrdJGraph::version | ( |  | ) | const

returns the file version

## Friends And Related Symbol Documentation

## ◆ HanMacWrdJGraphInternal::SubDocument

friend class HanMacWrdJGraphInternal::SubDocument
| friend

## ◆ HanMacWrdJGraphInternal::Table

friend struct HanMacWrdJGraphInternal::Table
| friend

## ◆ HanMacWrdJParser

friend class HanMacWrdJParser
| friend

Referenced by HanMacWrdJGraph(), HanMacWrdJGraphInternal::SubDocument, and HanMacWrdJParser.

## Member Data Documentation

## ◆ m_mainParser

HanMacWrdJParser* HanMacWrdJGraph::m_mainParser
| protected

the main parser;

Referenced by canCreateGraphic(), HanMacWrdJGraph(), readFrames(), readGraphData(), readGroupData(), readTable(), readTableFormatsList(), sendFrame(), sendGroupChild(), and sendText().

## ◆ m_parserState

MWAWParserStatePtr HanMacWrdJGraph::m_parserState
| protected

the parser state

Referenced by flushExtra(), HanMacWrdJGraph(), readCommentData(), readFrame(), readFrames(), readGraphData(), readGroupData(), readPicture(), readPictureData(), readShapeGraph(), readTable(), readTableData(), readTableFormatsList(), readTextboxData(), readTextData(), sendComment(), sendEmptyPicture(), sendFrame(), sendFrame(), sendGroup(), sendGroup(), sendGroupChild(), sendPageGraphics(), sendPictureFrame(), sendShapeGraph(), sendTableUnformatted(), sendTextbox(), and version().

## ◆ m_state

std::shared_ptr<HanMacWrdJGraphInternal::State> HanMacWrdJGraph::m_state
| protected

the state

Referenced by canCreateGraphic(), checkGroupStructures(), flushExtra(), getColor(), getFootnoteInformations(), getTextFrameInformations(), HanMacWrdJGraph(), numPages(), prepareStructures(), readFrames(), readGraphData(), readGroupData(), readPicture(), readTable(), readTableFormatsList(), sendComment(), sendFrame(), sendFrame(), sendGroup(), sendGroup(), sendGroupChild(), sendPageGraphics(), sendShapeGraph(), sendTableUnformatted(), and sendTextbox().

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

- HanMacWrdJGraph.hxx
- HanMacWrdJGraph.cxx