filters

KWEFBaseWorker.h

00001 /*
00002    This file is part of the KDE project
00003    Copyright 2001, 2002, 2003, 2004 Nicolas GOUTTE <goutte@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Library General Public
00007    License as published by the Free Software Foundation; either
00008    version 2 of the License, or (at your option) any later version.
00009 
00010    This library is distributed in the hope that it will be useful,
00011    but WITHOUT ANY WARRANTY; without even the implied warranty of
00012    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013    Library General Public License for more details.
00014 
00015    You should have received a copy of the GNU Library General Public License
00016    along with this library; see the file COPYING.LIB.  If not, write to
00017    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00018  * Boston, MA 02110-1301, USA.
00019 */
00020 
00021 #ifndef KWEF_BASEWORKER_H
00022 #define KWEF_BASEWORKER_H
00023 
00024 #include <qstring.h>
00025 #include <qiodevice.h>
00026 
00027 #include <KWEFStructures.h>
00028 #include <koffice_export.h>
00029 
00030 class KWEFKWordLeader;
00031 
00035 class KOFFICEFILTER_EXPORT KWEFBaseWorker
00036 {
00037     public:
00038         KWEFBaseWorker(void) : m_kwordLeader(NULL) {}
00039         virtual ~KWEFBaseWorker(void) {}
00040     public:
00041         void registerKWordLeader(KWEFKWordLeader* leader);
00042     public: // callbacks to Leader
00043         bool loadSubFile(const QString& fileName, QByteArray& array) const;
00044         QIODevice* getSubFileDevice(const QString& fileName) const;
00045     public: // indirect callbacks to Leader:
00046         QImage loadAndConvertToImage(const QString& strName, const QString& inExtension) const;
00047         bool loadAndConvertToImage(const QString& strName, const QString& inExtension, const QString& outExtension, QByteArray& image) const;
00048     public: // leader/worker functions
00049         virtual bool doOpenFile (const QString& filenameOut, const QString& to);
00050         virtual bool doCloseFile (void); // Close file in normal conditions
00051         virtual bool doAbortFile (void); // Close file after errors
00052         virtual bool doOpenDocument (void); // Like HTML's <html>
00053         virtual bool doCloseDocument (void); // Like HTML's </html>
00054         virtual bool doOpenTextFrameSet (void); // Like AbiWord's <section>
00055         virtual bool doCloseTextFrameSet (void); // Like AbiWord's </section>
00056         virtual bool doFullDocumentInfo (const KWEFDocumentInfo &docInfo);
00057     virtual bool doVariableSettings (const VariableSettingsData &varSettings);
00058         virtual bool doFullDocument (const QValueList<ParaData> &);
00059         virtual bool doFullAllParagraphs (const QValueList<ParaData>& paraList);
00060         virtual bool doFullParagraph(const QString& paraText, const LayoutData& layout,
00061             const ValueListFormatData& paraFormatDataList);
00062         virtual bool doFullPaperFormat (const int format,
00063             const double width, const double height, const int orientation); 
00064         virtual bool doFullPaperBorders (const double top, const double left,
00065             const double bottom, const double right); 
00066 
00070         virtual bool doFullPaperFormatOther ( const int columns, const double columnspacing, const int numPages );
00071         virtual bool doPageInfo(const int headerType, const int footerType);
00072         virtual bool doHeader(const HeaderData& header);
00073         virtual bool doFooter(const FooterData& footer);
00074         virtual bool doOpenHead (void); 
00075         virtual bool doCloseHead (void); 
00076         virtual bool doOpenBody (void); 
00077         virtual bool doCloseBody (void); 
00078         virtual bool doOpenStyles (void); 
00079         virtual bool doCloseStyles (void); 
00080         virtual bool doFullDefineStyle (LayoutData& layout); 
00081         virtual bool doOpenSpellCheckIgnoreList (void); 
00082         virtual bool doCloseSpellCheckIgnoreList (void); 
00083         virtual bool doFullSpellCheckIgnoreWord (const QString& ignoreword); 
00084         virtual bool doDeclareNonInlinedFramesets( QValueList<FrameAnchor>& pictureAnchors, QValueList<FrameAnchor>& tableAnchors ); 
00085     protected:
00086         KWEFKWordLeader* m_kwordLeader;
00087 };
00088 
00089 #endif /* KWEF_BASEWORKER_H */
KDE Home | KDE Accessibility Home | Description of Access Keys