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

ie_imp_OpenDocument.h

Go to the documentation of this file.
00001 /* AbiSource
00002  *
00003  * Copyright (C) 2002 Dom Lachowicz <cinamod@hotmail.com>
00004  * Copyright (C) 2004 Robert Staudinger <robsta@stereolyzer.net>
00005  * Copyright (C) 2005 Daniel d'Andrada T. de Carvalho
00006  * <daniel.carvalho@indt.org.br>
00007  *
00008  * This program is free software; you can redistribute it and/or
00009  * modify it under the terms of the GNU General Public License
00010  * as published by the Free Software Foundation; either version 2
00011  * of the License, or (at your option) any later version.
00012  *
00013  * This program is distributed in the hope that it will be useful,
00014  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00015  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016  * GNU General Public License for more details.
00017  *
00018  * You should have received a copy of the GNU General Public License
00019  * along with this program; if not, write to the Free Software
00020  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00021  * 02110-1301 USA.
00022  */
00023 
00024 
00025 #ifndef _IE_IMP_OPENDOCUMENT_H_
00026 #define _IE_IMP_OPENDOCUMENT_H_
00027 
00028 #include <map>
00029 #include <string>
00030 
00031 // Internal includes
00032 #include "../../common/xp/ODc_Crypto.h"
00033 #include "ODi_Office_Styles.h"
00034 #include "ODi_Abi_Data.h"
00035 
00036 // AbiWord inlcudes
00037 #include <ie_imp.h>
00038 
00039 // External includes
00040 #include <gsf/gsf.h>
00041 
00042 // Internal classes
00043 class ODi_StreamListener;
00044 class RDFArguments;
00045 
00046 
00050 class IE_Imp_OpenDocument : public IE_Imp
00051 {
00052 public:
00053 
00054     IE_Imp_OpenDocument (PD_Document * pDocument);
00055     virtual ~IE_Imp_OpenDocument ();
00056    virtual bool   pasteFromBuffer(PD_DocumentRange * pDocRange,
00057                 const unsigned char * pData,
00058                 UT_uint32 lenData,
00059                 const char * szEncoding = 0);
00060 
00061  protected:
00062     virtual UT_Error _loadFile(GsfInput * input);
00063 
00064 private:
00065 
00066     UT_Error _handleManifestStream ();
00067     UT_Error _handleMimetype ();
00068     UT_Error _handleMetaStream ();
00069     UT_Error _handleSettingsStream ();
00070     UT_Error _handleStylesStream ();
00071     UT_Error _handleContentStream ();
00072     UT_Error _handleRDFStreams ();
00073     void _setDocumentProperties();
00074 
00075     UT_Error _loadRDFFromFile ( GsfInput* pInput,
00076                                 const char * pStream,
00077                                 RDFArguments* args );
00078 
00079     UT_Error _handleStream(GsfInfile* pGsfInfile,
00080                    const char* pStream, UT_XML::Listener& rListener);
00081 
00082     UT_Error _parseStream(GsfInput* pInput, UT_XML & parser);
00083 
00084     GsfInfile* m_pGsfInfile;
00085 
00086     std::string m_sPassword;
00087     std::map<std::string, ODc_CryptoInfo> m_cryptoInfo;
00088     ODi_StreamListener* m_pStreamListener;
00089     ODi_Office_Styles m_styles;
00090     ODi_Abi_Data* m_pAbiData;
00091 
00092 };
00093 
00094 #endif //_IE_IMP_OPENDOCUMENT_H_

Generated on Sun Feb 14 2021 for AbiWord by  doxygen 1.7.1