LotusChart Class Reference

This class parses Microsoft Works chart file. More...

`#include <LotusChart.h>`

## Public Member Functions
| LotusChart (LotusParser &parser)
| constructor
void | cleanState ()
| clean internal state
void | updateState ()
| update internal state (must be called one time before sending data)
| ~LotusChart ()
| destructor
void | setListener (WKSContentListenerPtr &listen)
| sets the listener

## Protected Member Functions
int | version () const
| return the file version
int | getNumCharts () const
| return the number of chart
std::map< std::string, int > | getNameToChartIdMap () const
| returns a map chart name to chart id map
void | updateChart (LotusChartInternal::Chart &chart, int id)
| update a chart, so that it can be send
bool | sendCharts ()
| try to send the charts(for Windows .wk3 file)
bool | sendChart (int cId, WPSPosition const &pos, WPSGraphicStyle const &style)
| try to send a chart
bool | sendText (std::shared_ptr< WPSStream > stream, WPSEntry const &entry)
| try to send the text
bool | readChart (std::shared_ptr< WPSStream > stream)
| reads a structure which define a chart: 11
bool | readChartName (std::shared_ptr< WPSStream > stream)
| reads the chart name or title: 12
bool | readMacHeader (std::shared_ptr< WPSStream > stream, long endPos, int &chartId)
| reads a chart data: 2710 (wk3mac)
bool | readMacPlacement (std::shared_ptr< WPSStream > stream, long endPos)
| reads a placement position(wk3mac): 2774
bool | readMacLegend (std::shared_ptr< WPSStream > stream, long endPos)
| reads a legend position(wk3mac): 277e
bool | readMacPlotArea (std::shared_ptr< WPSStream > stream, long endPos)
| reads a plot area position(wk3mac): 2788
bool | readMacAxis (std::shared_ptr< WPSStream > stream, long endPos)
| reads an axis style(wk3mac): 27d8
bool | readMacSerie (std::shared_ptr< WPSStream > stream, long endPos)
| reads a serie style(wk3mac): 27e2
bool | readMacFloor (std::shared_ptr< WPSStream > stream, long endPos)
| reads a 3D floor style(wk3mac): 2846
bool | readMacPosition (std::shared_ptr< WPSStream > stream, long endPos)
| reads a manual position(wk3mac): 2904
bool | readPlotArea (std::shared_ptr< WPSStream > stream, long endPos)
| reads a plot area style: 2a30 (unsure)
bool | readSerie (std::shared_ptr< WPSStream > stream, long endPos)
| reads a serie style: 2a31
bool | readSerieName (std::shared_ptr< WPSStream > stream, long endPos)
| reads a serie name: 2a32 (serie 6-...)
bool | readFramesStyle (std::shared_ptr< WPSStream > stream, long endPos)
| reads a some frame styles: 2a35
bool | convert (LotusParser::Link const &link, WKSChart::Position(&positions)[2]) const
| convert a link zone in a chart position(if possible)

## Static Protected Member Functions
static bool | readSerieWidth (std::shared_ptr< WPSStream > stream, long endPos)
| reads a serie width style: 2a33
static bool | readFontsStyle (std::shared_ptr< WPSStream > stream, long endPos)
| reads a list of font style: 2a34

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

## Private Attributes
std::shared_ptr< WKSContentListener > | m_listener
LotusParser & | m_mainParser
| the listener (if set)
std::shared_ptr< LotusStyleManager > | m_styleManager
| the style manager
std::shared_ptr< LotusChartInternal::State > | m_state
| the internal state

## Friends
class | LotusParser
class | LotusChartInternal::Chart

## Detailed Description

This class parses Microsoft Works chart file.

## Constructor & Destructor Documentation

## ◆ LotusChart() [1/2]

LotusChart::LotusChart | ( | LotusParser & | parser | ) |
| explicit

constructor

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

## ◆ ~LotusChart()

LotusChart::~LotusChart | ( |  | ) |

destructor

## ◆ LotusChart() [2/2]

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

## Member Function Documentation

## ◆ cleanState()

void LotusChart::cleanState | ( |  | ) |

clean internal state

## ◆ convert()

bool LotusChart::convert | ( | LotusParser::Link const & | link,
|  | WKSChart::Position(&) | positions[2] ) const
| protected

convert a link zone in a chart position(if possible)

Referenced by updateChart().

## ◆ getNameToChartIdMap()

std::map< std::string, int > LotusChart::getNameToChartIdMap | ( |  | ) | const
| protected

returns a map chart name to chart id map

## ◆ getNumCharts()

int LotusChart::getNumCharts | ( |  | ) | const
| protected

return the number of chart

## ◆ operator=()

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

## ◆ readChart()

bool LotusChart::readChart | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

reads a structure which define a chart: 11

## ◆ readChartName()

bool LotusChart::readChartName | ( | std::shared_ptr< WPSStream > | stream | ) |
| protected

reads the chart name or title: 12

## ◆ readFontsStyle()

bool LotusChart::readFontsStyle | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| static protected

reads a list of font style: 2a34

## ◆ readFramesStyle()

bool LotusChart::readFramesStyle | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads a some frame styles: 2a35

## ◆ readMacAxis()

bool LotusChart::readMacAxis | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads an axis style(wk3mac): 27d8

## ◆ readMacFloor()

bool LotusChart::readMacFloor | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads a 3D floor style(wk3mac): 2846

## ◆ readMacHeader()

bool LotusChart::readMacHeader | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos,
|  | int & | chartId )
| protected

reads a chart data: 2710 (wk3mac)

## ◆ readMacLegend()

bool LotusChart::readMacLegend | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads a legend position(wk3mac): 277e

## ◆ readMacPlacement()

bool LotusChart::readMacPlacement | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads a placement position(wk3mac): 2774

## ◆ readMacPlotArea()

bool LotusChart::readMacPlotArea | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads a plot area position(wk3mac): 2788

## ◆ readMacPosition()

bool LotusChart::readMacPosition | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads a manual position(wk3mac): 2904

## ◆ readMacSerie()

bool LotusChart::readMacSerie | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads a serie style(wk3mac): 27e2

## ◆ readPlotArea()

bool LotusChart::readPlotArea | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads a plot area style: 2a30 (unsure)

## ◆ readSerie()

bool LotusChart::readSerie | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads a serie style: 2a31

## ◆ readSerieName()

bool LotusChart::readSerieName | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| protected

reads a serie name: 2a32 (serie 6-...)

## ◆ readSerieWidth()

bool LotusChart::readSerieWidth | ( | std::shared_ptr< WPSStream > | stream,
|  | long | endPos )
| static protected

reads a serie width style: 2a33

## ◆ sendChart()

bool LotusChart::sendChart | ( | int | cId,
|  | WPSPosition const & | pos,
|  | WPSGraphicStyle const & | style )
| protected

try to send a chart

Referenced by sendCharts().

## ◆ sendCharts()

bool LotusChart::sendCharts | ( |  | ) |
| protected

try to send the charts(for Windows .wk3 file)

## ◆ sendText()

bool LotusChart::sendText | ( | std::shared_ptr< WPSStream > | stream,
|  | WPSEntry const & | entry )
| protected

try to send the text

## ◆ setListener()

void LotusChart::setListener | ( | WKSContentListenerPtr & | listen | ) |
| inline

sets the listener

## ◆ updateChart()

void LotusChart::updateChart | ( | LotusChartInternal::Chart & | chart,
|  | int | id )
| protected

update a chart, so that it can be send

Referenced by updateState().

## ◆ updateState()

void LotusChart::updateState | ( |  | ) |

update internal state (must be called one time before sending data)

## ◆ version()

int LotusChart::version | ( |  | ) | const
| protected

return the file version

Referenced by readSerie(), updateChart(), and updateState().

## Friends And Related Symbol Documentation

## ◆ LotusChartInternal::Chart

friend class LotusChartInternal::Chart
| friend

## ◆ LotusParser

friend class LotusParser
| friend

Referenced by LotusChart(), LotusChartInternal::Chart, and LotusParser.

## Member Data Documentation

## ◆ m_listener

std::shared_ptr<WKSContentListener> LotusChart::m_listener
| private

Referenced by LotusChart(), sendChart(), sendCharts(), sendText(), and setListener().

## ◆ m_mainParser

LotusParser& LotusChart::m_mainParser
| private

the listener (if set)

the main parser

Referenced by convert(), LotusChart(), readChart(), readChartName(), readSerieName(), sendText(), updateChart(), and version().

## ◆ m_state

std::shared_ptr<LotusChartInternal::State> LotusChart::m_state
| private

the internal state

Referenced by cleanState(), getNameToChartIdMap(), getNumCharts(), LotusChart(), readChart(), readChartName(), readFramesStyle(), readMacAxis(), readMacFloor(), readMacHeader(), readMacLegend(), readMacPlacement(), readMacPlotArea(), readMacPosition(), readMacSerie(), readPlotArea(), readSerie(), readSerieName(), sendChart(), sendCharts(), updateState(), and version().

## ◆ m_styleManager

std::shared_ptr<LotusStyleManager> LotusChart::m_styleManager
| private

the style manager

Referenced by LotusChart(), readFramesStyle(), readMacFloor(), readMacPlotArea(), readMacSerie(), readSerie(), and updateChart().

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

- LotusChart.h
- LotusChart.cpp