filters

KWEFKWordLeader.h

00001 /*
00002    This file is part of the KDE project
00003    Copyright (C) 2001. 2002, 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_KWORDLEADER_H
00022 #define KWEF_KWORDLEADER_H
00023 
00024 #include <qiodevice.h>
00025 
00026 #include <KoFilterChain.h>
00027 
00028 #include "KWEFStructures.h"
00029 #include "KWEFBaseWorker.h"
00030 #include <koffice_export.h>
00031 
00032 class KOFFICEFILTER_EXPORT KWEFKWordLeader
00033 {
00034     public:
00035         KWEFKWordLeader(void);
00036         KWEFKWordLeader(KWEFBaseWorker* newWorker);
00037         virtual ~KWEFKWordLeader(void);
00038     public:
00039         void setWorker ( KWEFBaseWorker *newWorker );
00040         KWEFBaseWorker *getWorker(void) const;
00041         KoFilter::ConversionStatus convert( KoFilterChain* chain,
00042             const QCString& from, const QCString& to);
00043     public: // ### TODO: where to put in the end?
00044         void createBookmarkFormatData( ParaData& paraData );
00045     public: // callbacks
00046         bool loadSubFile(const QString& fileName, QByteArray& array);
00047         QIODevice* getSubFileDevice(const QString& fileName);
00048     public: // public leader/worker functions (DO NOT use in your own code!)
00049         bool doFullDocumentInfo (const KWEFDocumentInfo &docInfo);
00050     bool doVariableSettings (const VariableSettingsData &varSettings);
00051         bool doFullDocument (const QValueList<ParaData> &);
00052     bool doPageInfo (const int headerType, const int footerType);
00053         bool doFullPaperFormat (const int format, const double width, const double height, const int orientation);
00054         bool doFullPaperBorders (const double top, const double left, const double bottom, const double right);
00059         bool doFullPaperFormatOther ( const int columns, const double columnspacing, const int numPages );
00060         bool doOpenHead (void);
00061         bool doCloseHead (void);
00062         bool doOpenBody (void);
00063         bool doCloseBody (void);
00064         bool doOpenStyles (void);
00065         bool doCloseStyles (void);
00066         bool doFullDefineStyle (LayoutData& layout);
00067         bool doOpenSpellCheckIgnoreList (void);
00068         bool doCloseSpellCheckIgnoreList (void);
00069         bool doFullSpellCheckIgnoreWord (const QString& ignoreword);
00070         bool doHeader(const HeaderData&);
00071         bool doFooter(const FooterData&);
00072         bool doDeclareNonInlinedFramesets( QValueList<FrameAnchor>& pictureAnchors, QValueList<FrameAnchor>& tableAnchors ); 
00073 
00074         QValueList<FootnoteData> footnoteList;
00075 
00076         void setHeaderType(int hType) { m_hType = hType; }
00077         void setFooterType(int fType) { m_fType = fType; }
00078         int headerType() { return m_hType; }
00079         int footerType() { return m_fType; }
00080 
00081     protected: // leader/worker functions
00082         bool doOpenFile (const QString& filenameOut, const QString& to);
00083         bool doCloseFile (void);
00084         bool doAbortFile (void);
00085         bool doOpenDocument (void);
00086         bool doCloseDocument (void);
00087     public:
00089         int m_syntaxVersion;
00091         bool m_oldSyntax;
00093         QString m_currentFramesetName;
00095         QMap<QString,int> m_paraCountMap;
00097         QValueList<Bookmark> m_bookmarkList;
00098         QStringList m_unanchoredFramesets; 
00099         QValueList<FrameAnchor> m_nonInlinedPictureAnchors; 
00100         QValueList<FrameAnchor> m_nonInlinedTableAnchors; 
00101     private:
00102         KWEFBaseWorker *m_worker;
00103         KoFilterChain* m_chain;
00104         int m_hType, m_fType;
00105 };
00106 
00107 #endif /* KWEF_KWORDLEADER_H */
KDE Home | KDE Accessibility Home | Description of Access Keys