IE_Exp Class Reference

#include <ie_exp.h>

Inheritance diagram for IE_Exp:

IE_Exp_AbiWord_1 IE_Exp_Applix IE_Exp_DocBook IE_Exp_HRText IE_Exp_HTML IE_Exp_KWord_1 IE_Exp_LaTeX IE_Exp_MIF IE_Exp_MsWord_97 IE_Exp_Nroff IE_Exp_OpenDocument IE_Exp_OpenWriter IE_Exp_OpenXML IE_Exp_Passepartout IE_Exp_PDF IE_Exp_Psion IE_Exp_RTF IE_Exp_S5 IE_Exp_Text IE_Exp_WML IE_Exp_WordPerfect IE_Exp_XSL_FO

List of all members.

Public Member Functions

virtual ~IE_Exp ()
UT_Error writeFile (const char *szFilename)
UT_Error writeFile (GsfOutput *fp)
virtual UT_Error copyToBuffer (PD_DocumentRange *pDocRange, UT_ByteBuf *pBuf)
virtual void write (const char *sz)
virtual void write (const char *sz, UT_uint32 length)
virtual char rewindChar (void)
void write (const UT_String &inStr)
virtual char * getFileName (void)
UT_Confidence_t getFidelity () const
void setProps (const char *props)
bool isCopying () const
void populateFields ()
const std::string & getProperty (const std::string &key)

Static Public Member Functions

static IEFileType fileTypeForSuffix (const char *szSuffix)
static IEFileType fileTypeForMimetype (const char *szMimetype)
static IEFileType fileTypeForDescription (const char *szSuffix)
static IEFileType fileTypeForSuffixes (const char *suffixList)
static IE_ExpSniffersnifferForFileType (IEFileType ieft)
static const char * suffixesForFileType (IEFileType ieft)
static const char * descriptionForFileType (IEFileType ieft)
static UT_UTF8String preferredSuffixForFileType (IEFileType ieft)
static UT_Error constructExporter (PD_Document *pDocument, const char *szFilename, IEFileType ieft, IE_Exp **ppie, IEFileType *pieft=NULL)
static UT_Error constructExporter (PD_Document *pDocument, GsfOutput *output, IEFileType ieft, IE_Exp **ppie, IEFileType *pieft=NULL)
static bool enumerateDlgLabels (UT_uint32 ndx, const char **pszDesc, const char **pszSuffixList, IEFileType *ft)
static UT_uint32 getExporterCount (void)
static void registerExporter (IE_ExpSniffer *)
static void unregisterExporter (IE_ExpSniffer *)
static void unregisterAllExporters ()

Protected Member Functions

 IE_Exp (PD_Document *pDocument, UT_Confidence_t fidelity=0)
virtual UT_Error _writeDocument (void)=0
GsfOutput * openFile (const char *szFilename)
virtual GsfOutput * _openFile (const char *szFilename)
virtual UT_uint32 _writeBytes (const UT_Byte *pBytes, UT_uint32 length)
virtual bool _writeBytes (const UT_Byte *sz)
virtual void _abortFile (void)
void _cancelExport ()
bool _closeFile (void)
PD_DocumentgetDoc () const
PD_DocumentRangegetDocRange () const
GsfOutput * getFp ()
 Return the file pointer, for convenience.
void _setByteBuf (UT_ByteBuf *pBuf)
UT_ByteBuf_getByteBuf (void)

Protected Attributes

bool m_error

Private Attributes

PD_Documentm_pDocument
PD_DocumentRangem_pDocRange
UT_ByteBufm_pByteBuf
char * m_szFileName
GsfOutput * m_fp
bool m_bOwnsFp
bool m_bCancelled
std::map< std::string,
std::string > 
m_props_map
UT_Confidence_t m_fidelity
IE_FieldUpdaterm_fieldUpdater


Constructor & Destructor Documentation

IE_Exp::~IE_Exp (  )  [virtual]

IE_Exp::IE_Exp ( PD_Document pDocument,
UT_Confidence_t  fidelity = 0 
) [protected]


Member Function Documentation

IEFileType IE_Exp::fileTypeForSuffix ( const char *  szSuffix  )  [static]

IEFileType IE_Exp::fileTypeForMimetype ( const char *  szMimetype  )  [static]

Find the filetype for the given mimetype.

Parameters:
szMimetype File mimetype
Returns IEFT_AbiWord_1 if no exporter knows this mimetype. Note that more than one exporter may support a mimetype. We return the first one we find. This function should closely resemble IE_Exp::fileTypeForMimetype()

References fileTypeForSuffix(), getExporterCount(), IEFT_Unknown, m_sniffers, s, IE_ExpSniffer::supportsFileType(), IE_ExpSniffer::supportsMIME(), UT_CONFIDENCE_PERFECT, UT_DEBUGMSG, and UT_return_val_if_fail.

Referenced by AP_Convert::convertTo(), getExportFileType(), and s_abi_widget_get_file_type().

IEFileType IE_Exp::fileTypeForDescription ( const char *  szDescription  )  [static]

Find the filetype for the given filetype description.

Parameters:
szDescription Filetype description
Returns IEFT_Unknown if no importer has this description. This function should closely resemble IE_Exp::fileTypeForDescription()

References IE_ExpSniffer::getDlgLabels(), getExporterCount(), IEFT_Unknown, m_sniffers, UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.

IEFileType IE_Exp::fileTypeForSuffixes ( const char *  suffixList  )  [static]

IE_ExpSniffer * IE_Exp::snifferForFileType ( IEFileType  ieft  )  [static]

Find the filetype sniffer for the given filetype.

Parameters:
ieft Filetype
Returns 0 if no exporter knows this filetype. This function should closely resemble IE_Exp::snifferForFileType()

References getExporterCount(), m_sniffers, s, and IE_ExpSniffer::supportsFileType().

Referenced by XAP_UnixDialog_FileOpenSaveAs::_run_gtk_main(), descriptionForFileType(), preferredSuffixForFileType(), and suffixesForFileType().

const char * IE_Exp::suffixesForFileType ( IEFileType  ieft  )  [static]

Find the suffixes for the given filetype.

Parameters:
szSuffix File suffix
Returns 0 if no exporter knows this filetype. This function should closely resemble IE_Exp::suffixesForFileType()

References IE_ExpSniffer::getDlgLabels(), snifferForFileType(), UT_ASSERT_HARMLESS, UT_return_val_if_fail, and UT_SHOULD_NOT_HAPPEN.

Referenced by PD_Document::_syncFileTypes().

const char * IE_Exp::descriptionForFileType ( IEFileType  ieft  )  [static]

Find the description for the given filetype.

Parameters:
ieft Numerical "export filetype" ID
Returns 0 if filetype doesn't exist. This function should closely resemble IE_Exp::descriptionForFileType()

References IE_ExpSniffer::getDlgLabels(), snifferForFileType(), UT_ASSERT_HARMLESS, and UT_SHOULD_NOT_HAPPEN.

UT_UTF8String IE_Exp::preferredSuffixForFileType ( IEFileType  ieft  )  [static]

Find the preferred suffix for the given filetype.

Parameters:
szSuffix File suffix
Returns "" if no exporter knows this filetype.

References IE_ExpSniffer::getPreferredSuffix(), snifferForFileType(), and UT_return_val_if_fail.

Referenced by XAP_UnixDialog_FileOpenSaveAs::_run_gtk_main(), AP_Convert::convertTo(), and XAP_UnixDialog_FileOpenSaveAs::runModal().

UT_Error IE_Exp::constructExporter ( PD_Document pDocument,
const char *  szFilename,
IEFileType  ieft,
IE_Exp **  ppie,
IEFileType pieft = NULL 
) [static]

Construct an exporter of the right type.

Parameters:
pDocument Document
szFilename Name of file - optional
ieft Desired filetype - pass IEFT_Unknown for best guess
ppie Pointer to return importer in
pieft Pointer to fill in actual filetype
Caller is responsible for deleting the exporter object when finished with it. This function should closely match IE_Imp::contructImporter()

References IE_ExpSniffer::constructExporter(), fileTypeForSuffix(), getExporterCount(), IEFT_Bogus, IEFT_Unknown, m_sniffers, s, IE_ExpSniffer::supportsFileType(), UT_ERROR, UT_IE_NOMEMORY, UT_OK, UT_pathSuffix(), and UT_return_val_if_fail.

Referenced by PD_Document::_save(), PD_Document::_saveAs(), abi_widget_get_selection(), and constructExporter().

UT_Error IE_Exp::constructExporter ( PD_Document pDocument,
GsfOutput *  output,
IEFileType  ieft,
IE_Exp **  ppie,
IEFileType pieft = NULL 
) [static]

bool IE_Exp::enumerateDlgLabels ( UT_uint32  ndx,
const char **  pszDesc,
const char **  pszSuffixList,
IEFileType ft 
) [static]

UT_uint32 IE_Exp::getExporterCount ( void   )  [static]

void IE_Exp::registerExporter ( IE_ExpSniffer s  )  [static]

void IE_Exp::unregisterExporter ( IE_ExpSniffer s  )  [static]

void IE_Exp::unregisterAllExporters (  )  [static]

References m_sniffers.

Referenced by IE_ImpExp_UnRegisterXP().

UT_Error IE_Exp::writeFile ( const char *  szFilename  ) 

UT_Error IE_Exp::writeFile ( GsfOutput *  fp  ) 

UT_Error IE_Exp::copyToBuffer ( PD_DocumentRange pDocRange,
UT_ByteBuf pBuf 
) [virtual]

void IE_Exp::write ( const char *  sz  )  [virtual]

Reimplemented in IE_Exp_MsWord_97.

Referenced by s_WML_Listener::_closeAnchor(), s_AbiWord_1_Listener::_closeAnnotation(), s_WML_Listener::_closeBlock(), Text_Listener::_closeBlock(), Passepartout_Listener::_closeBlock(), s_LaTeX_Listener::_closeBlock(), s_KWord_1_Listener::_closeBlock(), s_AbiWord_1_Listener::_closeBlock(), s_WML_Listener::_closeCell(), s_LaTeX_Listener::_closeCell(), s_AbiWord_1_Listener::_closeCell(), s_AbiWord_1_Listener::_closeField(), Passepartout_Listener::_closeFont(), s_WML_Listener::_closeHyperlink(), s_AbiWord_1_Listener::_closeHyperlink(), s_LaTeX_Listener::_closeList(), s_LaTeX_Listener::_closeParagraph(), s_WML_Listener::_closeRow(), s_LaTeX_Listener::_closeSection(), s_KWord_1_Listener::_closeSection(), s_AbiWord_1_Listener::_closeSection(), s_WML_Listener::_closeSpan(), s_LaTeX_Listener::_closeSpan(), s_HRText_Listener::_closeSpan(), s_WML_Listener::_closeTable(), s_LaTeX_Listener::_closeTable(), s_AbiWord_1_Listener::_closeTable(), s_HRText_Listener::_closeTag(), s_AbiWord_1_Listener::_closeTag(), s_HTML_Listener::_doAnnotations(), s_WML_Listener::_emitTOC(), s_HTML_Listener::_emitTOC(), s_RTF_ListenerWriteDoc::_exportCellProps(), s_Applix_Listener::_flush(), s_KWord_1_Listener::_handleAttributes(), s_AbiWord_1_Listener::_handleAuthors(), s_WML_Listener::_handleBookmark(), s_AbiWord_1_Listener::_handleDataItems(), s_WML_Listener::_handleEmbedded(), s_XSL_FO_Listener::_handleField(), s_WML_Listener::_handleField(), s_HTML_Listener::_handleField(), s_DocBook_Listener::_handleField(), s_AbiWord_1_Listener::_handleHistory(), s_WML_Listener::_handleHyperlink(), s_WML_Listener::_handleImage(), s_LaTeX_Listener::_handleImage(), s_DocBook_Listener::_handleImage(), s_AbiWord_1_Listener::_handleLists(), s_WML_Listener::_handleMath(), s_TemplateHandler::_handleMeta(), s_WML_Listener::_handleMetaData(), s_DocBook_Listener::_handleMetaData(), s_AbiWord_1_Listener::_handleMetaData(), s_TemplateHandler::_handleMetaTag(), s_XSL_FO_Listener::_handlePageSize(), s_KWord_1_Listener::_handlePageSize(), s_AbiWord_1_Listener::_handlePageSize(), s_WML_Listener::_handlePositionedImage(), s_DocBook_Listener::_handlePositionedImage(), s_DocBook_Listener::_handleRevisions(), s_AbiWord_1_Listener::_handleRevisions(), s_KWord_1_Listener::_handleStyles(), s_AbiWord_1_Listener::_handleStyles(), s_DocBook_Listener::_handleTOC(), s_DocBook_Listener::_initFile(), s_RTF_ListenerWriteDoc::_newRow(), Passepartout_Listener::_openBlock(), s_KWord_1_Listener::_openBlock(), s_WML_Listener::_openCell(), s_LaTeX_Listener::_openCell(), Passepartout_Listener::_openFont(), s_RTF_ListenerWriteDoc::_openFrame(), s_XSL_FO_Listener::_openListItem(), s_WML_Listener::_openParagraph(), s_LaTeX_Listener::_openParagraph(), s_WML_Listener::_openRow(), s_WML_Listener::_openSection(), s_LaTeX_Listener::_openSection(), s_KWord_1_Listener::_openSection(), s_HRText_Listener::_openSection(), s_WML_Listener::_openSpan(), s_LaTeX_Listener::_openSpan(), s_KWord_1_Listener::_openSpan(), s_HRText_Listener::_openSpan(), s_WML_Listener::_openTable(), s_LaTeX_Listener::_openTable(), s_RTF_ListenerWriteDoc::_openTag(), s_HRText_Listener::_openTag(), s_AbiWord_1_Listener::_openTag(), IE_Exp_RTF::_output_LevelText(), s_LaTeX_Listener::_outputBabelPackage(), s_RTF_ListenerWriteDoc::_outputCellBorders(), s_XSL_FO_Listener::_outputData(), Text_Listener::_outputData(), Passepartout_Listener::_outputData(), s_LaTeX_Listener::_outputData(), s_KWord_1_Listener::_outputData(), s_HRText_Listener::_outputData(), s_DocBook_Listener::_outputData(), s_AbiWord_1_Listener::_outputData(), s_WML_Listener::_outputDataUnchecked(), s_RTF_ListenerWriteDoc::_outputTableBorders(), s_AbiWord_1_Listener::_outputXMLChar(), IE_Exp_RTF::_rtf_chardata(), IE_Exp_RTF::_rtf_close_brace(), IE_Exp_RTF::_rtf_fontname(), s_RTF_ListenerWriteDoc::_rtf_info(), IE_Exp_RTF::_rtf_keyword(), IE_Exp_RTF::_rtf_keyword_hex2(), IE_Exp_RTF::_rtf_keyword_ifnotdefault(), IE_Exp_RTF::_rtf_keyword_ifnotdefault_twips(), IE_Exp_RTF::_rtf_keyword_space(), IE_Exp_RTF::_rtf_nl(), IE_Exp_RTF::_rtf_nonascii_hex2(), IE_Exp_RTF::_rtf_open_brace(), IE_Exp_RTF::_rtf_pcdata(), IE_Exp_RTF::_rtf_semi(), s_XSL_FO_Listener::_tagClose(), s_DocBook_Listener::_tagClose(), s_XSL_FO_Listener::_tagOpen(), s_DocBook_Listener::_tagOpen(), s_XSL_FO_Listener::_tagOpenClose(), s_DocBook_Listener::_tagOpenClose(), IE_Exp_S5::_write(), s_Applix_Listener::_write(), IE_Exp_WordPerfect::_writeDocument(), IE_Exp_Psion::_writeDocument(), IE_Exp_HTML::_writeDocument(), IE_Exp_EML::_writeDocument(), s_RTF_ListenerWriteDoc::_writeFieldPreamble(), s_RTF_ListenerWriteDoc::_writeFieldTrailer(), IE_Exp_S5::_writeFooter(), IE_Exp_S5::_writeHeader(), s_RTF_ListenerWriteDoc::_writeHyperlink(), s_KWord_1_Listener::_writeMarginSize(), IE_Exp_S5::_writeSlide(), s_RTF_ListenerWriteDoc::_writeSPNumProp(), s_TemplateHandler::CharData(), s_TemplateHandler::Comment(), copyToBuffer(), s_TemplateHandler::EndCdataSection(), s_TemplateHandler::EndElement(), IE_Exp_DocBook::iwrite(), s_HTML_Listener::multiBoundary(), s_HTML_Listener::multiBreak(), s_HTML_Listener::multiField(), Passepartout_Listener::Passepartout_Listener(), Text_Listener::populate(), s_RTF_ListenerWriteDoc::populate(), s_LaTeX_Listener::populate(), Text_Listener::populateStrux(), s_LaTeX_Listener::populateStrux(), s_AbiWord_1_Listener::populateStrux(), s_TemplateHandler::ProcessingInstruction(), s_AbiWord_1_Listener::s_AbiWord_1_Listener(), s_KWord_1_Listener::s_KWord_1_Listener(), s_LaTeX_Listener::s_LaTeX_Listener(), s_WML_Listener::s_WML_Listener(), s_XSL_FO_Listener::s_XSL_FO_Listener(), s_TemplateHandler::StartCdataSection(), s_TemplateHandler::StartElement(), s_HTML_Listener::tagClose(), s_HTML_Listener::tagCloseBroken(), s_HTML_Listener::tagOpenClose(), s_HTML_Listener::tagRaw(), s_AbiWord_1_Listener::write_base64(), s_AbiWord_1_Listener::write_xml(), IE_Exp_DocBook::writeln(), Passepartout_Listener::~Passepartout_Listener(), s_AbiWord_1_Listener::~s_AbiWord_1_Listener(), s_KWord_1_Listener::~s_KWord_1_Listener(), s_LaTeX_Listener::~s_LaTeX_Listener(), and s_WML_Listener::~s_WML_Listener().

void IE_Exp::write ( const char *  sz,
UT_uint32  length 
) [virtual]

char IE_Exp::rewindChar ( void   )  [virtual]

This method deletes the last char in the output buffer. The value of the character at the last position is returned.

References UT_ByteBuf::del(), UT_ByteBuf::getLength(), UT_ByteBuf::getPointer(), and m_pByteBuf.

void IE_Exp::write ( const UT_String inStr  )  [inline]

virtual char* IE_Exp::getFileName ( void   )  [inline, virtual]

UT_Confidence_t IE_Exp::getFidelity (  )  const [inline]

void IE_Exp::setProps ( const char *  props  ) 

References m_props_map, and UT_parse_properties().

Referenced by PD_Document::_saveAs().

bool IE_Exp::isCopying (  )  const [inline]

void IE_Exp::populateFields (  ) 

virtual UT_Error IE_Exp::_writeDocument ( void   )  [protected, pure virtual]

GsfOutput * IE_Exp::openFile ( const char *  szFilename  )  [protected]

References _openFile(), file, m_fp, m_szFileName, and UT_return_val_if_fail.

Referenced by writeFile().

GsfOutput * IE_Exp::_openFile ( const char *  szFilename  )  [protected, virtual]

UT_uint32 IE_Exp::_writeBytes ( const UT_Byte pBytes,
UT_uint32  length 
) [protected, virtual]

bool IE_Exp::_writeBytes ( const UT_Byte sz  )  [protected, virtual]

Reimplemented in IE_Exp_PalmDoc, and IE_Exp_MsWord_97.

References _writeBytes().

void IE_Exp::_abortFile ( void   )  [protected, virtual]

void IE_Exp::_cancelExport (  )  [inline, protected]

bool IE_Exp::_closeFile ( void   )  [protected]

PD_Document * IE_Exp::getDoc ( void   )  const [protected]

References m_pDocument.

Referenced by IE_Exp_HTML::_buildStyleTree(), IE_Exp_WordPerfect::_constructListener(), IE_Exp_Text::_constructListener(), IE_Exp_Psion_TextEd::_constructListener(), IE_Exp_Psion_Word::_constructListener(), IE_Exp_Passepartout::_constructListener(), IE_Exp_ISCII::_constructListener(), IE_Exp_Text::_doEncodingDialog(), IE_Exp_HTML::_doOptions(), IE_Exp_RTF::_output_ListRTF(), IE_Exp_RTF::_output_MultiLevelRTF(), IE_Exp_RTF::_output_revision(), IE_Exp_RTF::_output_SimpleListRTF(), IE_Exp_RTF::_selectStyles(), IE_Exp_RTF::_write_charfmt(), IE_Exp_RTF::_write_listtable(), IE_Exp_RTF::_write_parafmt(), IE_Exp_RTF::_write_rtf_header(), IE_Exp_RTF::_write_stylesheets(), IE_Exp_XSL_FO::_writeDocument(), IE_Exp_WordPerfect::_writeDocument(), IE_Exp_WML::_writeDocument(), IE_Exp_Text::_writeDocument(), IE_Exp_S5::_writeDocument(), IE_Exp_Psion::_writeDocument(), IE_Exp_PDF::_writeDocument(), IE_Exp_Passepartout::_writeDocument(), IE_Exp_OpenXML::_writeDocument(), IE_Exp_OpenWriter::_writeDocument(), IE_Exp_OpenDocument::_writeDocument(), IE_Exp_Nroff::_writeDocument(), IE_Exp_MsWord_97::_writeDocument(), IE_Exp_MIF::_writeDocument(), IE_Exp_LaTeX::_writeDocument(), IE_Exp_KWord_1::_writeDocument(), IE_Exp_HTML::_writeDocument(), IE_Exp_HRText::_writeDocument(), IE_Exp_DocBook::_writeDocument(), IE_Exp_Applix::_writeDocument(), IE_Exp_AbiWord_1::_writeDocument(), IE_Exp_RTF::_writeDocumentLocal(), IE_Exp_S5::_writeHeader(), IE_Exp_S5::_writeSlide(), IE_Exp_RTF::exportHdrFtr(), IE_Exp_Text::IE_Exp_Text(), and populateFields().

PD_DocumentRange * IE_Exp::getDocRange (  )  const [protected]

GsfOutput* IE_Exp::getFp (  )  [inline, protected]

void IE_Exp::_setByteBuf ( UT_ByteBuf pBuf  )  [inline, protected]

Referenced by IE_Exp_RTF::setByteBuf().

UT_ByteBuf* IE_Exp::_getByteBuf ( void   )  [inline, protected]

Referenced by IE_Exp_RTF::getByteBuf().

const std::string& IE_Exp::getProperty ( const std::string &  key  )  [inline]


Member Data Documentation

bool IE_Exp::m_error [protected]

Referenced by copyToBuffer(), and getDocRange().

Referenced by copyToBuffer(), rewindChar(), and write().

char* IE_Exp::m_szFileName [private]

GsfOutput* IE_Exp::m_fp [private]

bool IE_Exp::m_bOwnsFp [private]

Referenced by _closeFile(), and writeFile().

bool IE_Exp::m_bCancelled [private]

Referenced by writeFile().

std::map<std::string, std::string> IE_Exp::m_props_map [private]

Referenced by setProps().

Referenced by populateFields(), and ~IE_Exp().


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

Generated on Sat Nov 22 00:07:04 2008 for AbiWord by  doxygen 1.5.5