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

ie_imp_GOChart.h

Go to the documentation of this file.
00001 /* -*- mode: C++; tab-width: 4; c-basic-offset: 4; -*- */
00002 
00003 /* AbiWord
00004  * Copyright (C) 1998 AbiSource, Inc.
00005  * Copyright (C) 2004 Martin Sevior <msevior@physics.unimelb.edu.au>
00006  *
00007  * This program is free software; you can redistribute it and/or
00008  * modify it under the terms of the GNU General Public License
00009  * as published by the Free Software Foundation; either version 2
00010  * of the License, or (at your option) any later version.
00011  *
00012  * This program is distributed in the hope that it will be useful,
00013  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  * GNU General Public License for more details.
00016  *
00017  * You should have received a copy of the GNU General Public License
00018  * along with this program; if not, write to the Free Software
00019  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
00020  * 02111-1307, USA.
00021  */
00022 
00023 
00024 #ifndef IE_IMP_GOChart_H
00025 #define IE_IMP_GOChart_H
00026 
00027 #include <stdio.h>
00028 #include "ie_imp.h"
00029 #include "ut_mbtowc.h"
00030 #include "pd_Document.h"
00031 class  UT_ByteBuf;
00032 class  ImportStream;
00033 
00034 // The importer/reader for Embedable Objects.
00035 
00036 class IE_Imp_Object_Sniffer : public IE_ImpSniffer
00037 {
00038     friend class IE_Imp;
00039     friend class IE_Imp_Object;
00040 
00041 public:
00042     IE_Imp_Object_Sniffer();
00043     virtual ~IE_Imp_Object_Sniffer() {}
00044 
00045     virtual const IE_SuffixConfidence * getSuffixConfidence ();
00046 
00047     virtual const IE_MimeConfidence * getMimeConfidence ();
00048 
00049     virtual UT_Confidence_t recognizeContents (const char * szBuf,
00050                                     UT_uint32 iNumbytes);
00051     const char * recognizeContentsType (const char * szBuf,
00052                                     UT_uint32 iNumbytes);
00053     virtual bool getDlgLabels (const char ** szDesc,
00054                                const char ** szSuffixList,
00055                                IEFileType * ft);
00056     virtual UT_Error constructImporter (PD_Document * pDocument,
00057                                         IE_Imp ** ppie);
00058 
00059 protected:
00060     enum UCS2_Endian { UE_BigEnd = -1, UE_NotUCS = 0, UE_LittleEnd };
00061 
00062     static bool _recognizeUTF8 (const char * szBuf,
00063                                 UT_uint32 iNumbytes);
00064     static UCS2_Endian _recognizeUCS2 (const char * szBuf,
00065                                        UT_uint32 iNumbytes,
00066                                        bool bDeep);
00067 };
00068 
00069 // The importer/reader for GNOME-Office charts.
00070 
00071 class IE_Imp_Object : public IE_Imp
00072 {
00073 public:
00074     IE_Imp_Object(PD_Document * pDocument);
00075     virtual ~IE_Imp_Object();
00076 
00077     virtual bool        pasteFromBuffer(PD_DocumentRange * pDocRange,
00078                                         const unsigned char * pData, UT_uint32 lenData, const char * szEncoding = 0);
00079     UT_ByteBuf *        getByteBuf(void) const {return m_pByteBuf;}
00080 
00081 protected:
00082     virtual UT_Error    _loadFile (GsfInput * input);
00083     UT_Error            _parseStream(ImportStream * pStream);
00084 
00085  private:
00086     UT_ByteBuf *        m_pByteBuf;
00087 };
00088 
00089 #endif /* IE_IMP_MATHML_H */

Generated on Sun May 27 2012 for AbiWord by  doxygen 1.7.1