filters

ooimpressexport.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2003 Percy Leonhardt
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00017  * Boston, MA 02110-1301, USA.
00018 */
00019 
00020 #ifndef OOIMPRESSEXPORT_H
00021 #define OOIMPRESSEXPORT_H
00022 
00023 #include "stylefactory.h"
00024 
00025 #include <qdom.h>
00026 
00027 #include <KoFilter.h>
00028 
00029 class QDomElement;
00030 class KoStore;
00031 
00032 class OoImpressExport : public KoFilter
00033 {
00034     Q_OBJECT
00035 public:
00036     OoImpressExport( KoFilter * parent, const char * name, const QStringList & );
00037     virtual ~OoImpressExport();
00038 
00039     virtual KoFilter::ConversionStatus convert( const QCString & from,
00040                                                 const QCString & to );
00041 
00042 private:
00043     KoFilter::ConversionStatus openFile();
00044 
00045     void exportBody( QDomDocument & doccontent, QDomElement & body );
00046     void createDocumentMeta( QDomDocument & docmeta );
00047     void createDocumentStyles( QDomDocument & docstyles );
00048     void createDocumentContent( QDomDocument & doccontent );
00049     void createDocumentManifest( QDomDocument & docmanifest );
00050     void createDocumentSettings( QDomDocument & docsetting );
00051     void appendTextbox( QDomDocument & doc, QDomElement & source, QDomElement & target );
00052     void appendParagraph( QDomDocument & doc, QDomElement & source, QDomElement & target );
00053     void appendText( QDomDocument & doc, QDomElement & source, QDomElement & target );
00054     void appendLine( QDomDocument & doc, QDomElement & source, QDomElement & target );
00055     void appendRectangle( QDomDocument & doc, QDomElement & source, QDomElement & target );
00056     void appendEllipse( QDomDocument & doc, QDomElement & source, QDomElement & target, bool pieObject = false );
00057     void set2DGeometry( QDomElement & source, QDomElement & target, bool pieObject = false, bool multiPoint = false );
00058     void setLineGeometry( QDomElement & source, QDomElement & target );
00059     void appendPolyline( QDomDocument & doc, QDomElement & source, QDomElement & target,  bool polygone = false);
00060     void appendPicture( QDomDocument & doc, QDomElement & source, QDomElement & target );
00061     void createPictureList( QDomNode &pictures );
00062     void appendNote( QDomDocument & doc, QDomElement & source, QDomElement & target );
00063     void appendGroupObject( QDomDocument & doc, QDomElement & source, QDomElement & target );
00064     QString rotateValue( double val );
00065     QString pictureKey( QDomElement &element );
00066     void createHelpLine( QDomNode &helpline );
00067     void createAttribute( QDomNode &attributeValue );
00068     void appendObjects(QDomDocument & doccontent, QDomNode &objects, QDomElement &drawPage);
00069 
00070     int m_currentPage;
00071     int m_objectIndex;
00072     float m_pageHeight;
00073     StyleFactory m_styleFactory;
00074     QString m_masterPageStyle;
00075     QDomElement m_styles;
00076     QDomDocument m_maindoc;
00077     QDomDocument m_documentinfo;
00078     QMap<QString, QString> m_pictureLst;
00079 
00080     QString m_helpLine;
00081     int m_activePage;
00082     double m_gridX, m_gridY;
00083     bool m_snapToGrid;
00084 
00085     //load from kpresenter file format
00086     QMap<QString, QString> m_kpresenterPictureLst;
00087     int m_pictureIndex;
00088     KoStore *m_storeinp;
00089     KoStore *m_storeout;
00090 };
00091 
00092 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys