Main Page
Namespaces
Classes
Files
File List
File Members
WPSTable.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 WPS_TABLE
27
# define WPS_TABLE
28
29
#include <iostream>
30
#include <vector>
31
32
#include "
libwps_internal.h
"
33
34
class
WPSContentListener
;
35
typedef
shared_ptr<WPSContentListener>
WPSContentListenerPtr
;
36
37
class
WPSCell
;
38
typedef
shared_ptr<WPSCell>
WPSCellPtr
;
39
40
/*
41
* Structure to store and construct a table from an unstructured list
42
* of cell
43
*
44
*/
45
class
WPSTable
46
{
47
public
:
49
WPSTable
() :
m_cellsList
(),
m_rowsSize
(),
m_colsSize
() {}
50
52
virtual
~WPSTable
();
53
55
void
add
(
WPSCellPtr
&cell);
56
58
int
numCells
()
const
59
{
60
return
int(
m_cellsList
.size());
61
}
63
WPSCellPtr
getCell
(
int
id
);
64
69
bool
sendTable
(
WPSContentListenerPtr
listener);
70
72
bool
sendAsText
(
WPSContentListenerPtr
listener);
73
74
protected
:
76
bool
buildStructures
();
77
79
std::vector<WPSCellPtr>
m_cellsList
;
81
std::vector<float>
m_rowsSize
,
m_colsSize
;
82
};
83
84
#endif
85
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
Generated on Wed Apr 24 2013 12:57:24 for libwps by
doxygen
1.8.3.1