filters

KWEFKWordLeader.h
1/*
2 This file is part of the KDE project
3 Copyright (C) 2001. 2002, 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_KWORDLEADER_H
22#define KWEF_KWORDLEADER_H
23
24#include <tqiodevice.h>
25
26#include <KoFilterChain.h>
27
28#include "KWEFStructures.h"
29#include "KWEFBaseWorker.h"
30#include <koffice_export.h>
31
32class KOFFICEFILTER_EXPORT KWEFKWordLeader
33{
34 public:
35 KWEFKWordLeader(void);
36 KWEFKWordLeader(KWEFBaseWorker* newWorker);
37 virtual ~KWEFKWordLeader(void);
38 public:
39 void setWorker ( KWEFBaseWorker *newWorker );
40 KWEFBaseWorker *getWorker(void) const;
41 KoFilter::ConversionStatus convert( KoFilterChain* chain,
42 const TQCString& from, const TQCString& to);
43 public: // ### TODO: where to put in the end?
44 void createBookmarkFormatData( ParaData& paraData );
45 public: // callbacks
46 bool loadSubFile(const TQString& fileName, TQByteArray& array);
47 TQIODevice* getSubFileDevice(const TQString& fileName);
48 public: // public leader/worker functions (DO NOT use in your own code!)
49 bool doFullDocumentInfo (const KWEFDocumentInfo &docInfo);
50 bool doVariableSettings (const VariableSettingsData &varSettings);
51 bool doFullDocument (const TQValueList<ParaData> &);
52 bool doPageInfo (const int headerType, const int footerType);
53 bool doFullPaperFormat (const int format, const double width, const double height, const int orientation);
54 bool doFullPaperBorders (const double top, const double left, const double bottom, const double right);
59 bool doFullPaperFormatOther ( const int columns, const double columnspacing, const int numPages );
60 bool doOpenHead (void);
61 bool doCloseHead (void);
62 bool doOpenBody (void);
63 bool doCloseBody (void);
64 bool doOpenStyles (void);
65 bool doCloseStyles (void);
66 bool doFullDefineStyle (LayoutData& layout);
67 bool doOpenSpellCheckIgnoreList (void);
68 bool doCloseSpellCheckIgnoreList (void);
69 bool doFullSpellCheckIgnoreWord (const TQString& ignoreword);
70 bool doHeader(const HeaderData&);
71 bool doFooter(const FooterData&);
72 bool doDeclareNonInlinedFramesets( TQValueList<FrameAnchor>& pictureAnchors, TQValueList<FrameAnchor>& tableAnchors );
73
74 TQValueList<FootnoteData> footnoteList;
75
76 void setHeaderType(int hType) { m_hType = hType; }
77 void setFooterType(int fType) { m_fType = fType; }
78 int headerType() { return m_hType; }
79 int footerType() { return m_fType; }
80
81 protected: // leader/worker functions
82 bool doOpenFile (const TQString& filenameOut, const TQString& to);
83 bool doCloseFile (void);
84 bool doAbortFile (void);
85 bool doOpenDocument (void);
86 bool doCloseDocument (void);
87 public:
89 int m_syntaxVersion;
91 bool m_oldSyntax;
93 TQString m_currentFramesetName;
95 TQMap<TQString,int> m_paraCountMap;
97 TQValueList<Bookmark> m_bookmarkList;
98 TQStringList m_unanchoredFramesets;
99 TQValueList<FrameAnchor> m_nonInlinedPictureAnchors;
100 TQValueList<FrameAnchor> m_nonInlinedTableAnchors;
101 private:
102 KWEFBaseWorker *m_worker;
103 KoFilterChain* m_chain;
104 int m_hType, m_fType;
105};
106
107#endif /* KWEF_KWORDLEADER_H */