filters

ooimpressexport.h
1/* This file is part of the KDE project
2 Copyright (C) 2003 Percy Leonhardt
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18*/
19
20#ifndef OOIMPRESSEXPORT_H
21#define OOIMPRESSEXPORT_H
22
23#include "stylefactory.h"
24
25#include <tqdom.h>
26
27#include <KoFilter.h>
28
29class TQDomElement;
30class KoStore;
31
32class OoImpressExport : public KoFilter
33{
34 TQ_OBJECT
35
36public:
37 OoImpressExport( KoFilter * parent, const char * name, const TQStringList & );
38 virtual ~OoImpressExport();
39
40 virtual KoFilter::ConversionStatus convert( const TQCString & from,
41 const TQCString & to );
42
43private:
44 KoFilter::ConversionStatus openFile();
45
46 void exportBody( TQDomDocument & doccontent, TQDomElement & body );
47 void createDocumentMeta( TQDomDocument & docmeta );
48 void createDocumentStyles( TQDomDocument & docstyles );
49 void createDocumentContent( TQDomDocument & doccontent );
50 void createDocumentManifest( TQDomDocument & docmanifest );
51 void createDocumentSettings( TQDomDocument & docsetting );
52 void appendTextbox( TQDomDocument & doc, TQDomElement & source, TQDomElement & target );
53 void appendParagraph( TQDomDocument & doc, TQDomElement & source, TQDomElement & target );
54 void appendText( TQDomDocument & doc, TQDomElement & source, TQDomElement & target );
55 void appendLine( TQDomDocument & doc, TQDomElement & source, TQDomElement & target );
56 void appendRectangle( TQDomDocument & doc, TQDomElement & source, TQDomElement & target );
57 void appendEllipse( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool pieObject = false );
58 void set2DGeometry( TQDomElement & source, TQDomElement & target, bool pieObject = false, bool multiPoint = false );
59 void setLineGeometry( TQDomElement & source, TQDomElement & target );
60 void appendPolyline( TQDomDocument & doc, TQDomElement & source, TQDomElement & target, bool polygone = false);
61 void appendPicture( TQDomDocument & doc, TQDomElement & source, TQDomElement & target );
62 void createPictureList( TQDomNode &pictures );
63 void appendNote( TQDomDocument & doc, TQDomElement & source, TQDomElement & target );
64 void appendGroupObject( TQDomDocument & doc, TQDomElement & source, TQDomElement & target );
65 TQString rotateValue( double val );
66 TQString pictureKey( TQDomElement &element );
67 void createHelpLine( TQDomNode &helpline );
68 void createAttribute( TQDomNode &attributeValue );
69 void appendObjects(TQDomDocument & doccontent, TQDomNode &objects, TQDomElement &drawPage);
70
71 int m_currentPage;
72 int m_objectIndex;
73 float m_pageHeight;
74 StyleFactory m_styleFactory;
75 TQString m_masterPageStyle;
76 TQDomElement m_styles;
77 TQDomDocument m_maindoc;
78 TQDomDocument m_documentinfo;
79 TQMap<TQString, TQString> m_pictureLst;
80
81 TQString m_helpLine;
82 int m_activePage;
83 double m_gridX, m_gridY;
84 bool m_snapToGrid;
85
86 //load from kpresenter file format
87 TQMap<TQString, TQString> m_kpresenterPictureLst;
88 int m_pictureIndex;
89 KoStore *m_storeinp;
90 KoStore *m_storeout;
91};
92
93#endif