Main Page
Namespaces
Classes
Files
File List
File Members
WPS8Table.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_TABLE
27
# define WPS8_TABLE
28
29
#include "
libwps_internal.h
"
30
31
#include "
WPSDebug.h
"
32
33
class
WPSEntry
;
34
class
WPS8Parser
;
35
class
WPSPosition
;
36
37
typedef
class
WPSContentListener
WPS8ContentListener
;
38
typedef
shared_ptr<WPS8ContentListener>
WPS8ContentListenerPtr
;
39
40
namespace
WPS8TableInternal
41
{
42
struct
Cell;
43
struct
State;
44
}
45
47
//
48
// class to parse the object
49
//
51
62
class
WPS8Table
63
{
64
friend
struct
WPS8TableInternal::Cell
;
65
friend
class
WPS8Parser
;
66
public
:
68
WPS8Table
(
WPS8Parser
&parser);
69
71
~WPS8Table
();
72
74
void
setListener
(
WPS8ContentListenerPtr
&listen)
75
{
76
m_listener
= listen;
77
}
78
80
void
computePositions
()
const
;
81
83
int
numPages
()
const
;
84
86
void
flushExtra
();
87
88
protected
:
90
bool
readStructures
(
WPXInputStreamPtr
input);
91
100
bool
sendTable
(
Vec2f
const
&siz,
int
tableId,
int
strsid,
bool
inTextBox=
false
);
101
102
// interface with main parser
103
void
sendTextInCell
(
int
strsId,
int
cellId);
104
105
protected
:
// low level
106
108
bool
readMCLD
(
WPXInputStreamPtr
input,
WPSEntry
const
&entry);
109
111
int
version
()
const
;
112
114
libwps::DebugFile
&
ascii
()
115
{
116
return
m_asciiFile
;
117
}
118
private
:
119
WPS8Table
(
WPS8Table
const
&orig);
120
WPS8Table
&
operator=
(
WPS8Table
const
&orig);
121
122
protected
:
124
WPS8ContentListenerPtr
m_listener
;
125
127
WPS8Parser
&
m_mainParser
;
128
130
mutable
shared_ptr<WPS8TableInternal::State>
m_state
;
131
133
libwps::DebugFile
&
m_asciiFile
;
134
};
135
136
#endif
137
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
Generated on Mon Aug 5 2013 16:07:37 for libwps by
doxygen
1.8.3.1