#include <stdio.h>
#include <map>
#include <string>
#include "ut_types.h"
#include "ut_iconv.h"
#include "ie_imp.h"
#include "sdw_cryptor.h"
#include "ut_debugmsg.h"
Go to the source code of this file.
Classes | |
struct | ClsId |
class | DocHdr |
struct | TextAttr |
class | IE_Imp_StarOffice_Sniffer |
class | IE_Imp_StarOffice |
Defines | |
#define | SWGF_BLOCKNAME 0x0002 |
#define | SWGF_HAS_PASSWD 0x0008 |
#define | SWGF_HAS_PGNUMS 0x0100 |
#define | SWGF_BAD_FILE 0x8000 |
#define | SWDF_BROWSEMODE1 0x1 |
#define | SWDF_BROWSEMODE2 0x2 |
#define | SWDF_HTMLMODE 0x4 |
#define | SWDF_HEADINBROWSE 0x8 |
#define | SWDF_FOOTINBROWSE 0x10 |
#define | SWDF_GLOBALDOC 0x20 |
#define | SWDF_GLOBALDOCSAVELINK 0x40 |
#define | SWDF_LABELDOC 0x80 |
#define | SWG_POOLIDS 0x3 |
#define | SWG_LAYFRAMES 0x5 |
#define | SWG_RECSIZES '%' |
#define | SWG_LONGIDX 0x201 |
#define | SWG_LONGRECS 0x209 |
#define | SWG_MAJORVERSION SWG_LONGIDX |
#define | SWG_ATTRIBUTE 'A' |
#define | SWG_COMMENT 'C' |
#define | SWG_JOBSETUP 'J' |
#define | SWG_CONTENTS 'N' |
#define | SWG_ATTRSET 'S' |
#define | SWG_STRINGPOOL '!' |
#define | SWG_TEXTNODE 'T' |
#define | SWG_EOF 'Z' |
#define | SOFFICE_FILEFORMAT_31 3450 |
#define | SOFFICE_FILEFORMAT_40 3580 |
#define | SOFFICE_FILEFORMAT_50 5050 |
#define | SOFFICE_FILEFORMAT_60 6200 |
#define | JOBSET_FILE364_SYSTEM 0xFFFF |
#define | JOBSET_FILE605_SYSTEM 0xFFFE |
#define | IDX_NOCONV_FF 0xFFFC |
Functions | |
void | readByteString (GsfInput *stream, char *&str, UT_uint16 *aLength=NULL) noexcept(false) |
void | readByteString (GsfInput *stream, UT_UCS4Char *&str, UT_iconv_t converter, SDWCryptor *cryptor=NULL) noexcept(false) |
void | readFlagRec (GsfInput *stream, UT_uint8 &flags, gsf_off_t *newPos=NULL) noexcept(false) |
void | readChar (GsfInput *aStream, char &aChar) noexcept(false) |
void | streamRead (GsfInput *aStream, UT_uint8 &aDest) noexcept(false) |
void | streamRead (GsfInput *aStream, UT_sint8 &aDest) noexcept(false) |
void | streamRead (GsfInput *aStream, char &aDest) noexcept(false) |
void | streamRead (GsfInput *aStream, UT_uint16 &aDest, bool isLittleEndian=true) noexcept(false) |
void | streamRead (GsfInput *aStream, UT_sint16 &aDest, bool isLittleEndian=true) noexcept(false) |
void | streamRead (GsfInput *aStream, UT_uint32 &aDest, bool isLittleEndian=true) noexcept(false) |
void | streamRead (GsfInput *aStream, UT_sint32 &aDest, bool isLittleEndian=true) noexcept(false) |
void | streamRead (GsfInput *aStream, bool &aDest) noexcept(false) |
void | streamRead (GsfInput *aStream, ClsId &aClsId) noexcept(false) |
void | streamRead (GsfInput *aStream, char *aBuffer, UT_uint32 length) noexcept(false) |
void | streamRead (GsfInput *aStream, UT_uint8 *aBuffer, UT_uint32 length) noexcept(false) |
void | streamRead (GsfInput *aStream, TextAttr &aAttr, gsf_off_t aEoa) noexcept(false) |
#define IDX_NOCONV_FF 0xFFFC |
Referenced by IE_Imp_StarOffice::_loadFile().
#define JOBSET_FILE364_SYSTEM 0xFFFF |
Referenced by IE_Imp_StarOffice::_loadFile().
#define JOBSET_FILE605_SYSTEM 0xFFFE |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SOFFICE_FILEFORMAT_31 3450 |
#define SOFFICE_FILEFORMAT_40 3580 |
#define SOFFICE_FILEFORMAT_50 5050 |
#define SOFFICE_FILEFORMAT_60 6200 |
#define SWDF_BROWSEMODE1 0x1 |
#define SWDF_BROWSEMODE2 0x2 |
#define SWDF_FOOTINBROWSE 0x10 |
#define SWDF_GLOBALDOC 0x20 |
#define SWDF_GLOBALDOCSAVELINK 0x40 |
#define SWDF_HEADINBROWSE 0x8 |
#define SWDF_HTMLMODE 0x4 |
#define SWDF_LABELDOC 0x80 |
#define SWG_ATTRIBUTE 'A' |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWG_ATTRSET 'S' |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWG_COMMENT 'C' |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWG_CONTENTS 'N' |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWG_EOF 'Z' |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWG_JOBSETUP 'J' |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWG_LAYFRAMES 0x5 |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWG_LONGIDX 0x201 |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWG_LONGRECS 0x209 |
Referenced by IE_Imp_StarOffice::readRecSize().
#define SWG_MAJORVERSION SWG_LONGIDX |
Referenced by DocHdr::load().
#define SWG_POOLIDS 0x3 |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWG_RECSIZES '%' |
Referenced by DocHdr::load().
#define SWG_STRINGPOOL '!' |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWG_TEXTNODE 'T' |
Referenced by IE_Imp_StarOffice::_loadFile().
#define SWGF_BAD_FILE 0x8000 |
Referenced by DocHdr::load().
#define SWGF_BLOCKNAME 0x0002 |
Referenced by DocHdr::load().
#define SWGF_HAS_PASSWD 0x0008 |
Referenced by DocHdr::load().
#define SWGF_HAS_PGNUMS 0x0100 |
void readByteString | ( | GsfInput * | stream, | |
char *& | str, | |||
UT_uint16 * | aLength = NULL | |||
) |
Reads a string from the file where the first uint16 contains the length. If it is zero-terminated, length must include the byte for termination. str must be delete[]'d, not free'd! aLength, if non-null, contains the length of the string in bytes.
References streamRead().
Referenced by SDWDocInfo::load(), readByteString(), and readPaddedByteString().
void readByteString | ( | GsfInput * | stream, | |
UT_UCS4Char *& | str, | |||
UT_iconv_t | converter, | |||
SDWCryptor * | cryptor = NULL | |||
) |
Reads a bytestring from a stream and converts it to UCS-4. Optionally, it can also decrypt it.
stream | The stream to read from | |
str | The string where the bytestring should be stored | |
converter | Iconv handle for charset conversion | |
cryptor | (Optional) The cryptor used for decrypting the string |
References readByteString(), UT_convert_cd(), and UT_DEBUGMSG.
void readChar | ( | GsfInput * | aStream, | |
char & | aChar | |||
) | [inline] |
Reads one character from the given GsfInput.
aStream | The OLE Stream | |
aChar | Reference to the character |
UT_Error | on failure |
Referenced by IE_Imp_StarOffice::_loadFile().
void readFlagRec | ( | GsfInput * | stream, | |
UT_uint8 & | flags, | |||
gsf_off_t * | newPos = NULL | |||
) |
Reads the header of a flag record from the stream
flags | Flags (also contain the length in the 4 least significant bytes) | |
newPos | (optional) Pointer to a variable where the position after the flags record is stored. |
References flags, and streamRead().
Referenced by IE_Imp_StarOffice::_loadFile(), and streamRead().
void streamRead | ( | GsfInput * | aStream, | |
ClsId & | aClsId | |||
) | [inline] |
References streamRead().
void streamRead | ( | GsfInput * | aStream, | |
bool & | aDest | |||
) | [inline] |
References streamRead().
void streamRead | ( | GsfInput * | aStream, | |
UT_sint32 & | aDest, | |||
bool | isLittleEndian = true | |||
) | [inline] |
References streamRead().
void streamRead | ( | GsfInput * | aStream, | |
UT_uint32 & | aDest, | |||
bool | isLittleEndian = true | |||
) | [inline] |
void streamRead | ( | GsfInput * | aStream, | |
UT_sint16 & | aDest, | |||
bool | isLittleEndian = true | |||
) | [inline] |
References streamRead().
void streamRead | ( | GsfInput * | aStream, | |
UT_uint16 & | aDest, | |||
bool | isLittleEndian = true | |||
) | [inline] |
void streamRead | ( | GsfInput * | aStream, | |
char & | aDest | |||
) | [inline] |
References streamRead().
void streamRead | ( | GsfInput * | aStream, | |
UT_sint8 & | aDest | |||
) | [inline] |
References streamRead().
void streamRead | ( | GsfInput * | aStream, | |
UT_uint8 & | aDest | |||
) | [inline] |
void streamRead | ( | GsfInput * | aStream, | |
TextAttr & | aAttr, | |||
gsf_off_t | aEoa | |||
) |
References flags, readFlagRec(), std_size_string(), streamRead(), twipsToSizeString(), UT_DEBUGMSG, and UT_std_string_sprintf().
Referenced by IE_Imp_StarOffice::_loadFile(), DocHdr::load(), SDWDocInfo::load(), TimeStamp::load(), readByteString(), readFlagRec(), IE_Imp_StarOffice::readRecSize(), and streamRead().
void streamRead | ( | GsfInput * | aStream, | |
char * | aBuffer, | |||
UT_uint32 | length | |||
) | [inline] |