libodsstream
odsstream
odsdocreader.h
1
/*
2
libodsstream is a library to read and write ODS documents as streams
3
Copyright (C) 2013 Olivier Langella <Olivier.Langella@moulon.inra.fr>
4
5
This program is free software: you can redistribute it and/or modify
6
it under the terms of the GNU Lesser General Public License as published by
7
the Free Software Foundation, either version 3 of the License, or
8
(at your option) any later version.
9
10
This program is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU Lesser General Public License for more details.
14
15
You should have received a copy of the GNU Lesser General Public License
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18
*/
19
20
#ifndef ODSDOCREADER_H
21
#define ODSDOCREADER_H
22
23
#include <quazip5/quazip.h>
24
25
#include "reader/odscell.h"
26
#include "
odsdochandlerinterface.h
"
27
28
class
SaxHandlerContentXml
;
29
30
class
OdsDocReader
31
{
32
friend
SaxHandlerContentXml
;
33
34
public
:
42
OdsDocReader
(
OdsDocHandlerInterface
&handler);
43
virtual
~
OdsDocReader
();
44
45
46
void
parse(QFile &odsFile);
47
void
parse(QIODevice *p_inputstream);
48
49
50
private
:
51
void
setInsideCell(
const
OdsCell
&cell);
52
void
startInsideLine();
53
54
void
55
startSheet(
const
QString &sheet_name)
56
{
57
_handler.
startSheet
(sheet_name);
58
};
59
60
void
61
endSheet()
62
{
63
_handler.
endSheet
();
64
};
65
66
void
67
startLine()
68
{
69
_handler.
startLine
();
70
};
71
72
void
73
endLine()
74
{
75
_handler.
endLine
();
76
};
77
78
void
79
setCell(
const
OdsCell
&cell)
80
{
81
_handler.
setCell
(cell);
82
};
83
void
84
endDocument()
85
{
86
_handler.
endDocument
();
87
};
88
89
90
QuaZip *_p_quaZip;
91
92
uint _column_number;
93
94
OdsDocHandlerInterface
&_handler;
95
};
96
97
#endif // ODSDOCREADER_H
OdsDocHandlerInterface
Definition:
odsdochandlerinterface.h:43
OdsDocHandlerInterface::setCell
virtual void setCell(const OdsCell &)=0
OdsDocReader
Definition:
odsdocreader.h:30
SaxHandlerContentXml
Definition:
saxhandlercontentxml.h:28
OdsCell
Definition:
odscell.h:28
OdsDocHandlerInterface::endDocument
virtual void endDocument()=0
OdsDocReader::OdsDocReader
OdsDocReader(OdsDocHandlerInterface &handler)
Definition:
odsdocreader.cpp:26
OdsDocHandlerInterface::endLine
virtual void endLine()=0
OdsDocHandlerInterface::startLine
virtual void startLine()=0
odsdochandlerinterface.h
interface to use as a wildcard to writer in either TSV, ODS TSVdirectory writers any kind of writer c...
OdsDocHandlerInterface::endSheet
virtual void endSheet()=0
OdsDocHandlerInterface::startSheet
virtual void startSheet(const QString &sheet_name)=0
Generated on Tue Mar 24 2020 14:06:20 for libodsstream by
1.8.17