WKS4Chart Class Reference documentation

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

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

`#include <WKS4Chart.h>`

## Public Member Functions
| WKS4Chart (WKS4Parser &parser)
| constructor
| ~WKS4Chart ()
| destructor
void | setListener (WKSContentListenerPtr &listen)
| sets the listener

## Protected Member Functions
bool | checkFilePosition (long pos)
| return true if the pos is in the file, update the file size if need
int | version () const
| return the file version
void | resetInput (RVNGInputStreamPtr const &input)
| reset the main input
int | getNumCharts () const
| return the number of chart
void | updateChart (WKS4ChartInternal::Chart &chart)
| update a chart, so that it can be send
bool | sendCharts ()
| try to send the charts
bool | sendText (WPSEntry const &entry)
| try to send the text
bool | readChart ()
| reads a structure which define a chart: 2d(default), 2e(name + value)
bool | readChartAxis ()
| reads the axis(or second yaxis) data: zone 0x14
bool | readChartSeries ()
| reads a list of series definition: zone 0x15
bool | readChartSeriesStyles ()
| reads the series style: zone 0x16
bool | readChartSeriesColorMap ()
| reads the chart's series color map: zone 0x31
bool | readChartName ()
| reads the chart name or title: 41
bool | readChartDim ()
| reads a structure which seems to define some dimension (only present in windows file): 35
bool | readChartFont ()
| reads a structure which seems to define two chart font (only present in windows file): 40
bool | readChart3D ()
| reads a structure which stores zfront, zfar: 44
bool | readChart2Font ()
| reads a structure which seems to define four chart font (only present in windows file): 84
bool | readChartLimit ()
| reads end/begin of chart (only present in windows file): 80,81

## Private Member Functions
| WKS4Chart (WKS4Chart const &orig)=delete
WKS4Chart & | operator= (WKS4Chart const &orig)=delete
libwps::DebugFile & | ascii ()
| returns the debug file

## Private Attributes
RVNGInputStreamPtr | m_input
| the input
std::shared_ptr< WKSContentListener > | m_listener
WKS4Parser & | m_mainParser
| the listener (if set)
std::shared_ptr< WKS4ChartInternal::State > | m_state
| the internal state
libwps::DebugFile & | m_asciiFile
| the ascii file

## Friends
class | WKS4Parser
class | WKS4ChartInternal::Chart

## Detailed Description

This class parses Microsoft Works chart file.

## Constructor & Destructor Documentation

## ◆ WKS4Chart() [1/2]

WKS4Chart::WKS4Chart | ( | WKS4Parser & | parser | ) |
| explicit

constructor

## ◆ ~WKS4Chart()

WKS4Chart::~WKS4Chart | ( |  | ) |

destructor

## ◆ WKS4Chart() [2/2]

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

## Member Function Documentation

## ◆ ascii()

libwps::DebugFile & WKS4Chart::ascii | ( |  | ) |
| inlineprivate

returns the debug file

Referenced by readChart(), readChart2Font(), readChart3D(), readChartAxis(), readChartDim(), readChartFont(), readChartLimit(), readChartName(), readChartSeries(), readChartSeriesColorMap(), and readChartSeriesStyles().

## ◆ checkFilePosition()

bool WKS4Chart::checkFilePosition | ( | long | pos | ) |
| protected

return true if the pos is in the file, update the file size if need

## ◆ getNumCharts()

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

return the number of chart

## ◆ operator=()

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

## ◆ readChart()

bool WKS4Chart::readChart | ( |  | ) |
| protected

reads a structure which define a chart: 2d(default), 2e(name + value)

## ◆ readChart2Font()

bool WKS4Chart::readChart2Font | ( |  | ) |
| protected

reads a structure which seems to define four chart font (only present in windows file): 84

## ◆ readChart3D()

bool WKS4Chart::readChart3D | ( |  | ) |
| protected

reads a structure which stores zfront, zfar: 44

## ◆ readChartAxis()

bool WKS4Chart::readChartAxis | ( |  | ) |
| protected

reads the axis(or second yaxis) data: zone 0x14

## ◆ readChartDim()

bool WKS4Chart::readChartDim | ( |  | ) |
| protected

reads a structure which seems to define some dimension (only present in windows file): 35

## ◆ readChartFont()

bool WKS4Chart::readChartFont | ( |  | ) |
| protected

reads a structure which seems to define two chart font (only present in windows file): 40

## ◆ readChartLimit()

bool WKS4Chart::readChartLimit | ( |  | ) |
| protected

reads end/begin of chart (only present in windows file): 80,81

## ◆ readChartName()

bool WKS4Chart::readChartName | ( |  | ) |
| protected

reads the chart name or title: 41

## ◆ readChartSeries()

bool WKS4Chart::readChartSeries | ( |  | ) |
| protected

reads a list of series definition: zone 0x15

## ◆ readChartSeriesColorMap()

bool WKS4Chart::readChartSeriesColorMap | ( |  | ) |
| protected

reads the chart's series color map: zone 0x31

## ◆ readChartSeriesStyles()

bool WKS4Chart::readChartSeriesStyles | ( |  | ) |
| protected

reads the series style: zone 0x16

## ◆ resetInput()

void WKS4Chart::resetInput | ( | RVNGInputStreamPtr const & | input | ) |
| protected

reset the main input

## ◆ sendCharts()

bool WKS4Chart::sendCharts | ( |  | ) |
| protected

try to send the charts

## ◆ sendText()

bool WKS4Chart::sendText | ( | WPSEntry const & | entry | ) |
| protected

try to send the text

Referenced by WKS4ChartInternal::Chart::sendContent().

## ◆ setListener()

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

sets the listener

## ◆ updateChart()

void WKS4Chart::updateChart | ( | WKS4ChartInternal::Chart & | chart | ) |
| protected

update a chart, so that it can be send

update the chart type and serie type

times to update the color

Referenced by sendCharts().

## ◆ version()

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

return the file version

Referenced by updateChart().

## Friends And Related Function Documentation

## ◆ WKS4ChartInternal::Chart

friend class WKS4ChartInternal::Chart
| friend

## ◆ WKS4Parser

friend class WKS4Parser
| friend

## Member Data Documentation

## ◆ m_asciiFile

libwps::DebugFile& WKS4Chart::m_asciiFile
| private

the ascii file

Referenced by ascii().

## ◆ m_input

RVNGInputStreamPtr WKS4Chart::m_input
| private

the input

Referenced by checkFilePosition(), readChart(), readChart2Font(), readChart3D(), readChartAxis(), readChartDim(), readChartFont(), readChartLimit(), readChartName(), readChartSeries(), readChartSeriesColorMap(), readChartSeriesStyles(), resetInput(), and sendText().

## ◆ m_listener

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

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

## ◆ m_mainParser

WKS4Parser& WKS4Chart::m_mainParser
| private

the listener (if set)

the main parser

Referenced by readChart(), readChart2Font(), readChartAxis(), readChartFont(), readChartName(), readChartSeries(), sendText(), updateChart(), and version().

## ◆ m_state

std::shared_ptr<WKS4ChartInternal::State> WKS4Chart::m_state
| private

the internal state

Referenced by checkFilePosition(), getNumCharts(), readChart(), readChart3D(), readChartAxis(), readChartDim(), readChartName(), readChartSeries(), readChartSeriesStyles(), sendCharts(), updateChart(), and version().

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

- WKS4Chart.h
- WKS4Chart.cpp