WKS4Chart.h
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2/* libwps
3 * Version: MPL 2.0 / LGPLv2.1+
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * Major Contributor(s):
10 * Copyright (C) 2006, 2007 Andrew Ziem
11 * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
12 * Copyright (C) 2003 Marc Maurer (uwog@uwog.net)
13 *
14 * For minor contributions see the git repository.
15 *
16 * Alternatively, the contents of this file may be used under the terms
17 * of the GNU Lesser General Public License Version 2.1 or later
18 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
19 * applicable instead of those above.
20 */
21
22#ifndef WKS4_CHART_H
23#define WKS4_CHART_H
24
25#include <ostream>
26#include <map>
27#include <vector>
28
29#include <librevenge-stream/librevenge-stream.h>
30
31#include "libwps_internal.h"
32
33#include "WPSDebug.h"
34#include "WKSContentListener.h"
35
36namespace WKS4ChartInternal
37{
38class Chart;
39struct State;
40
41}
42
43class WKS4Parser;
44
50{
51public:
52 friend class WKS4Parser;
54
56 explicit WKS4Chart(WKS4Parser &parser);
58 ~WKS4Chart();
61 {
62 m_listener = listen;
63 }
64
65protected:
67 bool checkFilePosition(long pos);
69 int version() const;
70
72 void resetInput(RVNGInputStreamPtr const &input);
73
75 int getNumCharts() const;
78
80 bool sendCharts();
82 bool sendText(WPSEntry const &entry);
83
85 bool readChart();
86
88 bool readChartAxis();
89
91 bool readChartSeries();
92
95
99 bool readChartName();
100
102 bool readChartDim();
104 bool readChartFont();
106 bool readChart3D();
107
109 bool readChart2Font();
110
112 bool readChartLimit();
113
114private:
115 WKS4Chart(WKS4Chart const &orig) = delete;
116 WKS4Chart &operator=(WKS4Chart const &orig) = delete;
119 {
120 return m_asciiFile;
121 }
122
124 std::shared_ptr<WKSContentListener> m_listener;
128 std::shared_ptr<WKS4ChartInternal::State> m_state;
131};
132
133#endif /* WPS4_H */
134/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
the chart of a WKS4 Pro Dos
Definition WKS4Chart.cpp:52
friend class WKS4Parser
Definition WKS4Chart.h:52
bool readChartSeriesColorMap()
reads the chart's series color map: zone 0x31
Definition WKS4Chart.cpp:1358
WKS4Chart(WKS4Parser &parser)
constructor
Definition WKS4Chart.cpp:223
bool readChartSeriesStyles()
reads the series style: zone 0x16
Definition WKS4Chart.cpp:1287
std::shared_ptr< WKS4ChartInternal::State > m_state
the internal state
Definition WKS4Chart.h:128
bool readChartLimit()
reads end/begin of chart (only present in windows file): 80,81
Definition WKS4Chart.cpp:948
bool readChart2Font()
reads a structure which seems to define four chart font (only present in windows file): 84
Definition WKS4Chart.cpp:900
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition WKS4Chart.h:60
bool readChart()
reads a structure which define a chart: 2d(default), 2e(name + value)
Definition WKS4Chart.cpp:435
bool sendCharts()
try to send the charts
Definition WKS4Chart.cpp:384
libwps::DebugFile & m_asciiFile
the ascii file
Definition WKS4Chart.h:130
std::shared_ptr< WKSContentListener > m_listener
Definition WKS4Chart.h:124
bool readChartFont()
reads a structure which seems to define two chart font (only present in windows file): 40
Definition WKS4Chart.cpp:808
~WKS4Chart()
destructor
Definition WKS4Chart.cpp:232
WKS4Parser & m_mainParser
the listener (if set)
Definition WKS4Chart.h:126
void resetInput(RVNGInputStreamPtr const &input)
reset the main input
Definition WKS4Chart.cpp:247
bool readChartName()
reads the chart name or title: 41
Definition WKS4Chart.cpp:700
WKS4Chart(WKS4Chart const &orig)=delete
int getNumCharts() const
return the number of chart
Definition WKS4Chart.cpp:236
RVNGInputStreamPtr m_input
the input
Definition WKS4Chart.h:123
bool sendText(WPSEntry const &entry)
try to send the text
Definition WKS4Chart.cpp:415
bool readChartAxis()
reads the axis(or second yaxis) data: zone 0x14
Definition WKS4Chart.cpp:971
libwps::DebugFile & ascii()
returns the debug file
Definition WKS4Chart.h:118
bool readChartSeries()
reads a list of series definition: zone 0x15
Definition WKS4Chart.cpp:1224
bool readChartDim()
reads a structure which seems to define some dimension (only present in windows file): 35
Definition WKS4Chart.cpp:740
bool readChart3D()
reads a structure which stores zfront, zfar: 44
Definition WKS4Chart.cpp:861
int version() const
return the file version
Definition WKS4Chart.cpp:252
WKS4Chart & operator=(WKS4Chart const &orig)=delete
bool checkFilePosition(long pos)
return true if the pos is in the file, update the file size if need
Definition WKS4Chart.cpp:259
void updateChart(WKS4ChartInternal::Chart &chart)
update a chart, so that it can be send
Definition WKS4Chart.cpp:271
This class parses Microsoft Works spreadsheet or a database file.
Definition WKS4.h:49
basic class to store an entry in a file This contained :
Definition WPSEntry.h:39
Definition WPSDebug.h:208
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition libwps_internal.h:114
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition libwps_internal.h:87
Definition WKS4Chart.cpp:47
the state of WKS4Chart
Definition WKS4Chart.cpp:132

Generated on Sat Jul 19 2025 05:24:39 for libwps by doxygen 1.14.0