Classes | Defines | Functions

ie_imp_StarOffice.h File Reference

#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 Documentation

#define IDX_NOCONV_FF   0xFFFC
#define JOBSET_FILE364_SYSTEM   0xFFFF
#define JOBSET_FILE605_SYSTEM   0xFFFE
#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'
#define SWG_ATTRSET   'S'
#define SWG_COMMENT   'C'
#define SWG_CONTENTS   'N'
#define SWG_EOF   'Z'
#define SWG_JOBSETUP   'J'
#define SWG_LAYFRAMES   0x5
#define SWG_LONGIDX   0x201
#define SWG_LONGRECS   0x209
#define SWG_MAJORVERSION   SWG_LONGIDX

Referenced by DocHdr::load().

#define SWG_POOLIDS   0x3
#define SWG_RECSIZES   '%'

Referenced by DocHdr::load().

#define SWG_STRINGPOOL   '!'
#define SWG_TEXTNODE   'T'
#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

Function Documentation

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.

Parameters:
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.

Parameters:
aStream The OLE Stream
aChar Reference to the character
Exceptions:
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

Parameters:
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 
)
void streamRead ( GsfInput *  aStream,
char *  aBuffer,
UT_uint32  length 
) [inline]
void streamRead ( GsfInput *  aStream,
UT_uint8 aBuffer,
UT_uint32  length 
) [inline]