1 /***************************************************************************
2 * Copyright (C) 2006 by Tobias Koenig <tokoe@kde.org> *
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"
27 class Converter
: public Okular::TextDocumentConverter
33 virtual QTextDocument
*convert( const QString
&fileName
);
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
;
51 StyleInformation
*mStyleInformation
;