filters

htmlexport.h

00001 /* This file is part of the KDE project
00002    Copyright (C) 2001 Eva Brucherseifer <eva@kde.org>
00003    Copyright (C) 2005 Bram Schoenmakers <bramschoenmakers@kde.nl>
00004    based on kspread csv export filter by David Faure
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 #ifndef HTMLEXPORT_TEST_H
00023 #define HTMLEXPORT_TEST_H
00024 
00025 #include <KoFilter.h>
00026 
00027 class ExportDialog;
00028 class KoDocument;
00029 
00030 namespace KSpread
00031 {
00032 class Sheet;
00033 }
00034 
00035 class HTMLExport : public KoFilter {
00036     Q_OBJECT
00037 public:
00038     HTMLExport(KoFilter *parent, const char*name, const QStringList&);
00039     virtual ~HTMLExport();
00040 
00041     virtual KoFilter::ConversionStatus convert( const QCString& from, const QCString& to );
00042   private:
00044     void openPage( KSpread::Sheet *sheet,KoDocument *document, QString &str);
00045 
00047     void closePage( QString &);
00048 
00052     void convertSheet( KSpread::Sheet *sheet, QString &str, int, int);
00053 
00055     void createSheetSeparator( QString & );
00056 
00058     void writeTOC( const QStringList &, const QString &, QString & );
00059 
00064     QString fileName(  const QString &base, const QString &, bool );
00065 
00070     void detectFilledCells( KSpread::Sheet *sheet, int &rows, int &colums );
00071   private:
00072     ExportDialog *m_dialog;
00073 
00074     typedef QMap<QString,int> Rows;
00075     Rows m_rowmap;
00076     typedef QMap<QString,int> Columns;
00077     Columns m_columnmap;
00078 };
00079 
00080 #endif
00081 
KDE Home | KDE Accessibility Home | Description of Access Keys