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

the main class to read the graphic part of Claris Works file More...

`#include <ClarisWksGraph.hxx>`

## Public Member Functions
| ClarisWksGraph (ClarisWksDocument &document)
| constructor More...
virtual | ~ClarisWksGraph ()
| destructor More...
int | version () const
| returns the file version More...
int | numPages () const
| returns the number of pages More...
bool | getPageDimension (MWAWVec2f &dim) const
| returns the page dimension if known (in point) More...
void | computePositions () const
| compute the pages position More...
void | findMasterPage () const
| find the master zone to the content zones in a graphic document More...
shared_ptr< ClarisWksStruct::DSET > | readGroupZone (ClarisWksStruct::DSET const &zone, MWAWEntry const &entry, bool &complete)
| reads the zone Group DSET More...
shared_ptr< ClarisWksStruct::DSET > | readBitmapZone (ClarisWksStruct::DSET const &zone, MWAWEntry const &entry, bool &complete)
| reads the zone Bitmap DSET More...
bool | getSurfaceColor (ClarisWksGraphInternal::Style const &style, MWAWColor &col) const
| return the surface color which corresponds to some ids (if possible) More...

## Protected Member Functions
bool | canSendGroupAsGraphic (int number) const
| check if we can send a group as graphic More...
bool | sendPageGraphics (int groupId)
| sends the page element More...
bool | sendMaster (int pg)
| sends the master zone (ie. the background zone in a graphic document) More...
bool | sendGroup (int number, MWAWListenerPtr listener, MWAWPosition const &pos=MWAWPosition())
| sends the zone data to the listener (if it exists ) More...
bool | canSendBitmapAsGraphic (int number) const
| check if we can send a group as graphic More...
bool | sendBitmap (int number, MWAWListenerPtr listener, MWAWPosition const &pos=MWAWPosition())
| sends the bitmap data to the listener (if it exists ) More...
void | flushExtra ()
| sends the data which have not yet been sent to the listener More...
void | askToSend (int number, MWAWListenerPtr listener, MWAWPosition const &pos=MWAWPosition())
| ask the main parser to send a zone More...
void | updateGroup (ClarisWksGraphInternal::Group &group) const
| update the group information to choose how to send the group data More...
bool | canSendAsGraphic (ClarisWksGraphInternal::Group &group) const
| check if we can send a group as graphic More...
bool | sendGroup (ClarisWksGraphInternal::Group &group, MWAWPosition const &position)
| send a group More...
bool | sendGroupChild (std::vector< shared_ptr< ClarisWksGraphInternal::Zone > > const &lChild, MWAWListenerPtr listener, MWAWVec2f const &leftTop)
| send a child group as graphic or as presentation More...
bool | sendGroupChild (shared_ptr< ClarisWksGraphInternal::Zone > zone, MWAWPosition position)
| send a group child More...
bool | sendPageChild (ClarisWksGraphInternal::Group &group)
| send the child element corresponding to some page More...
shared_ptr< ClarisWksGraphInternal::Zone > | readGroupDef (MWAWEntry const &entry)
bool | readGroupData (ClarisWksGraphInternal::Group &group, long beginGroupPos)
bool | readShape (MWAWEntry const &entry, ClarisWksGraphInternal::ZoneShape &zone)
bool | readChartData (shared_ptr< ClarisWksGraphInternal::Zone > zone)
bool | readPictData (shared_ptr< ClarisWksGraphInternal::Zone > zone)
bool | readPolygonData (shared_ptr< ClarisWksGraphInternal::Zone > zone)
bool | readPICT (ClarisWksGraphInternal::ZonePict &zone)
bool | readPS (ClarisWksGraphInternal::ZonePict &zone)
bool | readOLE (ClarisWksGraphInternal::ZonePict &zone)
bool | readQTimeData (shared_ptr< ClarisWksGraphInternal::Zone > zone)
bool | readNamedPict (ClarisWksGraphInternal::ZonePict &zone)
bool | readBitmapColorMap (std::vector< MWAWColor > &cMap)
bool | readBitmapData (ClarisWksGraphInternal::Bitmap &zone)
bool | readGroupHeader (ClarisWksGraphInternal::Group &group)
bool | readGroupUnknown (ClarisWksGraphInternal::Group &group, int zoneSz, int id)
bool | sendPicture (ClarisWksGraphInternal::ZonePict &pict, MWAWPosition pos)
| sends a picture zone More...
bool | sendShape (ClarisWksGraphInternal::ZoneShape &pict, MWAWPosition pos)
| sends a basic graphic zone More...
bool | sendBitmap (ClarisWksGraphInternal::Bitmap &pict, MWAWListener &listener, MWAWPosition pos)
| sends a bitmap graphic zone More...

## Protected Attributes
ClarisWksDocument & | m_document
| the document More...
MWAWParserStatePtr | m_parserState
| the parser state More...
shared_ptr< ClarisWksGraphInternal::State > | m_state
| the state More...
MWAWParser * | m_mainParser
| the main parser; More...

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

## Friends
class | ClarisWksGraphInternal::SubDocument
class | ClarisWksDocument
class | ClarisWksParser

## Detailed Description

the main class to read the graphic part of Claris Works file

## Constructor & Destructor Documentation

## ◆ ClarisWksGraph() [1/2]

ClarisWksGraph::ClarisWksGraph | ( | ClarisWksDocument & | document | ) |
| explicit

constructor

## ◆ ~ClarisWksGraph()

ClarisWksGraph::~ClarisWksGraph | ( |  | ) |
| virtual

destructor

## ◆ ClarisWksGraph() [2/2]

ClarisWksGraph::ClarisWksGraph | ( | ClarisWksGraph const & | orig | ) |
| private

## Member Function Documentation

## ◆ askToSend()

void ClarisWksGraph::askToSend | ( | int | number,
|  | MWAWListenerPtr | listener,
|  | MWAWPosition const & | pos = `MWAWPosition()`
| ) |  |
| protected

ask the main parser to send a zone

## ◆ canSendAsGraphic()

bool ClarisWksGraph::canSendAsGraphic | ( | ClarisWksGraphInternal::Group & | group | ) | const
| protected

check if we can send a group as graphic

Referenced by canSendGroupAsGraphic(), and sendGroup().

## ◆ canSendBitmapAsGraphic()

bool ClarisWksGraph::canSendBitmapAsGraphic | ( | int | number | ) | const
| protected

check if we can send a group as graphic

## ◆ canSendGroupAsGraphic()

bool ClarisWksGraph::canSendGroupAsGraphic | ( | int | number | ) | const
| protected

check if we can send a group as graphic

Referenced by sendGroupChild().

## ◆ computePositions()

void ClarisWksGraph::computePositions | ( |  | ) | const

compute the pages position

Referenced by numPages().

## ◆ findMasterPage()

void ClarisWksGraph::findMasterPage | ( |  | ) | const

find the master zone to the content zones in a graphic document

## ◆ flushExtra()

void ClarisWksGraph::flushExtra | ( |  | ) |
| protected

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

## ◆ getPageDimension()

bool ClarisWksGraph::getPageDimension | ( | MWAWVec2f & | dim | ) | const

returns the page dimension if known (in point)

## ◆ getSurfaceColor()

bool ClarisWksGraph::getSurfaceColor | ( | ClarisWksGraphInternal::Style const & | style,
|  | MWAWColor & | col
| ) |  | const

return the surface color which corresponds to some ids (if possible)

Referenced by sendGroupChild().

## ◆ numPages()

int ClarisWksGraph::numPages | ( |  | ) | const

returns the number of pages

## ◆ operator=()

ClarisWksGraph& ClarisWksGraph::operator= | ( | ClarisWksGraph const & | orig | ) |
| private

## ◆ readBitmapColorMap()

bool ClarisWksGraph::readBitmapColorMap | ( | std::vector< MWAWColor > & | cMap | ) |
| protected

Referenced by readBitmapZone().

## ◆ readBitmapData()

bool ClarisWksGraph::readBitmapData | ( | ClarisWksGraphInternal::Bitmap & | zone | ) |
| protected

Referenced by readBitmapZone().

## ◆ readBitmapZone()

shared_ptr< ClarisWksStruct::DSET > ClarisWksGraph::readBitmapZone | ( | ClarisWksStruct::DSET const & | zone,
|  | MWAWEntry const & | entry,
|  | bool & | complete
| ) |  |

reads the zone Bitmap DSET

the end of this block is very simillar to a bitmapdef, excepted maybe the first integer ....

Referenced by readGroupZone().

## ◆ readChartData()

bool ClarisWksGraph::readChartData | ( | shared_ptr< ClarisWksGraphInternal::Zone > | zone | ) |
| protected

Referenced by readGroupData().

## ◆ readGroupData()

bool ClarisWksGraph::readGroupData | ( | ClarisWksGraphInternal::Group & | group,
|  | long | beginGroupPos
| ) |  |
| protected

Referenced by readGroupZone().

## ◆ readGroupDef()

shared_ptr< ClarisWksGraphInternal::Zone > ClarisWksGraph::readGroupDef | ( | MWAWEntry const & | entry | ) |
| protected

Referenced by readGroupZone().

## ◆ readGroupHeader()

bool ClarisWksGraph::readGroupHeader | ( | ClarisWksGraphInternal::Group & | group | ) |
| protected

not frequent but we can find a list of int16 as 00320060 00480060 0048ffe9 013a0173 01ba0173 01ea02a0 01f8ffe7 02080295 020c012c 02140218 02ae01c1 02ca02c9-02cc02c6-02400000 03f801e6 8002e3ff e0010000 ee02e6ff

Referenced by readGroupData().

## ◆ readGroupUnknown()

bool ClarisWksGraph::readGroupUnknown | ( | ClarisWksGraphInternal::Group & | group,
|  | int | zoneSz,
|  | int | id
| ) |  |
| protected

find f1=8|9|f|14|15|2a|40|73|e9, f2=0|d4, f5=0|80, f6=0|33

Referenced by readGroupHeader(), and readGroupZone().

## ◆ readGroupZone()

shared_ptr< ClarisWksStruct::DSET > ClarisWksGraph::readGroupZone | ( | ClarisWksStruct::DSET const & | zone,
|  | MWAWEntry const & | entry,
|  | bool & | complete
| ) |  |

reads the zone Group DSET

Referenced by getSurfaceColor().

## ◆ readNamedPict()

bool ClarisWksGraph::readNamedPict | ( | ClarisWksGraphInternal::ZonePict & | zone | ) |
| protected

Referenced by readQTimeData().

## ◆ readOLE()

bool ClarisWksGraph::readOLE | ( | ClarisWksGraphInternal::ZonePict & | zone | ) |
| protected

Referenced by readPictData().

## ◆ readPICT()

bool ClarisWksGraph::readPICT | ( | ClarisWksGraphInternal::ZonePict & | zone | ) |
| protected

Referenced by readPictData().

## ◆ readPictData()

bool ClarisWksGraph::readPictData | ( | shared_ptr< ClarisWksGraphInternal::Zone > | zone | ) |
| protected

Referenced by readGroupData().

## ◆ readPolygonData()

bool ClarisWksGraph::readPolygonData | ( | shared_ptr< ClarisWksGraphInternal::Zone > | zone | ) |
| protected

Referenced by readGroupData().

## ◆ readPS()

bool ClarisWksGraph::readPS | ( | ClarisWksGraphInternal::ZonePict & | zone | ) |
| protected

Referenced by readPictData().

## ◆ readQTimeData()

bool ClarisWksGraph::readQTimeData | ( | shared_ptr< ClarisWksGraphInternal::Zone > | zone | ) |
| protected

Referenced by readGroupData().

## ◆ readShape()

bool ClarisWksGraph::readShape | ( | MWAWEntry const & | entry,
|  | ClarisWksGraphInternal::ZoneShape & | zone
| ) |  |
| protected

Referenced by readGroupDef().

## ◆ sendBitmap() [1/2]

bool ClarisWksGraph::sendBitmap | ( | int | number,
|  | MWAWListenerPtr | listener,
|  | MWAWPosition const & | pos = `MWAWPosition()`
| ) |  |
| protected

sends the bitmap data to the listener (if it exists )

Referenced by sendGroupChild().

## ◆ sendBitmap() [2/2]

bool ClarisWksGraph::sendBitmap | ( | ClarisWksGraphInternal::Bitmap & | pict,
|  | MWAWListener & | listener,
|  | MWAWPosition | pos
| ) |  |
| protected

sends a bitmap graphic zone

let go

## ◆ sendGroup() [1/2]

bool ClarisWksGraph::sendGroup | ( | int | number,
|  | MWAWListenerPtr | listener,
|  | MWAWPosition const & | pos = `MWAWPosition()`
| ) |  |
| protected

sends the zone data to the listener (if it exists )

Referenced by flushExtra(), and sendGroupChild().

## ◆ sendGroup() [2/2]

bool ClarisWksGraph::sendGroup | ( | ClarisWksGraphInternal::Group & | group,
|  | MWAWPosition const & | position
| ) |  |
| protected

send a group

## ◆ sendGroupChild() [1/2]

bool ClarisWksGraph::sendGroupChild | ( | std::vector< shared_ptr< ClarisWksGraphInternal::Zone > > const & | lChild,
|  | MWAWListenerPtr | listener,
|  | MWAWVec2f const & | leftTop
| ) |  |
| protected

send a child group as graphic or as presentation

Referenced by sendGroup(), and sendPageChild().

## ◆ sendGroupChild() [2/2]

bool ClarisWksGraph::sendGroupChild | ( | shared_ptr< ClarisWksGraphInternal::Zone > | zone,
|  | MWAWPosition | position
| ) |  |
| protected

send a group child

## ◆ sendMaster()

bool ClarisWksGraph::sendMaster | ( | int | pg | ) |
| protected

sends the master zone (ie. the background zone in a graphic document)

## ◆ sendPageChild()

bool ClarisWksGraph::sendPageChild | ( | ClarisWksGraphInternal::Group & | group | ) |
| protected

send the child element corresponding to some page

Referenced by sendMaster(), and sendPageGraphics().

## ◆ sendPageGraphics()

bool ClarisWksGraph::sendPageGraphics | ( | int | groupId | ) |
| protected

sends the page element

## ◆ sendPicture()

bool ClarisWksGraph::sendPicture | ( | ClarisWksGraphInternal::ZonePict & | pict,
|  | MWAWPosition | pos
| ) |  |
| protected

sends a picture zone

Referenced by sendGroupChild().

## ◆ sendShape()

bool ClarisWksGraph::sendShape | ( | ClarisWksGraphInternal::ZoneShape & | pict,
|  | MWAWPosition | pos
| ) |  |
| protected

sends a basic graphic zone

Referenced by sendGroupChild().

## ◆ updateGroup()

void ClarisWksGraph::updateGroup | ( | ClarisWksGraphInternal::Group & | group | ) | const
| protected

update the group information to choose how to send the group data

Referenced by canSendAsGraphic(), computePositions(), sendGroup(), and sendPageChild().

## ◆ version()

int ClarisWksGraph::version | ( |  | ) | const

returns the file version

Referenced by findMasterPage(), readBitmapZone(), readChartData(), readGroupData(), readGroupDef(), and readShape().

## Friends And Related Function Documentation

## ◆ ClarisWksDocument

friend class ClarisWksDocument
| friend

## ◆ ClarisWksGraphInternal::SubDocument

friend class ClarisWksGraphInternal::SubDocument
| friend

## ◆ ClarisWksParser

friend class ClarisWksParser
| friend

## Member Data Documentation

## ◆ m_document

ClarisWksDocument& ClarisWksGraph::m_document
| protected

the document

Referenced by askToSend(), canSendAsGraphic(), findMasterPage(), readChartData(), readGroupDef(), readGroupUnknown(), sendGroup(), sendGroupChild(), sendMaster(), sendPageChild(), and updateGroup().

## ◆ m_mainParser

MWAWParser* ClarisWksGraph::m_mainParser
| protected

the main parser;

Referenced by sendBitmap(), and sendGroup().

## ◆ m_parserState

MWAWParserStatePtr ClarisWksGraph::m_parserState
| protected

the parser state

Referenced by canSendAsGraphic(), canSendBitmapAsGraphic(), findMasterPage(), flushExtra(), readBitmapColorMap(), readBitmapData(), readBitmapZone(), readChartData(), readGroupData(), readGroupDef(), readGroupHeader(), readGroupUnknown(), readGroupZone(), readNamedPict(), readOLE(), readPICT(), readPictData(), readPolygonData(), readPS(), readQTimeData(), readShape(), sendBitmap(), sendGroup(), sendGroupChild(), sendMaster(), sendPageChild(), sendPicture(), sendShape(), and version().

## ◆ m_state

shared_ptr<ClarisWksGraphInternal::State> ClarisWksGraph::m_state
| protected

the state

Referenced by canSendBitmapAsGraphic(), canSendGroupAsGraphic(), computePositions(), findMasterPage(), flushExtra(), getPageDimension(), numPages(), readBitmapZone(), readGroupZone(), sendBitmap(), sendGroup(), sendMaster(), sendPageChild(), sendPageGraphics(), and updateGroup().

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

- ClarisWksGraph.hxx
- ClarisWksGraph.cxx