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
class
WPXBinaryData;
37
38
class
WPSEntry
;
39
class
WPS8Parser
;
40
class
WPSPosition
;
41
42
typedef
class
WPSContentListener
WPS8ContentListener
;
43
typedef
shared_ptr<WPS8ContentListener>
WPS8ContentListenerPtr
;
44
45
namespace
WPS8GraphInternal
46
{
47
struct
State;
48
}
49
60
class
WPS8Graph
61
{
62
friend
class
WPS8Parser
;
63
public
:
65
WPS8Graph
(
WPS8Parser
&parser);
66
68
~WPS8Graph
();
69
71
void
setListener
(
WPS8ContentListenerPtr
&listen)
72
{
73
m_listener
= listen;
74
}
75
80
void
computePositions
()
const
;
81
83
int
numPages
()
const
;
84
89
bool
sendObject
(
WPSPosition
const
&pos,
int
id
,
bool
ole);
90
92
bool
sendIBGF
(
WPSPosition
const
&pos,
int
ibgfId);
93
101
void
sendObjects
(
int
page,
int
pageToIgnore=-2);
102
103
protected
:
105
int
version
()
const
;
106
110
void
sendBorder
(
int
borderId);
111
113
void
storeObjects
(std::vector<WPXBinaryData>
const
&objects,
114
std::vector<int>
const
&ids,
115
std::vector<WPSPosition>
const
&positions);
116
118
bool
readStructures
(
WPXInputStreamPtr
input);
119
120
// low level
121
125
bool
readPICT
(
WPXInputStreamPtr
input,
WPSEntry
const
&entry);
126
131
bool
readIBGF
(
WPXInputStreamPtr
input,
WPSEntry
const
&entry);
132
134
bool
readBDR
(
WPXInputStreamPtr
input,
WPSEntry
const
&entry);
135
139
bool
readMetaFile
(
WPXInputStreamPtr
input,
long
endPos, WPXBinaryData &pict);
140
142
libwps::DebugFile
&
ascii
()
143
{
144
return
m_asciiFile
;
145
}
146
private
:
147
WPS8Graph
(
WPS8Graph
const
&orig);
148
WPS8Graph
&
operator=
(
WPS8Graph
const
&orig);
149
150
protected
:
152
WPS8ContentListenerPtr
m_listener
;
153
155
WPS8Parser
&
m_mainParser
;
156
158
mutable
shared_ptr<WPS8GraphInternal::State>
m_state
;
159
161
libwps::DebugFile
&
m_asciiFile
;
162
};
163
164
#endif
165
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
Generated on Sat Sep 14 2013 12:51:16 for libwps by
doxygen
1.8.3.1