#include <ie_imp_GOComponent.h>
Public Member Functions | |
IE_Imp_Component (PD_Document *pDocument, char *mime_type=NULL) | |
virtual | ~IE_Imp_Component () |
virtual bool | pasteFromBuffer (PD_DocumentRange *pDocRange, const unsigned char *pData, UT_uint32 lenData, const char *szEncoding=0) |
const UT_ByteBufPtr & | getByteBuf (void) const |
Protected Member Functions | |
virtual UT_Error | _loadFile (GsfInput *input) |
UT_Error | _parseStream (ImportStream *pStream) |
Private Attributes | |
UT_ByteBufPtr | m_pByteBuf |
std::string | m_MimeType |
IE_Imp_Component::IE_Imp_Component | ( | PD_Document * | pDocument, | |
char * | mime_type = NULL | |||
) |
IE_Imp_Component::~IE_Imp_Component | ( | void | ) | [virtual] |
UT_Error IE_Imp_Component::_loadFile | ( | GsfInput * | input | ) | [protected, virtual] |
Implements IE_Imp.
References _parseStream(), ImportStream::init(), and X_CleanupIfError.
UT_Error IE_Imp_Component::_parseStream | ( | ImportStream * | pStream | ) | [protected] |
Parse stream contents into the document
stream | Stream to import from |
This code is used for both files and the clipboard
References UT_String::c_str(), FV_View::cmdInsertEmbed(), FV_View::cmdSelect(), XAP_App::getApp(), ImportStream::getChar(), XAP_Frame::getCurrentView(), XAP_App::getLastFocussedFrame(), FV_View::getPoint(), m_MimeType, m_pByteBuf, mime_types, UT_ERROR, and UT_return_val_if_fail.
Referenced by _loadFile(), and pasteFromBuffer().
const UT_ByteBufPtr& IE_Imp_Component::getByteBuf | ( | void | ) | const [inline] |
References m_pByteBuf.
bool IE_Imp_Component::pasteFromBuffer | ( | PD_DocumentRange * | pDocRange, | |
const unsigned char * | pData, | |||
UT_uint32 | lenData, | |||
const char * | szEncoding = 0 | |||
) | [virtual] |
Reimplemented from IE_Imp.
References _parseStream(), abicollab::service::error(), IE_Imp::getDoc(), ImportStream::init(), PD_DocumentRange::m_pDoc, PD_DocumentRange::m_pos1, PD_DocumentRange::m_pos2, IE_Imp::setClipboard(), and UT_return_val_if_fail.
std::string IE_Imp_Component::m_MimeType [private] |
Referenced by _parseStream().
UT_ByteBufPtr IE_Imp_Component::m_pByteBuf [private] |
Referenced by _parseStream(), and getByteBuf().