HanMacWrdKGraph Class Reference documentation

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

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

`#include <HanMacWrdKGraph.hxx>`

## Public Member Functions
| HanMacWrdKGraph (HanMacWrdKParser &parser)
| constructor
virtual | ~HanMacWrdKGraph ()
| 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
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 (std::shared_ptr< HanMacWrdKZone > zone)
| try to read the frame definition (type 2)
bool | readPicture (std::shared_ptr< HanMacWrdKZone > zone)
| try to read a picture zone (type d)
void | prepareStructures ()
| check the group structures, the linked textbox
bool | sendFrame (long frameId, MWAWPosition const &pos)
| try to send a frame to the listener
bool | sendPicture (long pictId, MWAWPosition const &pos)
| try to send a picture to the listener
bool | sendText (long textId, long id, MWAWListenerPtr const &listener=MWAWListenerPtr())
| ask main parser to send a text zone
std::map< long, int > | getTextFrameInformations () const
| return a list textZId -> type which 3(footnote), 4(textbox), 9(table), 10(comment)
bool | checkGroupStructures (long fileId, long fileSubId, std::multimap< long, long > &seens, bool inGroup)
| check the graph structures: ie.
bool | sendPicture (HanMacWrdKGraphInternal::Picture const &picture, MWAWPosition const &pos)
| try to send a picture to the listener
bool | sendFrame (HanMacWrdKGraphInternal::Frame const &frame, MWAWPosition const &pos)
| try to send a frame to the listener
bool | sendShapeGraph (HanMacWrdKGraphInternal::ShapeGraph const &shape, MWAWPosition const &pos)
| try to send a basic picture to the listener
bool | sendPictureFrame (HanMacWrdKGraphInternal::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 (HanMacWrdKGraphInternal::TextBox const &textbox, MWAWPosition const &pos)
| try to send a textbox to the listener
bool | sendTableUnformatted (long fId)
| try to send a table unformatted
bool | sendGroup (long fId, MWAWPosition const &pos)
| try to send a group to the listener
bool | sendGroup (HanMacWrdKGraphInternal::Group const &group, MWAWPosition const &pos)
| try to send a group to the listener
bool | canCreateGraphic (HanMacWrdKGraphInternal::Group const &group)
| check if we can send a group as graphic
void | sendGroupChild (HanMacWrdKGraphInternal::Group const &group, MWAWPosition const &pos)
| try to send a group elements by elements
void | sendGroup (HanMacWrdKGraphInternal::Group const &group, MWAWGraphicListenerPtr &listener)
| send the group as a graphic zone
std::shared_ptr< HanMacWrdKGraphInternal::ShapeGraph > | readShapeGraph (std::shared_ptr< HanMacWrdKZone > zone, HanMacWrdKGraphInternal::Frame const &header)
| try to read the basic graph data
std::shared_ptr< HanMacWrdKGraphInternal::FootnoteFrame > | readFootnoteFrame (std::shared_ptr< HanMacWrdKZone > zone, HanMacWrdKGraphInternal::Frame const &header)
| try to read the footnote data
std::shared_ptr< HanMacWrdKGraphInternal::Group > | readGroup (std::shared_ptr< HanMacWrdKZone > zone, HanMacWrdKGraphInternal::Frame const &header)
| try to read the group data
std::shared_ptr< HanMacWrdKGraphInternal::PictureFrame > | readPictureFrame (std::shared_ptr< HanMacWrdKZone > zone, HanMacWrdKGraphInternal::Frame const &header)
| try to read the picture data
std::shared_ptr< HanMacWrdKGraphInternal::Table > | readTable (std::shared_ptr< HanMacWrdKZone > zone, HanMacWrdKGraphInternal::Frame const &header)
| try to read the table data
std::shared_ptr< HanMacWrdKGraphInternal::TextBox > | readTextBox (std::shared_ptr< HanMacWrdKZone > zone, HanMacWrdKGraphInternal::Frame const &header, bool isMemo)
| try to read the textbox data

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

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

## Friends
class | HanMacWrdKParser
class | HanMacWrdKGraphInternal::SubDocument
struct | HanMacWrdKGraphInternal::Table

## Detailed Description

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

## Constructor & Destructor Documentation

## ◆ HanMacWrdKGraph() [1/2]

HanMacWrdKGraph::HanMacWrdKGraph | ( | HanMacWrdKParser & | parser | ) |
| explicit

constructor

## ◆ ~HanMacWrdKGraph()

HanMacWrdKGraph::~HanMacWrdKGraph | ( |  | ) |
| virtual

destructor

## ◆ HanMacWrdKGraph() [2/2]

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

## Member Function Documentation

## ◆ canCreateGraphic()

bool HanMacWrdKGraph::canCreateGraphic | ( | HanMacWrdKGraphInternal::Group const & | group | ) |
| protected

check if we can send a group as graphic

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

## ◆ checkGroupStructures()

bool HanMacWrdKGraph::checkGroupStructures | ( | long | fileId,
|  | long | fileSubId,
|  | std::multimap< long, long > & | seens,
|  | bool | inGroup
| ) |  |
| protected

check the graph structures: ie.

the group children

Referenced by checkGroupStructures(), and prepareStructures().

## ◆ flushExtra()

void HanMacWrdKGraph::flushExtra | ( |  | ) |
| protected

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

## ◆ getColor()

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

returns the color associated with a pattern

## ◆ getTextFrameInformations()

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

return a list textZId -> type which 3(footnote), 4(textbox), 9(table), 10(comment)

## ◆ numPages()

int HanMacWrdKGraph::numPages | ( |  | ) | const

returns the number of pages

## ◆ operator=()

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

## ◆ prepareStructures()

void HanMacWrdKGraph::prepareStructures | ( |  | ) |
| protected

check the group structures, the linked textbox

## ◆ readFootnoteFrame()

std::shared_ptr< HanMacWrdKGraphInternal::FootnoteFrame > HanMacWrdKGraph::readFootnoteFrame | ( | std::shared_ptr< HanMacWrdKZone > | zone,
|  | HanMacWrdKGraphInternal::Frame const & | header
| ) |  |
| protected

try to read the footnote data

Referenced by readFrames().

## ◆ readFrames()

bool HanMacWrdKGraph::readFrames | ( | std::shared_ptr< HanMacWrdKZone > | zone | ) |
| protected

try to read the frame definition (type 2)

## ◆ readGroup()

std::shared_ptr< HanMacWrdKGraphInternal::Group > HanMacWrdKGraph::readGroup | ( | std::shared_ptr< HanMacWrdKZone > | zone,
|  | HanMacWrdKGraphInternal::Frame const & | header
| ) |  |
| protected

try to read the group data

Referenced by readFrames().

## ◆ readPicture()

bool HanMacWrdKGraph::readPicture | ( | std::shared_ptr< HanMacWrdKZone > | zone | ) |
| protected

try to read a picture zone (type d)

## ◆ readPictureFrame()

std::shared_ptr< HanMacWrdKGraphInternal::PictureFrame > HanMacWrdKGraph::readPictureFrame | ( | std::shared_ptr< HanMacWrdKZone > | zone,
|  | HanMacWrdKGraphInternal::Frame const & | header
| ) |  |
| protected

try to read the picture data

Referenced by readFrames().

## ◆ readShapeGraph()

std::shared_ptr< HanMacWrdKGraphInternal::ShapeGraph > HanMacWrdKGraph::readShapeGraph | ( | std::shared_ptr< HanMacWrdKZone > | zone,
|  | HanMacWrdKGraphInternal::Frame const & | header
| ) |  |
| protected

try to read the basic graph data

Referenced by readFrames().

## ◆ readTable()

std::shared_ptr< HanMacWrdKGraphInternal::Table > HanMacWrdKGraph::readTable | ( | std::shared_ptr< HanMacWrdKZone > | zone,
|  | HanMacWrdKGraphInternal::Frame const & | header
| ) |  |
| protected

try to read the table data

Referenced by readFrames().

## ◆ readTextBox()

std::shared_ptr< HanMacWrdKGraphInternal::TextBox > HanMacWrdKGraph::readTextBox | ( | std::shared_ptr< HanMacWrdKZone > | zone,
|  | HanMacWrdKGraphInternal::Frame const & | header,
|  | bool | isMemo
| ) |  |
| protected

try to read the textbox data

Referenced by readFrames().

## ◆ sendEmptyPicture()

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

try to send an empty picture

## ◆ sendFrame() [1/2]

bool HanMacWrdKGraph::sendFrame | ( | HanMacWrdKGraphInternal::Frame const & | frame,
|  | MWAWPosition const & | pos
| ) |  |
| protected

try to send a frame to the listener

## ◆ sendFrame() [2/2]

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

try to send a frame to the listener

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

## ◆ sendGroup() [1/3]

void HanMacWrdKGraph::sendGroup | ( | HanMacWrdKGraphInternal::Group const & | group,
|  | MWAWGraphicListenerPtr & | listener
| ) |  |
| protected

send the group as a graphic zone

## ◆ sendGroup() [2/3]

bool HanMacWrdKGraph::sendGroup | ( | HanMacWrdKGraphInternal::Group const & | group,
|  | MWAWPosition const & | pos
| ) |  |
| protected

try to send a group to the listener

## ◆ sendGroup() [3/3]

bool HanMacWrdKGraph::sendGroup | ( | long | fId,
|  | MWAWPosition const & | pos
| ) |  |
| protected

try to send a group to the listener

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

## ◆ sendGroupChild()

void HanMacWrdKGraph::sendGroupChild | ( | HanMacWrdKGraphInternal::Group const & | group,
|  | MWAWPosition const & | pos
| ) |  |
| protected

try to send a group elements by elements

Referenced by sendGroup().

## ◆ sendPageGraphics()

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

try to send the page graphic

## ◆ sendPicture() [1/2]

bool HanMacWrdKGraph::sendPicture | ( | HanMacWrdKGraphInternal::Picture const & | picture,
|  | MWAWPosition const & | pos
| ) |  |
| protected

try to send a picture to the listener

## ◆ sendPicture() [2/2]

bool HanMacWrdKGraph::sendPicture | ( | long | pictId,
|  | MWAWPosition const & | pos
| ) |  |
| protected

try to send a picture to the listener

Referenced by flushExtra(), sendPicture(), and sendPictureFrame().

## ◆ sendPictureFrame()

bool HanMacWrdKGraph::sendPictureFrame | ( | HanMacWrdKGraphInternal::PictureFrame const & | pict,
|  | MWAWPosition const & | pos
| ) |  |
| protected

try to send a picture frame

Referenced by sendFrame().

## ◆ sendShapeGraph()

bool HanMacWrdKGraph::sendShapeGraph | ( | HanMacWrdKGraphInternal::ShapeGraph const & | shape,
|  | MWAWPosition const & | pos
| ) |  |
| protected

try to send a basic picture to the listener

Referenced by sendFrame().

## ◆ sendTableUnformatted()

bool HanMacWrdKGraph::sendTableUnformatted | ( | long | fId | ) |
| protected

try to send a table unformatted

## ◆ sendText()

bool HanMacWrdKGraph::sendText | ( | long | textId,
|  | long | id,
|  | MWAWListenerPtr const & | listener = `MWAWListenerPtr()`
| ) |  |
| protected

ask main parser to send a text zone

Referenced by HanMacWrdKGraphInternal::Table::sendText().

## ◆ sendTextBox()

bool HanMacWrdKGraph::sendTextBox | ( | HanMacWrdKGraphInternal::TextBox const & | textbox,
|  | MWAWPosition const & | pos
| ) |  |
| protected

try to send a textbox to the listener

Referenced by sendFrame().

## ◆ version()

int HanMacWrdKGraph::version | ( |  | ) | const

returns the file version

## Friends And Related Function Documentation

## ◆ HanMacWrdKGraphInternal::SubDocument

friend class HanMacWrdKGraphInternal::SubDocument
| friend

## ◆ HanMacWrdKGraphInternal::Table

friend struct HanMacWrdKGraphInternal::Table
| friend

## ◆ HanMacWrdKParser

friend class HanMacWrdKParser
| friend

## Member Data Documentation

## ◆ m_mainParser

HanMacWrdKParser* HanMacWrdKGraph::m_mainParser
| protected

the main parser;

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

## ◆ m_parserState

MWAWParserStatePtr HanMacWrdKGraph::m_parserState
| protected

the parser state

Referenced by sendEmptyPicture(), sendFrame(), sendGroup(), sendGroupChild(), sendPicture(), sendPictureFrame(), sendShapeGraph(), sendTableUnformatted(), sendTextBox(), and version().

## ◆ m_state

std::shared_ptr<HanMacWrdKGraphInternal::State> HanMacWrdKGraph::m_state
| protected

the state

Referenced by canCreateGraphic(), checkGroupStructures(), flushExtra(), getColor(), getTextFrameInformations(), numPages(), prepareStructures(), readFrames(), readPicture(), readTable(), sendFrame(), sendGroup(), sendGroupChild(), sendPageGraphics(), sendPicture(), and sendTableUnformatted().

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

- HanMacWrdKGraph.hxx
- HanMacWrdKGraph.cxx