#include <ie_imp_StarOffice.h>
Public Member Functions | |
IE_Imp_StarOffice (PD_Document *pDocument) | |
~IE_Imp_StarOffice () | |
Protected Member Functions | |
virtual UT_Error | _loadFile (GsfInput *input) |
Private Types | |
typedef std::map< UT_uint16, std::basic_string< UT_UCS4Char > > | stringpool_map |
Map for the SWG_STRINGPOOL. | |
Private Member Functions | |
void | readRecSize (GsfInput *stream, UT_uint32 &aSize, gsf_off_t *aEOR=NULL) noexcept(false) |
void | readByteString (GsfInput *stream, UT_UCS4Char *&str) noexcept(false) |
Static Private Member Functions | |
static UT_uint32 | getVersion (const char *szVerString) |
Private Attributes | |
FILE * | mFile |
GsfInfile * | mOle |
GsfInput * | mDocStream |
DocHdr | mDocHdr |
stringpool_map | mStringPool |
typedef std::map<UT_uint16, std::basic_string<UT_UCS4Char> > IE_Imp_StarOffice::stringpool_map [private] |
Map for the SWG_STRINGPOOL.
IE_Imp_StarOffice::IE_Imp_StarOffice | ( | PD_Document * | pDocument | ) |
IE_Imp_StarOffice::~IE_Imp_StarOffice | ( | ) |
References mDocStream, and mOle.
UT_Error IE_Imp_StarOffice::_loadFile | ( | GsfInput * | input | ) | [protected, virtual] |
Implements IE_Imp.
References UT_GenericVector< T >::addItem(), IE_Imp::appendFmt(), IE_Imp::appendSpan(), IE_Imp::appendStrux(), TextAttr::attrName, TextAttr::attrVal, DocHdr::cryptor, TextAttr::data, TextAttr::dataLen, TextAttr::end, TextAttr::endSet, findConverter(), flags, FREEP, IE_Imp::getDoc(), UT_GenericVector< T >::getItemCount(), GetPassword, id, IDX_NOCONV_FF, TextAttr::isOff, TextAttr::isPara, JOBSET_FILE364_SYSTEM, JOBSET_FILE605_SYSTEM, UT_UCS4String::length(), DocHdr::load(), SDWDocInfo::load(), mDocHdr, mDocStream, mOle, mStringPool, DocHdr::nVersion, PTX_Block, PTX_Section, readByteString(), readChar(), readFlagRec(), readRecSize(), PD_Document::setPageSizeFromFile(), SDWCryptor::SetPassword(), size, TextAttr::start, TextAttr::startSet, streamRead(), UT_UCS4String::substr(), SWG_ATTRIBUTE, SWG_ATTRSET, SWG_COMMENT, SWG_CONTENTS, SWG_EOF, SWG_JOBSETUP, SWG_LAYFRAMES, SWG_LONGIDX, SWG_POOLIDS, SWG_STRINGPOOL, SWG_TEXTNODE, type, UT_UCS4String::ucs4_str(), UT_ASSERT, UT_ASSERT_HARMLESS, UT_convert_cd(), UT_DEBUGMSG, UT_iconv_close(), UT_iconv_isValid(), UT_NOT_IMPLEMENTED, UT_std_string_getPropVal(), UT_std_string_removeProperty(), UT_std_string_setProperty(), UT_std_string_sprintf(), UT_VECTOR_PURGEALL, UT_UCS4String::utf8_str(), TextAttr::ver, and TextAttr::which.
static UT_uint32 IE_Imp_StarOffice::getVersion | ( | const char * | szVerString | ) | [static, private] |
Finds the version number, given a version string.
void IE_Imp_StarOffice::readByteString | ( | GsfInput * | stream, | |
UT_UCS4Char *& | str | |||
) | [inline, private] |
Reads a string from the file where the first sint32 contains the length. If it is zero-terminated, length must include the byte for termination. The string will be converted to the charset given in mDocHdr. If the document is encrypted, the string will be decrypted before character set conversion.
stream | The stream to read from | |
str | Reference to pointer to UT_UCS4Char, where the string is stored. Must be free'd. Is NULL if the function fails. |
References DocHdr::converter, DocHdr::cryptor, and mDocHdr.
Referenced by _loadFile().
void IE_Imp_StarOffice::readRecSize | ( | GsfInput * | stream, | |
UT_uint32 & | aSize, | |||
gsf_off_t * | aEOR = NULL | |||
) | [private] |
Reads the record size from the stream. That is, usually three bytes starting from the current position.
aStream | the stream to read from | |
aSize | Reference to the size of the record | |
aEOR | End of Record - file position where the record is finished |
References streamRead(), SWG_LONGRECS, UT_ASSERT_HARMLESS, and UT_NOT_IMPLEMENTED.
Referenced by _loadFile().
DocHdr IE_Imp_StarOffice::mDocHdr [private] |
Referenced by _loadFile(), and readByteString().
GsfInput* IE_Imp_StarOffice::mDocStream [private] |
Referenced by _loadFile(), and ~IE_Imp_StarOffice().
FILE* IE_Imp_StarOffice::mFile [private] |
GsfInfile* IE_Imp_StarOffice::mOle [private] |
Referenced by _loadFile(), and ~IE_Imp_StarOffice().
stringpool_map IE_Imp_StarOffice::mStringPool [private] |
Referenced by _loadFile().