Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes

IE_Imp_OpenDocument Class Reference

Class used to import OpenDocument files. More...

#include <ie_imp_OpenDocument.h>

Inheritance diagram for IE_Imp_OpenDocument:

List of all members.

Public Member Functions

 IE_Imp_OpenDocument (PD_Document *pDocument)
virtual ~IE_Imp_OpenDocument ()
virtual bool pasteFromBuffer (PD_DocumentRange *pDocRange, const unsigned char *pData, UT_uint32 lenData, const char *szEncoding=0)

Protected Member Functions

virtual UT_Error _loadFile (GsfInput *input)
 Import the given file.

Private Member Functions

UT_Error _handleManifestStream ()
 Handle the manifest file.
UT_Error _handleMimetype ()
 Handle the mimetype file.
UT_Error _handleMetaStream ()
 Handle the meta-stream.
UT_Error _handleSettingsStream ()
 Handle the setting-stream.
UT_Error _handleStylesStream ()
 Handle the styles-stream.
UT_Error _handleContentStream ()
 Handle the content-stream.
UT_Error _handleRDFStreams ()
void _setDocumentProperties ()
 Set some document properties.
UT_Error _loadRDFFromFile (GsfInput *pInput, const char *pStream, RDFArguments *args)
UT_Error _handleStream (GsfInfile *pGsfInfile, const char *pStream, UT_XML::Listener &rListener)
 Handle the stream using the listener .
UT_Error _parseStream (GsfInput *pInput, UT_XML &parser)
 Static utility method to read a file/stream embedded inside of the zipfile into an xml parser.

Private Attributes

GsfInfile * m_pGsfInfile
std::string m_sPassword
std::map< std::string,
ODi_Office_Styles m_styles

Detailed Description

Class used to import OpenDocument files.

Constructor & Destructor Documentation

IE_Imp_OpenDocument::IE_Imp_OpenDocument ( PD_Document pDocument  ) 


Referenced by pasteFromBuffer().

IE_Imp_OpenDocument::~IE_Imp_OpenDocument (  )  [virtual]

Member Function Documentation

UT_Error IE_Imp_OpenDocument::_handleContentStream (  )  [private]
UT_Error IE_Imp_OpenDocument::_handleManifestStream (  )  [private]
UT_Error IE_Imp_OpenDocument::_handleMetaStream (  )  [private]
UT_Error IE_Imp_OpenDocument::_handleMimetype (  )  [private]

Handle the mimetype file.

References UT_UTF8String::append(), m_pGsfInfile, UT_DEBUGMSG, and UT_UTF8String::utf8_str().

Referenced by _loadFile().

UT_Error IE_Imp_OpenDocument::_handleSettingsStream (  )  [private]
UT_Error IE_Imp_OpenDocument::_handleStream ( GsfInfile *  pGsfInfile,
const char *  pStream,
UT_XML::Listener rListener 
) [private]

Handle the stream using the listener .

Tries to abstract away how we're actually going to handle how we read the stream, so that the underlying implementation can easily adapt or change

References _parseStream(), ODc_Crypto::decrypt(), m_cryptoInfo, m_sPassword, UT_XML::setListener(), UT_DEBUGMSG, UT_ERROR, UT_OK, and UT_return_val_if_fail.

Referenced by _handleContentStream(), _handleManifestStream(), _handleMetaStream(), _handleSettingsStream(), and _handleStylesStream().

UT_Error IE_Imp_OpenDocument::_handleStylesStream (  )  [private]
UT_Error IE_Imp_OpenDocument::_loadRDFFromFile ( GsfInput *  pInput,
const char *  pStream,
RDFArguments args 
) [private]
UT_Error IE_Imp_OpenDocument::_parseStream ( GsfInput *  pInput,
UT_XML parser 
) [private]

Static utility method to read a file/stream embedded inside of the zipfile into an xml parser.

References UT_XML::parse(), UT_ERROR, UT_OK, and UT_return_val_if_fail.

Referenced by _handleStream().

void IE_Imp_OpenDocument::_setDocumentProperties (  )  [private]

Set some document properties.

The ones that goes on the <abiword> element.

References IE_Imp::getDoc(), PD_Document::setProperties(), and UT_ASSERT_HARMLESS.

Referenced by _loadFile().

bool IE_Imp_OpenDocument::pasteFromBuffer ( PD_DocumentRange pDocRange,
const unsigned char *  pData,
UT_uint32  lenData,
const char *  szEncoding = 0 
) [virtual]

Member Data Documentation

std::map<std::string, ODc_CryptoInfo> IE_Imp_OpenDocument::m_cryptoInfo [private]

The documentation for this class was generated from the following files: