filters

kspread/html/htmlexport.h
1/* This file is part of the KDE project
2 Copyright (C) 2001 Eva Brucherseifer <eva@kde.org>
3 Copyright (C) 2005 Bram Schoenmakers <bramschoenmakers@kde.nl>
4 based on kspread csv export filter by David Faure
5
6 This library is free software; you can redistribute it and/or
7 modify it under the terms of the GNU Library General Public
8 License as published by the Free Software Foundation; either
9 version 2 of the License, or (at your option) any later version.
10
11 This library is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 Library General Public License for more details.
15
16 You should have received a copy of the GNU Library General Public License
17 along with this library; see the file COPYING.LIB. If not, write to
18 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20*/
21
22#ifndef HTMLEXPORT_TEST_H
23#define HTMLEXPORT_TEST_H
24
25#include <KoFilter.h>
26
27class ExportDialog;
28class KoDocument;
29
30namespace KSpread
31{
32class Sheet;
33}
34
35class HTMLExport : public KoFilter {
36 TQ_OBJECT
37
38public:
39 HTMLExport(KoFilter *parent, const char*name, const TQStringList&);
40 virtual ~HTMLExport();
41
42 virtual KoFilter::ConversionStatus convert( const TQCString& from, const TQCString& to );
43 private:
45 void openPage( KSpread::Sheet *sheet,KoDocument *document, TQString &str);
46
48 void closePage( TQString &);
49
53 void convertSheet( KSpread::Sheet *sheet, TQString &str, int, int);
54
56 void createSheetSeparator( TQString & );
57
59 void writeTOC( const TQStringList &, const TQString &, TQString & );
60
65 TQString fileName( const TQString &base, const TQString &, bool );
66
71 void detectFilledCells( KSpread::Sheet *sheet, int &rows, int &colums );
72 private:
73 ExportDialog *m_dialog;
74
75 typedef TQMap<TQString,int> Rows;
76 Rows m_rowmap;
77 typedef TQMap<TQString,int> Columns;
78 Columns m_columnmap;
79};
80
81#endif
82