filters

applixspreadimport.h
1/* This file is part of the KDE project
2 Copyright (C) 2001 Enno Bartels <ebartels@nwn.de>
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 APPLIXSPREADIMPORT_H
21#define APPLIXSPREADIMPORT_H
22
23#include <tqstring.h>
24#include <tqfile.h>
25#include <tqobject.h>
26#include <tqtextstream.h>
27#include <tqptrlist.h>
28
29#include <KoFilter.h>
30#include <KoStore.h>
31
32typedef struct
33{
34 int r;
35 int g;
36 int b;
37
38 int c;
39 int m;
40 int y;
41 int k;
42} t_mycolor;
43
44typedef struct
45{
46 TQStringList tabname;
47 TQStringList rc;
48} t_rc;
49
50
51class APPLIXSPREADImport : public KoFilter {
52
53 TQ_OBJECT
54
55
56public:
57 APPLIXSPREADImport ( TQObject *parent, const char* name, const TQStringList& );
58 virtual ~APPLIXSPREADImport() {}
59
60 virtual KoFilter::ConversionStatus convert( const TQCString& from, const TQCString& to );
61
62protected:
63 TQString nextLine (TQTextStream &);
64 TQChar specCharfind (TQChar , TQChar );
65 void writePen (TQString &, int, int, TQString);
66 TQString writeColor (t_mycolor *);
67 void readTypefaceTable (TQTextStream &, TQStringList &);
68 void readColormap (TQTextStream &, TQPtrList<t_mycolor> &);
69 void readView (TQTextStream &, TQString, t_rc &);
70 void filterSHFGBG (TQString, int *, int *, int *);
71 void transPenFormat (TQString, int *, int *);
72 int readHeader (TQTextStream &);
73 int translateColumnNumber (TQString);
74
75private:
76 int m_stepsize;
77 int m_instep;
78 int m_progress;
79};
80#endif // APPLIXSPREADIMPORT_H