kword/latex/export/document.h
1/*
2** Header file for inclusion with kword_xml2latex.c
3**
4** Copyright (C) 2000-2002 Robert JACOLIN
5**
6** This library is free software; you can redistribute it and/or
7** modify it under the terms of the GNU Library General Public
8** License as published by the Free Software Foundation; either
9** version 2 of the License, or (at your option) any later version.
10**
11** This library is distributed in the hope that it will be useful,
12** but WITHOUT ANY WARRANTY; without even the implied warranty of
13** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14** Library General Public License for more details.
15**
16** To receive a copy of the GNU Library General Public License, write to the
17** Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19**
20*/
21
22#ifndef __KWORD_LATEX_DOCUMENT_H__
23#define __KWORD_LATEX_DOCUMENT_H__
24
25#include <tqptrlist.h>
26#include <tqtextstream.h>
27
28#include "listtable.h" /* list of tables (another kind of list of elements). */
29#include "key.h"
30
31
32/***********************************************************************/
33/* Class: Document */
34/***********************************************************************/
35
40class Document: public XmlParser
41{
42 public:
43 enum EGenerate { E_LATEX, E_KWORD, E_CONFIG };
44
45 private:
46 TQPtrList<Element> _headers;
47 TQPtrList<Element> _footers;
48 TQPtrList<Element> _footnotes;
49 TQPtrList<Element> _formulas;
50 TQPtrList<Element> _corps;
51 TQPtrList<Element> _pixmaps;
52 TQPtrList<Key> _keys;
53
54 ListTable _tables;
55 //TQPtrList<Element> _parts;
56 EGenerate _generation;
57
58 public:
64 Document();
65
71 virtual ~Document();
72
80 SType getTypeFrameset(const TQDomNode);
81 //FileHeader* getFileHeader() const { return _fileHeader; }
82 //void setFileHeader(FileHeader *h) { _fileHeader = h; }
83
84 void analyse(const TQDomNode);
85 void analysePixmaps(const TQDomNode);
86
87 void generate(TQTextStream&, bool);
88 Element* searchAnchor(TQString);
89 Element* searchFootnote(TQString);
90 Key* searchKey(TQString keyName);
92 TQString extractData(TQString key);
94 //TQDomNode extractKoData(TQString key);
95 //Pixmap* searchPixmap(TQString);
96
97 private:
101 void generatePreambule(TQTextStream&);
102
106 void generateTypeHeader(TQTextStream&, Element*);
110 void generateTypeFooter(TQTextStream&, Element*);
111};
112
113#endif /* __KWORD_LATEX_DOCUMENT_H__ */
This class hold a whole document with its headers, footers, footnotes, endnotes, content,...
virtual ~Document()
Destructor.
SType getTypeFrameset(const TQDomNode)
Accessors.
TQString extractData(TQString key)
Save the file in a temp file.
This class is a element.
This class hold a real paragraph.
Definition key.h:39
This class hold a list of tables.
Definition listtable.h:32
This class supply some convenients methods to access to a DOM tree.