LotusGraph.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

LotusGraph.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 LOTUS_GRAPH_H
23 #define LOTUS_GRAPH_H
24
25 #include <ostream>
26 #include <vector>
27
28 #include <librevenge-stream/librevenge-stream.h>
29
30 #include "libwps_internal.h"
31
32 #include "WPSDebug.h"
33 #include "WKSContentListener.h"
34
35 namespace LotusGraphInternal
36 {
37 struct Zone;
38 struct State;
39
40 class SubDocument;
41 }
42
43 class LotusParser;
44 class LotusStyleManager;
45
50 class LotusGraph
51 {
52 public:
53 friend class LotusParser;
54 friend class LotusGraphInternal::SubDocument;
55
57 explicit LotusGraph(LotusParser &parser);
59 ~LotusGraph();
61 void cleanState();
63 void setListener(WKSContentListenerPtr &listen)
64 {
65 m_listener = listen;
66 }
67 protected:
69 bool checkFilePosition(long pos);
71 int version() const;
72
74 bool hasGraphics(int sheetId) const;
76 void sendGraphics(int sheetId);
78 void sendPicture(LotusGraphInternal::Zone const &zone);
80 void sendTextBox(WPSEntry const &entry);
81
82 //
83 // low level
84 //
85
86 // ////////////////////// zone //////////////////////////////
87
89 bool readZoneBegin(long endPos);
91 bool readZoneData(long endPos, int type);
93 bool readTextBoxData(long endPos);
95 bool readPictureDefinition(long endPos);
97 bool readPictureData(long endPos);
98
99 private:
100 LotusGraph(LotusGraph const &orig);
101 LotusGraph &operator=(LotusGraph const &orig);
103 libwps::DebugFile &ascii()
104 {
105 return m_asciiFile;
106 }
108 RVNGInputStreamPtr m_input;
109 shared_ptr<WKSContentListener> m_listener;
110 LotusParser &m_mainParser;
113 shared_ptr<LotusStyleManager> m_styleManager;
115 shared_ptr<LotusGraphInternal::State> m_state;
117 libwps::DebugFile &m_asciiFile;
118 };
119
120 #endif /* LOTUS_GRAPH_H */
121 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
LotusGraph::m_listener
shared_ptr< WKSContentListener > m_listener
Definition: LotusGraph.h:109
LotusGraphInternal::SubDocument
Internal: the subdocument of a LotusGraphc.
Definition: LotusGraph.cpp:212
LotusGraph::ascii
libwps::DebugFile & ascii()
returns the debug file
Definition: LotusGraph.h:103
WKSSubDocument::parser
WKSParser * parser() const
returns the parser
Definition: WKSSubDocument.h:44
libwps::DebugFile
Definition: WPSDebug.h:196
WKSSubDocument::operator=
WKSSubDocument & operator=(const WKSSubDocument &)
LotusGraph::setListener
void setListener(WKSContentListenerPtr &listen)
sets the listener
Definition: LotusGraph.h:63
LotusGraphInternal::Zone
the graphic zone of a LotusGraph
Definition: LotusGraph.cpp:53
WKSContentListener.h
LotusGraph::m_styleManager
shared_ptr< LotusStyleManager > m_styleManager
the style manager
Definition: LotusGraph.h:113
LotusGraph
This class parses Microsoft Works graph file.
Definition: LotusGraph.h:50
LotusParser
This class parses a WK2..WK4 Lotus spreadsheet.
Definition: Lotus.h:47
libwps_internal.h
LotusGraph::m_asciiFile
libwps::DebugFile & m_asciiFile
the ascii file
Definition: LotusGraph.h:117
WKSContentListenerPtr
shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:113
LotusStyleManager
This class parses the Lotus style.
Definition: LotusStyleManager.h:45
RVNGInputStreamPtr
shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
LotusGraph::m_input
RVNGInputStreamPtr m_input
the input
Definition: LotusGraph.h:108
LotusGraph::m_state
shared_ptr< LotusGraphInternal::State > m_state
the internal state
Definition: LotusGraph.h:115
WPSEntry
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:37
LotusGraphInternal
Definition: LotusGraph.cpp:50
WPSDebug.h