filters

applixspreadimport.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Enno Bartels <ebartels@nwn.de>
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 APPLIXSPREADIMPORT_H
00021 #define APPLIXSPREADIMPORT_H
00022 
00023 #include <qstring.h>
00024 #include <qfile.h>
00025 #include <qobject.h>
00026 #include <qtextstream.h>
00027 #include <qptrlist.h>
00028 
00029 #include <KoFilter.h>
00030 #include <KoStore.h>
00031 
00032 typedef struct
00033 {
00034   int r;
00035   int g;
00036   int b;
00037 
00038   int c;
00039   int m;
00040   int y;
00041   int k;
00042 } t_mycolor;
00043 
00044 typedef struct
00045 {
00046   QStringList tabname;
00047   QStringList rc;
00048 } t_rc;
00049 
00050 
00051 class APPLIXSPREADImport : public KoFilter {
00052 
00053     Q_OBJECT
00054 
00055 public:
00056     APPLIXSPREADImport ( QObject *parent, const char* name, const QStringList& );
00057     virtual ~APPLIXSPREADImport() {}
00058 
00059     virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
00060 
00061 protected:
00062     QString nextLine           (QTextStream &);
00063     QChar   specCharfind       (QChar , QChar );
00064     void    writePen           (QString &, int, int, QString);
00065     QString writeColor         (t_mycolor *);
00066     void    readTypefaceTable  (QTextStream &, QStringList &);
00067     void    readColormap       (QTextStream &, QPtrList<t_mycolor> &);
00068     void    readView           (QTextStream &, QString, t_rc &);
00069     void    filterSHFGBG       (QString, int *, int *, int *);
00070     void    transPenFormat     (QString, int *, int *);
00071     int     readHeader         (QTextStream &);
00072     int     translateColumnNumber (QString);
00073 
00074 private:
00075     int m_stepsize;
00076     int m_instep;
00077     int m_progress;
00078 };
00079 #endif // APPLIXSPREADIMPORT_H
KDE Home | KDE Accessibility Home | Description of Access Keys