libodsstream
odsstream
saxreader
saxhandlercontentxml.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 SAXHANDLERCONTENTXML_H
21
#define SAXHANDLERCONTENTXML_H
22
23
#include <QXmlDefaultHandler>
24
#include <QString>
25
#include <vector>
26
#include "../odsdocreader.h"
27
28
class
SaxHandlerContentXml
:
public
QXmlDefaultHandler
29
{
30
31
public
:
32
SaxHandlerContentXml
(
OdsDocReader
&);
33
virtual
~
SaxHandlerContentXml
();
34
35
bool
startElement(
const
QString &namespaceURI,
const
QString &localName,
36
const
QString &qName,
const
QXmlAttributes &attributes);
37
38
bool
endElement(
const
QString &namespaceURI,
const
QString &localName,
39
const
QString &qName);
40
41
bool
endDocument();
42
43
bool
characters(
const
QString &str);
44
45
bool
fatalError(
const
QXmlParseException &exception);
46
47
QString errorString()
const
;
48
49
private
:
50
bool
start_element_table_row(
const
QXmlAttributes &attributes)
const
;
51
bool
end_element_table_row()
const
;
52
bool
start_element_table(
const
QXmlAttributes &attributes)
const
;
53
bool
end_element_table()
const
;
54
bool
start_element_table_cell(
const
QXmlAttributes &attributes);
55
bool
end_element_table_cell() ;
56
bool
start_element_p(
const
QXmlAttributes &attributes);
57
bool
end_element_p();
59
QString _errorStr;
60
61
QString _currentText;
62
63
std::vector<QString> _tag_stack;
64
65
OdsDocReader
& _ods_reader;
66
67
bool
_is_in_paragraph;
68
69
uint _number_columns_repeated;
70
71
OdsCell
_current_cell;
72
73
};
74
75
#endif // SAXHANDLERCONTENTXML_H
SaxHandlerContentXml
Definition:
saxhandlercontentxml.h:28
OdsDocReader
Definition:
odsdocreader.h:30
OdsCell
Definition:
odscell.h:28
Generated on Mon Feb 19 2018 11:21:23 for libodsstream by
1.8.13