compile
[kdegraphics.git] / okular / generators / ooo / converter.h
blob13513ee81b0d25b3ec007c1e21da87db2c08065b
1 /***************************************************************************
2 * Copyright (C) 2006 by Tobias Koenig <tokoe@kde.org> *
3 * *
4 * This program is free software; you can redistribute it and/or modify *
5 * it under the terms of the GNU General Public License as published by *
6 * the Free Software Foundation; either version 2 of the License, or *
7 * (at your option) any later version. *
8 ***************************************************************************/
10 #ifndef OOO_CONVERTER_H
11 #define OOO_CONVERTER_H
13 #include <QtGui/QTextCharFormat>
14 #include <QtXml/QDomDocument>
16 #include <okular/core/textdocumentgenerator.h>
18 #include "styleinformation.h"
20 class QDomElement;
21 class QDomText;
23 namespace OOO {
25 class Document;
27 class Converter : public Okular::TextDocumentConverter
29 public:
30 Converter();
31 ~Converter();
33 virtual QTextDocument *convert( const QString &fileName );
35 private:
36 bool convertBody( const QDomElement &element );
37 bool convertText( const QDomElement &element );
38 bool convertHeader( QTextCursor *cursor, const QDomElement &element );
39 bool convertParagraph( QTextCursor *cursor, const QDomElement &element, const QTextBlockFormat &format = QTextBlockFormat(), bool merge = false );
40 bool convertTextNode( QTextCursor *cursor, const QDomText &element, const QTextCharFormat &format );
41 bool convertSpan( QTextCursor *cursor, const QDomElement &element, const QTextCharFormat &format );
42 bool convertLink( QTextCursor *cursor, const QDomElement &element, const QTextCharFormat &format );
43 bool convertList( QTextCursor *cursor, const QDomElement &element );
44 bool convertTable( const QDomElement &element );
45 bool convertFrame( const QDomElement &element );
46 bool convertAnnotation( QTextCursor *cursor, const QDomElement &element );
48 QTextDocument *mTextDocument;
49 QTextCursor *mCursor;
51 StyleInformation *mStyleInformation;
56 #endif