Warning, file /office/calligra/filters/sheets/html/htmlimport.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 /* This file is part of the KDE project
0002    SPDX-FileCopyrightText: 2001 Eva Brucherseifer <eva@kde.org>
0003    SPDX-FileCopyrightText: 2005 Bram Schoenmakers <bramschoenmakers@kde.nl>
0004    based on kspread csv export filter by David Faure
0005 
0006    SPDX-License-Identifier: LGPL-2.0-or-later
0007 */
0008 
0009 #ifndef HTMLIMPORT_H
0010 #define HTMLIMPORT_H
0011 
0012 #include <QObject>
0013 #include <KoFilter.h>
0014 #include <QDir>
0015 #include <QUrl>
0016 #include <QByteArray>
0017 #include <QStack>
0018 #include <QVariantList>
0019 
0020 // namespace Calligra::Sheets
0021 // {
0022 // class Sheet;
0023 // }
0024 
0025 class KoOdfWriteStore;
0026 class KoXmlWriter;
0027 class KoGenStyles;
0028 class QDomNode;
0029 class QDomElement;
0030 
0031 class HTMLImport : public KoFilter
0032 {
0033     Q_OBJECT
0034 public:
0035     HTMLImport(QObject* parent, const QVariantList&);
0036     virtual ~HTMLImport();
0037 
0038     KoFilter::ConversionStatus convert(const QByteArray& from, const QByteArray& to) override;
0039 
0040 Q_SIGNALS:
0041     void completed();
0042 
0043 private:
0044     KoFilter::ConversionStatus loadUrl(const QUrl &url);
0045     void parseNode(QDomNode n);
0046     bool parseTag(QDomElement e);
0047     bool createStyle();
0048     bool createMeta();
0049 private:
0050     enum State { InNone, InFrameset, InBody, InTable, InRow, InCell };
0051     QStack<State> m_states;
0052     
0053     QDir m_inputDir;    
0054     KoOdfWriteStore* m_store;
0055     KoXmlWriter* m_manifestWriter;
0056     KoGenStyles* m_mainStyles;
0057 };
0058 
0059 #endif
0060