#include <ie_exp_EPUB.h>
Public Member Functions | |
IE_Exp_EPUB (PD_Document *pDocument) | |
virtual | ~IE_Exp_EPUB () |
Protected Member Functions | |
virtual UT_Error | _writeDocument () |
Private Member Functions | |
UT_Error | writeStructure () |
UT_Error | writeNavigation () |
UT_Error | writeContainer () |
UT_Error | package () |
UT_Error | compress () |
UT_Error | EPUB2_writeStructure () |
UT_Error | EPUB2_writeNavigation () |
UT_Error | EPUB3_writeStructure () |
UT_Error | EPUB3_writeNavigation () |
std::string | getAuthor () const |
std::string | getTitle () const |
std::string | getLanguage () const |
UT_Error | doOptions () |
void | registerDialogs () |
Static Private Member Functions | |
static std::vector< std::string > | getFileList (const std::string &directory) |
static void | closeNTags (GsfXMLOut *xml, int n) |
static std::string | escapeForId (const std::string &src) |
static std::string | getMimeType (const std::string &uri) |
Private Attributes | |
std::string | m_baseTempDir |
std::string | m_oebpsDir |
GsfOutfile * | m_root |
GsfOutput * | m_oebps |
IE_Exp_HTML * | m_pHmtlExporter |
std::vector< std::string > | m_opsId |
XAP_Dialog_Id | m_iDialogExport |
XAP_Exp_EpubExportOptions | m_exp_opt |
IE_Exp_EPUB::IE_Exp_EPUB | ( | PD_Document * | pDocument | ) |
IE_Exp_EPUB::~IE_Exp_EPUB | ( | ) | [virtual] |
References DELETEP, and m_pHmtlExporter.
UT_Error IE_Exp_EPUB::_writeDocument | ( | void | ) | [protected, virtual] |
Implements IE_Exp.
References doOptions(), EPUB_MIMETYPE, IE_Exp::getDoc(), AD_Document::getDocUUIDString(), IE_Exp::getFp(), m_baseTempDir, m_oebps, m_root, package(), UT_DEBUGMSG, UT_go_directory_create(), UT_go_file_remove(), UT_go_filename_to_uri(), UT_OK, UT_SAVE_CANCELLED, writeContainer(), writeNavigation(), and writeStructure().
void IE_Exp_EPUB::closeNTags | ( | GsfXMLOut * | xml, | |
int | n | |||
) | [static, private] |
Referenced by EPUB2_writeNavigation(), and EPUB3_writeNavigation().
UT_Error IE_Exp_EPUB::compress | ( | ) | [private] |
References file, getFileList(), m_oebps, m_oebpsDir, UT_DEBUGMSG, UT_go_file_open(), UT_go_file_remove(), and UT_go_filename_from_uri().
Referenced by package().
UT_Error IE_Exp_EPUB::doOptions | ( | ) | [private] |
References GR_Graphics::DGP_PAPER, XAP_App::getApp(), XAP_Frame::getCurrentView(), XAP_App::getDialogFactory(), AV_View::getGraphics(), XAP_App::getLastFocussedFrame(), IE_Exp::isCopying(), m_exp_opt, m_iDialogExport, GR_Graphics::queryProperties(), XAP_DialogFactory::releaseDialog(), XAP_DialogFactory::requestDialog(), AP_Dialog_EpubExportOptions::runModal(), AP_Dialog_EpubExportOptions::setEpubExportOptions(), and AP_Dialog_EpubExportOptions::shouldSave().
Referenced by _writeDocument().
UT_Error IE_Exp_EPUB::EPUB2_writeNavigation | ( | ) | [private] |
References XAP_Exp_EpubExportOptions::bSplitDocument, closeNTags(), escapeForId(), getAuthor(), IE_Exp::getDoc(), IE_Exp_HTML_NavigationHelper::getFilenameByPosition(), IE_Exp_HTML::getNavigationHelper(), IE_TOCHelper::getNthTOCEntry(), IE_TOCHelper::getNthTOCEntryPos(), IE_TOCHelper::getNumTOCEntries(), getTitle(), IE_TOCHelper::hasTOC(), m_exp_opt, m_oebps, m_opsId, m_pHmtlExporter, NCX_NAMESPACE, UT_DEBUGMSG, UT_std_string_sprintf(), and UT_UTF8String::utf8_str().
Referenced by writeNavigation().
UT_Error IE_Exp_EPUB::EPUB2_writeStructure | ( | ) | [private] |
References XAP_Exp_EpubExportOptions::bRenderMathMLToPNG, XAP_Exp_EpubExportOptions::bSplitDocument, IE_Exp::getDoc(), m_baseTempDir, m_exp_opt, m_oebpsDir, m_pHmtlExporter, IE_Exp::setProps(), IE_Exp_HTML::suppressDialog(), UT_go_directory_create(), UT_std_string_sprintf(), and IE_Exp::writeFile().
Referenced by writeStructure().
UT_Error IE_Exp_EPUB::EPUB3_writeNavigation | ( | ) | [private] |
References XAP_Exp_EpubExportOptions::bSplitDocument, closeNTags(), EPUB3_CONTENT_PROFILE, escapeForId(), IE_Exp_HTML_NavigationHelper::getFilenameByPosition(), IE_Exp_HTML::getNavigationHelper(), IE_TOCHelper::getNthTOCEntry(), IE_TOCHelper::getNthTOCEntryPos(), IE_TOCHelper::getNumTOCEntries(), getTitle(), IE_TOCHelper::hasTOC(), m_exp_opt, m_oebps, m_opsId, m_pHmtlExporter, OPS201_NAMESPACE, UT_DEBUGMSG, UT_std_string_sprintf(), UT_UTF8String::utf8_str(), and XHTML_NS.
Referenced by writeNavigation().
UT_Error IE_Exp_EPUB::EPUB3_writeStructure | ( | ) | [private] |
References XAP_Exp_EpubExportOptions::bRenderMathMLToPNG, XAP_Exp_EpubExportOptions::bSplitDocument, DELETEP, IE_Exp::getDoc(), m_baseTempDir, m_exp_opt, m_oebpsDir, m_pHmtlExporter, IE_Exp_HTML::set_MathMLRenderPNG(), IE_Exp_HTML::set_SplitDocument(), IE_Exp::setProps(), IE_Exp_HTML::setWriterFactory(), IE_Exp_HTML::suppressDialog(), UT_go_directory_create(), and IE_Exp::writeFile().
Referenced by writeStructure().
std::string IE_Exp_EPUB::escapeForId | ( | const std::string & | src | ) | [static, private] |
References UT_escapeXML().
Referenced by EPUB2_writeNavigation(), EPUB3_writeNavigation(), and package().
std::string IE_Exp_EPUB::getAuthor | ( | ) | const [private] |
References IE_Exp::getDoc(), and PD_META_KEY_CREATOR.
Referenced by EPUB2_writeNavigation(), and package().
std::vector< std::string > IE_Exp_EPUB::getFileList | ( | const std::string & | directory | ) | [static, private] |
References gchar.
Referenced by compress(), and package().
std::string IE_Exp_EPUB::getLanguage | ( | ) | const [private] |
References IE_Exp::getDoc(), and PD_META_KEY_LANGUAGE.
Referenced by package().
std::string IE_Exp_EPUB::getMimeType | ( | const std::string & | uri | ) | [static, private] |
References extension, gchar, UT_go_get_mime_type(), and UT_go_utf8_collate_casefold().
Referenced by package().
std::string IE_Exp_EPUB::getTitle | ( | ) | const [private] |
References IE_Exp::getDoc(), and PD_META_KEY_TITLE.
Referenced by EPUB2_writeNavigation(), EPUB3_writeNavigation(), and package().
UT_Error IE_Exp_EPUB::package | ( | ) | [private] |
References XAP_Exp_EpubExportOptions::bEpub2, compress(), DC_NAMESPACE, EPUB3_PACKAGE_PROFILE, escapeForId(), FREEP, gchar, getAuthor(), IE_Exp::getDoc(), getFileList(), getLanguage(), getMimeType(), getTitle(), IE_Exp_HTML::hasMathML(), m_exp_opt, m_oebps, m_oebpsDir, m_opsId, m_pHmtlExporter, OPF201_NAMESPACE, UT_ASSERT, and UT_DEBUGMSG.
Referenced by _writeDocument().
void IE_Exp_EPUB::registerDialogs | ( | void | ) | [private] |
UT_Error IE_Exp_EPUB::writeContainer | ( | ) | [private] |
References m_root, OCF201_NAMESPACE, OPF_MIMETYPE, and UT_DEBUGMSG.
Referenced by _writeDocument().
UT_Error IE_Exp_EPUB::writeNavigation | ( | ) | [private] |
References XAP_Exp_EpubExportOptions::bEpub2, EPUB2_writeNavigation(), EPUB3_writeNavigation(), m_exp_opt, and UT_ERROR.
Referenced by _writeDocument().
UT_Error IE_Exp_EPUB::writeStructure | ( | ) | [private] |
References XAP_Exp_EpubExportOptions::bEpub2, EPUB2_writeStructure(), EPUB3_writeStructure(), and m_exp_opt.
Referenced by _writeDocument().
std::string IE_Exp_EPUB::m_baseTempDir [private] |
Referenced by _writeDocument(), EPUB2_writeStructure(), and EPUB3_writeStructure().
XAP_Dialog_Id IE_Exp_EPUB::m_iDialogExport [private] |
Referenced by doOptions(), and registerDialogs().
GsfOutput* IE_Exp_EPUB::m_oebps [private] |
Referenced by _writeDocument(), compress(), EPUB2_writeNavigation(), EPUB3_writeNavigation(), and package().
std::string IE_Exp_EPUB::m_oebpsDir [private] |
Referenced by compress(), EPUB2_writeStructure(), EPUB3_writeStructure(), and package().
std::vector<std::string> IE_Exp_EPUB::m_opsId [private] |
Referenced by EPUB2_writeNavigation(), EPUB3_writeNavigation(), and package().
IE_Exp_HTML* IE_Exp_EPUB::m_pHmtlExporter [private] |
Referenced by EPUB2_writeNavigation(), EPUB2_writeStructure(), EPUB3_writeNavigation(), EPUB3_writeStructure(), package(), and ~IE_Exp_EPUB().
GsfOutfile* IE_Exp_EPUB::m_root [private] |
Referenced by _writeDocument(), and writeContainer().