ClarisDrawGraph Class Reference documentation

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

the main class to read the graphic part of ClarisDraw file More...

`#include <ClarisDrawGraph.hxx>`

## Public Member Functions
| ClarisDrawGraph (ClarisDrawParser &parser)
| constructor More...
virtual | ~ClarisDrawGraph ()
| destructor More...
int | version () const
| returns the file version More...
void | resetState ()
| resets the current state More...
int | numPages () const
| returns the number of pages More...
std::shared_ptr< ClarisWksStruct::DSET > | readGroupZone (ClarisWksStruct::DSET const &zone, MWAWEntry const &entry, bool isLibHeader=false)
| reads the zone Group DSET More...
std::shared_ptr< ClarisWksStruct::DSET > | readBitmapZone (ClarisWksStruct::DSET const &zone, MWAWEntry const &entry)
| reads the zone Bitmap DSET More...
bool | readTransformations ()
| read the transformations More...
void | updateGroup (bool isLibrary)
| update the group: ie. remove empty group child More...
bool | isEmptyGroup (int gId) const
| returns true if a group does not exist or is empty More...
bool | getSurfaceColor (ClarisDrawGraphInternal::Style const &style, MWAWColor &col) const
| return the surface color which corresponds to some ids (if possible) More...

## Protected Member Functions
bool | sendBitmap (int number, MWAWPosition const &pos=MWAWPosition())
| sends the bitmap data to the listener (if it exists ) More...
bool | sendGroup (int number, MWAWPosition const &pos=MWAWPosition())
| sends the zone data to the listener (if it exists ) More...
bool | sendMainGroupChild (int childId, MWAWPosition const &pos=MWAWPosition())
| sends the ith child of the root (if it exists ) More...
void | flushExtra ()
| sends the data which have not yet been sent to the listener More...
bool | sendTextZone (int number, int subZone=-1)
| sends a text box content (via the main parser ) More...
std::shared_ptr< ClarisDrawGraphInternal::Zone > | readGroupDef (MWAWEntry const &entry)
bool | readGroupData (ClarisDrawGraphInternal::Group &group, long beginGroupPos, bool isLibHeader)
bool | readShape (MWAWEntry const &entry, ClarisDrawGraphInternal::ZoneShape &zone)
bool | readPolygonData (std::shared_ptr< ClarisDrawGraphInternal::Zone > zone)
bool | readBitmapColorMap (std::vector< MWAWColor > &cMap)
bool | readBitmapData (ClarisDrawGraphInternal::Bitmap &zone)
bool | readGroupHeader (ClarisDrawGraphInternal::Group &group)
bool | readGroupUnknown (ClarisDrawGraphInternal::Group &group, int zoneSz, int id)
bool | sendShape (ClarisDrawGraphInternal::ZoneShape &pict, MWAWPosition pos)
| sends a basic graphic zone More...
bool | sendBitmap (ClarisDrawGraphInternal::Bitmap &pict, MWAWPosition pos)
| sends a bitmap graphic zone More...

## Protected Attributes
MWAWParserStatePtr | m_parserState
| the parser state More...
std::shared_ptr< ClarisDrawGraphInternal::State > | m_state
| the state More...
ClarisDrawParser * | m_mainParser
| the main parser; More...
std::shared_ptr< ClarisDrawStyleManager > | m_styleManager
| the style manager More...

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

## Friends
class | ClarisDrawGraphInternal::SubDocument
class | ClarisDrawParser
class | ClarisWksParser

## Detailed Description

the main class to read the graphic part of ClarisDraw file

## Constructor & Destructor Documentation

## ◆ ClarisDrawGraph() [1/2]

ClarisDrawGraph::ClarisDrawGraph | ( | ClarisDrawParser & | parser | ) |
| explicit

constructor

## ◆ ~ClarisDrawGraph()

ClarisDrawGraph::~ClarisDrawGraph | ( |  | ) |
| virtual

destructor

## ◆ ClarisDrawGraph() [2/2]

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

## Member Function Documentation

## ◆ flushExtra()

void ClarisDrawGraph::flushExtra | ( |  | ) |
| protected

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

## ◆ getSurfaceColor()

bool ClarisDrawGraph::getSurfaceColor | ( | ClarisDrawGraphInternal::Style const & | style,
|  | MWAWColor & | col
| ) |  | const

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

## ◆ isEmptyGroup()

bool ClarisDrawGraph::isEmptyGroup | ( | int | gId | ) | const

returns true if a group does not exist or is empty

## ◆ numPages()

int ClarisDrawGraph::numPages | ( |  | ) | const

returns the number of pages

## ◆ operator=()

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

## ◆ readBitmapColorMap()

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

Referenced by readBitmapZone().

## ◆ readBitmapData()

bool ClarisDrawGraph::readBitmapData | ( | ClarisDrawGraphInternal::Bitmap & | zone | ) |
| protected

Referenced by readBitmapZone().

## ◆ readBitmapZone()

std::shared_ptr< ClarisWksStruct::DSET > ClarisDrawGraph::readBitmapZone | ( | ClarisWksStruct::DSET const & | zone,
|  | MWAWEntry const & | entry
| ) |  |

reads the zone Bitmap DSET

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

## ◆ readGroupData()

bool ClarisDrawGraph::readGroupData | ( | ClarisDrawGraphInternal::Group & | group,
|  | long | beginGroupPos,
|  | bool | isLibHeader
| ) |  |
| protected

Referenced by readGroupZone().

## ◆ readGroupDef()

std::shared_ptr< ClarisDrawGraphInternal::Zone > ClarisDrawGraph::readGroupDef | ( | MWAWEntry const & | entry | ) |
| protected

Referenced by readGroupZone().

## ◆ readGroupHeader()

bool ClarisDrawGraph::readGroupHeader | ( | ClarisDrawGraphInternal::Group & | group | ) |
| protected

Referenced by readGroupData().

## ◆ readGroupUnknown()

bool ClarisDrawGraph::readGroupUnknown | ( | ClarisDrawGraphInternal::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()

std::shared_ptr< ClarisWksStruct::DSET > ClarisDrawGraph::readGroupZone | ( | ClarisWksStruct::DSET const & | zone,
|  | MWAWEntry const & | entry,
|  | bool | isLibHeader = `false`
| ) |  |

reads the zone Group DSET

## ◆ readPolygonData()

bool ClarisDrawGraph::readPolygonData | ( | std::shared_ptr< ClarisDrawGraphInternal::Zone > | zone | ) |
| protected

Referenced by readGroupData().

## ◆ readShape()

bool ClarisDrawGraph::readShape | ( | MWAWEntry const & | entry,
|  | ClarisDrawGraphInternal::ZoneShape & | zone
| ) |  |
| protected

Referenced by readGroupDef().

## ◆ readTransformations()

bool ClarisDrawGraph::readTransformations | ( |  | ) |

read the transformations

## ◆ resetState()

void ClarisDrawGraph::resetState | ( |  | ) |

resets the current state

## ◆ sendBitmap() [1/2]

bool ClarisDrawGraph::sendBitmap | ( | ClarisDrawGraphInternal::Bitmap & | pict,
|  | MWAWPosition | pos
| ) |  |
| protected

sends a bitmap graphic zone

let go

## ◆ sendBitmap() [2/2]

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

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

Referenced by flushExtra(), sendBitmap(), sendGroup(), and sendMainGroupChild().

## ◆ sendGroup()

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

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

Referenced by flushExtra(), sendGroup(), and sendMainGroupChild().

## ◆ sendMainGroupChild()

bool ClarisDrawGraph::sendMainGroupChild | ( | int | childId,
|  | MWAWPosition const & | pos = `MWAWPosition()`
| ) |  |
| protected

sends the ith child of the root (if it exists )

## ◆ sendShape()

bool ClarisDrawGraph::sendShape | ( | ClarisDrawGraphInternal::ZoneShape & | pict,
|  | MWAWPosition | pos
| ) |  |
| protected

sends a basic graphic zone

Referenced by sendGroup(), and sendMainGroupChild().

## ◆ sendTextZone()

bool ClarisDrawGraph::sendTextZone | ( | int | number,
|  | int | subZone = `-1`
| ) |  |
| protected

sends a text box content (via the main parser )

Referenced by ClarisDrawGraphInternal::SubDocument::parse().

## ◆ updateGroup()

void ClarisDrawGraph::updateGroup | ( | bool | isLibrary | ) |

update the group: ie. remove empty group child

## ◆ version()

int ClarisDrawGraph::version | ( |  | ) | const

returns the file version

## Friends And Related Function Documentation

## ◆ ClarisDrawGraphInternal::SubDocument

friend class ClarisDrawGraphInternal::SubDocument
| friend

## ◆ ClarisDrawParser

friend class ClarisDrawParser
| friend

## ◆ ClarisWksParser

friend class ClarisWksParser
| friend

## Member Data Documentation

## ◆ m_mainParser

ClarisDrawParser* ClarisDrawGraph::m_mainParser
| protected

the main parser;

Referenced by flushExtra(), sendBitmap(), sendGroup(), sendMainGroupChild(), sendShape(), sendTextZone(), and updateGroup().

## ◆ m_parserState

MWAWParserStatePtr ClarisDrawGraph::m_parserState
| protected

the parser state

Referenced by readBitmapColorMap(), readBitmapData(), readBitmapZone(), readGroupData(), readGroupDef(), readGroupHeader(), readGroupUnknown(), readGroupZone(), readPolygonData(), readShape(), readTransformations(), sendBitmap(), sendGroup(), sendMainGroupChild(), sendShape(), and version().

## ◆ m_state

std::shared_ptr<ClarisDrawGraphInternal::State> ClarisDrawGraph::m_state
| protected

the state

Referenced by flushExtra(), isEmptyGroup(), numPages(), readBitmapZone(), readGroupZone(), readShape(), readTransformations(), resetState(), sendBitmap(), sendGroup(), sendMainGroupChild(), and updateGroup().

## ◆ m_styleManager

std::shared_ptr<ClarisDrawStyleManager> ClarisDrawGraph::m_styleManager
| protected

the style manager

Referenced by readGroupDef(), and readShape().

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

- ClarisDrawGraph.hxx
- ClarisDrawGraph.cxx