QuattroDosChart.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 QUATTRO_DOS_CHART_H
23 #define QUATTRO_DOS_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 
37 {
38 class Chart;
39 struct State;
40 
41 }
42 
43 class QuattroDosParser;
44 
50 {
51 public:
52  friend class QuattroDosParser;
54 
56  explicit QuattroDosChart(QuattroDosParser &parser);
58  ~QuattroDosChart();
61  {
62  m_listener = listen;
63  }
65  bool readChartSetType();
67  bool readChartName();
69  bool readChart();
70 
72  int getNumSpreadsheets() const;
74  void getChartPositionMap(int sheetId, std::map<Vec2i,Vec2i> &cellMap) const;
76  bool sendChart(int sheetId, Vec2i const &cell, Vec2f const &chartSize);
77 protected:
79  bool checkFilePosition(long pos);
81  int version() const;
82 
84  bool sendText(WPSEntry const &entry);
85 private:
86  QuattroDosChart(QuattroDosChart const &orig) = delete;
87  QuattroDosChart &operator=(QuattroDosChart const &orig) = delete;
90  {
91  return m_asciiFile;
92  }
95  std::shared_ptr<WKSContentListener> m_listener;
96  QuattroDosParser &m_mainParser;
99  std::shared_ptr<QuattroDosChartInternal::State> m_state;
102 };
103 
104 #endif /* WPS4_H */
105 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
This class parses Quattro Pro DOS chart file.
Definition: QuattroDosChart.h:49
std::shared_ptr< QuattroDosChartInternal::State > m_state
the internal state
Definition: QuattroDosChart.h:99
This class parses Quattro Pro spreadsheet: .wq1 and wq2.
Definition: QuattroDos.h:48
Definition: WPSDebug.h:207
RVNGInputStreamPtr m_input
the input
Definition: QuattroDosChart.h:94
std::shared_ptr< WKSContentListener > m_listener
Definition: QuattroDosChart.h:95
void sendChart(WKSContentListenerPtr &listener, librevenge::RVNGSpreadsheetInterface *interface) const
send the chart to the listener
Definition: WKSChart.cpp:186
std::shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
libwps::DebugFile & ascii()
returns the debug file
Definition: QuattroDosChart.h:89
WKSChart & operator=(WKSChart const &orig)=delete
Definition: QuattroDosChart.cpp:46
libwps::DebugFile & m_asciiFile
the ascii file
Definition: QuattroDosChart.h:101
std::shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:114
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:38
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: QuattroDosChart.h:60
the chart of a Quattro Pro Dos
Definition: QuattroDosChart.cpp:52

Generated on Wed Aug 8 2018 16:52:31 for libwps by doxygen 1.8.13