filters

KWEFBaseWorker.h
1/*
2 This file is part of the KDE project
3 Copyright 2001, 2002, 2003, 2004 Nicolas GOUTTE <goutte@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 * Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KWEF_BASEWORKER_H
22#define KWEF_BASEWORKER_H
23
24#include <tqstring.h>
25#include <tqiodevice.h>
26
27#include <KWEFStructures.h>
28#include <koffice_export.h>
29
30class KWEFKWordLeader;
31
35class KOFFICEFILTER_EXPORT KWEFBaseWorker
36{
37 public:
38 KWEFBaseWorker(void) : m_kwordLeader(NULL) {}
39 virtual ~KWEFBaseWorker(void) {}
40 public:
41 void registerKWordLeader(KWEFKWordLeader* leader);
42 public: // callbacks to Leader
43 bool loadSubFile(const TQString& fileName, TQByteArray& array) const;
44 TQIODevice* getSubFileDevice(const TQString& fileName) const;
45 public: // indirect callbacks to Leader:
46 TQImage loadAndConvertToImage(const TQString& strName, const TQString& inExtension) const;
47 bool loadAndConvertToImage(const TQString& strName, const TQString& inExtension, const TQString& outExtension, TQByteArray& image) const;
48 public: // leader/worker functions
49 virtual bool doOpenFile (const TQString& filenameOut, const TQString& to);
50 virtual bool doCloseFile (void); // Close file in normal conditions
51 virtual bool doAbortFile (void); // Close file after errors
52 virtual bool doOpenDocument (void); // Like HTML's <html>
53 virtual bool doCloseDocument (void); // Like HTML's </html>
54 virtual bool doOpenTextFrameSet (void); // Like AbiWord's <section>
55 virtual bool doCloseTextFrameSet (void); // Like AbiWord's </section>
56 virtual bool doFullDocumentInfo (const KWEFDocumentInfo &docInfo);
57 virtual bool doVariableSettings (const VariableSettingsData &varSettings);
58 virtual bool doFullDocument (const TQValueList<ParaData> &);
59 virtual bool doFullAllParagraphs (const TQValueList<ParaData>& paraList);
60 virtual bool doFullParagraph(const TQString& paraText, const LayoutData& layout,
61 const ValueListFormatData& paraFormatDataList);
62 virtual bool doFullPaperFormat (const int format,
63 const double width, const double height, const int orientation);
64 virtual bool doFullPaperBorders (const double top, const double left,
65 const double bottom, const double right);
70 virtual bool doFullPaperFormatOther ( const int columns, const double columnspacing, const int numPages );
71 virtual bool doPageInfo(const int headerType, const int footerType);
72 virtual bool doHeader(const HeaderData& header);
73 virtual bool doFooter(const FooterData& footer);
74 virtual bool doOpenHead (void);
75 virtual bool doCloseHead (void);
76 virtual bool doOpenBody (void);
77 virtual bool doCloseBody (void);
78 virtual bool doOpenStyles (void);
79 virtual bool doCloseStyles (void);
80 virtual bool doFullDefineStyle (LayoutData& layout);
81 virtual bool doOpenSpellCheckIgnoreList (void);
82 virtual bool doCloseSpellCheckIgnoreList (void);
83 virtual bool doFullSpellCheckIgnoreWord (const TQString& ignoreword);
84 virtual bool doDeclareNonInlinedFramesets( TQValueList<FrameAnchor>& pictureAnchors, TQValueList<FrameAnchor>& tableAnchors );
85 protected:
86 KWEFKWordLeader* m_kwordLeader;
87};
88
89#endif /* KWEF_BASEWORKER_H */
virtual bool doCloseSpellCheckIgnoreList(void)
like AbiWord's </ignorewords> and Kwords </SPELLCHECKIGNORELIST>
virtual bool doFullPaperBorders(const double top, const double left, const double bottom, const double right)
Like KWord's <PAPERBORDERS>.
virtual bool doOpenSpellCheckIgnoreList(void)
like AbiWord's <ignorewords> and KWord's <SPELLCHECKIGNORELIST>
virtual bool doCloseBody(void)
Like HTML's </BODY>.
virtual bool doFullPaperFormat(const int format, const double width, const double height, const int orientation)
Like AbiWord's <papersize>.
virtual bool doFullDefineStyle(LayoutData &layout)
Defines a single style.
virtual bool doCloseHead(void)
Like HTML's </HEAD>.
virtual bool doOpenHead(void)
Like HTML's <HEAD>.
virtual bool doFullPaperFormatOther(const int columns, const double columnspacing, const int numPages)
Other data of KWord's <PAPER> which are not in.
virtual bool doOpenStyles(void)
Like HTML's <style>.
virtual bool doDeclareNonInlinedFramesets(TQValueList< FrameAnchor > &pictureAnchors, TQValueList< FrameAnchor > &tableAnchors)
virtual bool doFullSpellCheckIgnoreWord(const TQString &ignoreword)
like AbiWord's <iw> and Kwords </SPELLCHECKIGNOREWORD>
virtual bool doCloseStyles(void)
Like HTML's </style>.
virtual bool doOpenBody(void)
Like HTML's <BODY>.
Paragraph layout.
see <VARIABLESETTINGS> in the KWord DTD