• Main Page
  • Related Pages
  • Namespaces
  • Classes
  • Files
  • File List
  • File Members

ie_imp_KWord_1.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 2001 AbiSource, Inc.
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License
00008  * as published by the Free Software Foundation; either version 2
00009  * of the License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00019  * 02110-1301 USA.
00020  */
00021 
00022 
00023 #ifndef IE_IMP_KWORD_1_H
00024 #define IE_IMP_KWORD_1_H
00025 
00026 #include "ut_string_class.h"
00027 #include "ie_imp_XML.h"
00028 
00029 class PD_Document;
00030 
00031 // The importer/reader for KWord 1.0 files.
00032 
00033 class IE_Imp_KWord_1_Sniffer : public IE_ImpSniffer
00034 {
00035     friend class IE_Imp;
00036 
00037 public:
00038     IE_Imp_KWord_1_Sniffer(const char * name);
00039     virtual ~IE_Imp_KWord_1_Sniffer() {}
00040 
00041     virtual const IE_SuffixConfidence * getSuffixConfidence ();
00042     virtual const IE_MimeConfidence * getMimeConfidence ();
00043     virtual UT_Confidence_t recognizeContents (const char * szBuf,
00044                                     UT_uint32 iNumbytes);
00045     virtual bool getDlgLabels (const char ** szDesc,
00046                                const char ** szSuffixList,
00047                                IEFileType * ft);
00048     virtual UT_Error constructImporter (PD_Document * pDocument,
00049                                         IE_Imp ** ppie);
00050 
00051 };
00052 
00053 class IE_Imp_KWord_1 : public IE_Imp_XML
00054 {
00055 public:
00056   IE_Imp_KWord_1(PD_Document * pDocument);
00057   virtual ~IE_Imp_KWord_1();
00058 
00059   void startElement(const gchar *name, const gchar **atts);
00060   void endElement(const gchar *name);
00061   void charData(const gchar*, int len);
00062 
00063 private:
00064 
00065   void _appendText ();
00066 
00067   UT_UCS4String m_szTextBuffer;
00068   UT_String m_szCharProps;
00069   UT_String m_szSectProps;
00070   UT_String m_ParaProps;
00071   bool m_bInText;
00072 };
00073 
00074 #endif /* IE_IMP_KWORD_1_H */

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1