WPS8Graph.h Source File documentation

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

WPS8Graph.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) 2009, 2011 Alonso Laurent (alonso@loria.fr)
11 * Copyright (C) 2006, 2007 Andrew Ziem
12 * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
13 * Copyright (C) 2004 Marc Maurer (uwog@uwog.net)
14 * Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
15 *
16 * For minor contributions see the git repository.
17 *
18 * Alternatively, the contents of this file may be used under the terms
19 * of the GNU Lesser General Public License Version 2.1 or later
20 * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
21 * applicable instead of those above.
22 *
23 * For further information visit http://libwps.sourceforge.net
24 */
25
26 #ifndef WPS8_GRAPH
27 # define WPS8_GRAPH
28
29 #include <list>
30 #include <vector>
31
32 #include "libwps_internal.h"
33
34 #include "WPSDebug.h"
35
36 struct WPSOLEParserObject;
37 class WPS8Parser;
38
39 namespace WPS8GraphInternal
40 {
41 struct State;
42 }
43
54 class WPS8Graph
55 {
56 friend class WPS8Parser;
57 public:
59 explicit WPS8Graph(WPS8Parser &parser);
60
62 ~WPS8Graph();
63
65 void setListener(WPSContentListenerPtr &listen)
66 {
67 m_listener = listen;
68 }
69
74 void computePositions() const;
75
77 int numPages() const;
78
83 bool sendObject(WPSPosition const &pos, int id, bool ole);
84
86 bool sendIBGF(WPSPosition const &pos, int ibgfId);
87
95 void sendObjects(int page, int pageToIgnore=-2);
96
97 protected:
99 int version() const;
100
104 void sendBorder(int borderId);
105
107 void storeObjects(std::vector<WPSOLEParserObject> const &objects,
108 std::vector<int> const &ids);
109
111 bool readStructures(RVNGInputStreamPtr input);
112
113 // low level
114
118 bool readPICT(RVNGInputStreamPtr input, WPSEntry const &entry);
119
124 bool readIBGF(RVNGInputStreamPtr input, WPSEntry const &entry);
125
127 bool readBDR(RVNGInputStreamPtr input, WPSEntry const &entry);
128
132 bool readMetaFile(RVNGInputStreamPtr input, long endPos, librevenge::RVNGBinaryData &pict);
133
135 libwps::DebugFile &ascii()
136 {
137 return m_asciiFile;
138 }
139 private:
140 WPS8Graph(WPS8Graph const &orig);
141 WPS8Graph &operator=(WPS8Graph const &orig);
142
143 protected:
145 WPSContentListenerPtr m_listener;
146
148 WPS8Parser &m_mainParser;
149
151 mutable shared_ptr<WPS8GraphInternal::State> m_state;
152
154 libwps::DebugFile &m_asciiFile;
155 };
156
157 #endif
158 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
WPS8Graph::ascii
libwps::DebugFile & ascii()
returns the debug file
Definition: WPS8Graph.h:135
WPSContentListenerPtr
shared_ptr< WPSContentListener > WPSContentListenerPtr
shared pointer to WPSContentListener
Definition: libwps_internal.h:106
WPS8Graph::m_state
shared_ptr< WPS8GraphInternal::State > m_state
the state
Definition: WPS8Graph.h:151
WPSParser::m_asciiFile
libwps::DebugFile m_asciiFile
the debug file
Definition: WPSParser.h:90
WPS8Parser
This class parses Works version 2000 through 8.
Definition: WPS8.h:49
WPSParser::operator=
WPSParser & operator=(const WPSParser &)
WPS8Graph::setListener
void setListener(WPSContentListenerPtr &listen)
sets the listener
Definition: WPS8Graph.h:65
WPS8Graph
the main class to read/store pictures in a Pc MS Works document v5-8
Definition: WPS8Graph.h:54
WPSParser::version
int version() const
Definition: WPSParser.h:56
libwps::DebugFile
Definition: WPSDebug.h:196
WPS8Graph::m_listener
WPSContentListenerPtr m_listener
the listener
Definition: WPS8Graph.h:145
WPS8Parser::m_listener
shared_ptr< WPSContentListener > m_listener
Definition: WPS8.h:157
libwps_internal.h
WPSOLEParserObject
small struct to store an object
Definition: WPSOLEParser.h:79
WPS8Graph::m_asciiFile
libwps::DebugFile & m_asciiFile
the ascii file
Definition: WPS8Graph.h:154
WPS8Parser::WPS8Graph
friend class WPS8Graph
Definition: WPS8.h:52
RVNGInputStreamPtr
shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
WPS8GraphInternal
Internal: the structures of a WPS8Graph.
Definition: WPS8Graph.cpp:46
WPS8Parser::sendObject
bool sendObject(Vec2f const &size, int objectId, bool ole)
sends an object as a character with given size (via its WPS8Graph )
Definition: WPS8.cpp:468
WPSEntry
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:37
WPSPosition
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: WPSPosition.h:39
WPSDebug.h
WPS8Graph::m_mainParser
WPS8Parser & m_mainParser
the main parser
Definition: WPS8Graph.h:148