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
* Copyright (C) 2009, 2011 Alonso Laurent (alonso@loria.fr)
4
* Copyright (C) 2006, 2007 Andrew Ziem
5
* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
6
* Copyright (C) 2004 Marc Maurer (uwog@uwog.net)
7
* Copyright (C) 2003-2005 William Lachance (william.lachance@sympatico.ca)
8
*
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Library General Public
11
* License as published by the Free Software Foundation; either
12
* version 2 of the License, or (at your option) any later version.
13
*
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Library General Public License for more details.
18
*
19
* You should have received a copy of the GNU Library General Public
20
* License along with this library; if not, write to the Free Software
21
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22
*
23
* For further information visit http://libwps.sourceforge.net
24
*/
25
26
/* "This product is not manufactured, approved, or supported by
27
* Corel Corporation or Corel Corporation Limited."
28
*/
29
30
#ifndef WPS_TABLE
31
# define WPS_TABLE
32
33
#include <iostream>
34
#include <vector>
35
36
#include "
libwps_internal.h
"
37
38
class
WPSContentListener
;
39
typedef
shared_ptr<WPSContentListener>
WPSContentListenerPtr
;
40
41
class
WPSCell
;
42
typedef
shared_ptr<WPSCell>
WPSCellPtr
;
43
44
/*
45
* Structure to store and construct a table from an unstructured list
46
* of cell
47
*
48
*/
49
class
WPSTable
50
{
51
public
:
53
WPSTable
() :
m_cellsList
(),
m_rowsSize
(),
m_colsSize
() {}
54
56
virtual
~WPSTable
();
57
59
void
add
(
WPSCellPtr
&cell);
60
62
int
numCells
()
const
63
{
64
return
m_cellsList
.size();
65
}
67
WPSCellPtr
get
(
int
id);
68
73
bool
sendTable
(
WPSContentListenerPtr
listener);
74
76
bool
sendAsText
(
WPSContentListenerPtr
listener);
77
78
protected
:
80
bool
buildStructures
();
81
83
std::vector<WPSCellPtr>
m_cellsList
;
85
std::vector<float>
m_rowsSize
,
m_colsSize
;
86
};
87
88
#endif
89
/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */
Generated on Wed Aug 8 2012 16:07:57 for libwps by
doxygen
1.8.1.2