2
For general Scribus (>=1.3.2) copyright and licensing information please refer
3
to the COPYING file provided with the program. Following this notice may exist
4
a copyright and/or license notice that predates the release of Scribus 1.3.2
5
for which a new license (GPL+exception) is in place.
7
/***************************************************************************
8
* Copyright (C) 2004 by Riku Leino *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
16
* This program is distributed in the hope that it will be useful, *
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
19
* GNU General Public License for more details. *
21
* You should have received a copy of the GNU General Public License *
22
* along with this program; if not, write to the *
23
* Free Software Foundation, Inc., *
24
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
25
***************************************************************************/
27
#ifndef CONTENTREADER_H
28
#define CONTENTREADER_H
37
#include <libxml/SAX2.h>
39
#include <libxml/SAX.h>
41
#include <QXmlAttributes>
45
#include "stylereader.h"
47
typedef std::vector<std::pair<QString, QString> > Properties;
48
typedef QMap<QString, Properties > TMap;
53
static ContentReader *creader;
58
gtStyle *defaultStyle;
59
gtStyle *currentStyle;
71
std::vector<int> listIndex2;
72
std::vector<bool> isOrdered2;
74
std::vector<QString> styleNames;
77
void write(const QString& text);
81
ContentReader(QString documentName, StyleReader* s, gtWriter *w, bool textOnly);
83
static void startElement(void *user_data, const xmlChar *fullname, const xmlChar ** atts);
84
static void endElement(void *user_data, const xmlChar *name);
85
static void characters(void *user_data, const xmlChar *ch, int len);
86
bool startElement(const QString&, const QString&, const QString &name, const QXmlAttributes &attrs);
87
bool endElement(const QString&, const QString&, const QString &name);
88
bool characters(const QString &ch);
89
void parse(QString fileName);