libwpd_internal.h File Reference

#include "WPXStream.h"
#include <stdio.h>
#include <string>
#include <algorithm>
#include "WPXString.h"

Go to the source code of this file.

Classes

struct  _RGBSColor
struct  _WPXColumnDefinition
struct  _WPXColumnProperties
struct  _WPXTabStop
class  VersionException
class  FileException
class  ParseException
class  GenericException
class  UnsupportedEncryptionException

Defines

#define LIBWPD_MIN   std::min
#define LIBWPD_MAX   std::max
#define WPD_CHECK_FILE_ERROR(v)   if (v==EOF) { WPD_DEBUG_MSG(("X_CheckFileError: %d\n", __LINE__)); throw FileException(); }
#define WPD_CHECK_FILE_SEEK_ERROR(v)   if (v) { WPD_DEBUG_MSG(("X_CheckFileSeekError: %d\n", __LINE__)); throw FileException(); }
#define WPD_CHECK_FILE_READ_ERROR(v, num_elements)
#define DELETEP(m)   if (m) { delete m; m = 0; }
#define WPD_DEBUG_MSG(M)
#define WPD_LE_GET_GUINT8(p)   (*(uint8_t const *)(p))
#define WPD_LE_GET_GUINT16(p)
#define WPD_LE_GET_GUINT32(p)
#define WPD_BE_GET_GUINT8(p)   (*(uint8_t const *)(p))
#define WPD_BE_GET_GUINT16(p)
#define WPD_BE_GET_GUINT32(p)
#define WPX_EXTRA_LARGE_BIT   1
#define WPX_VERY_LARGE_BIT   2
#define WPX_LARGE_BIT   4
#define WPX_SMALL_PRINT_BIT   8
#define WPX_FINE_PRINT_BIT   16
#define WPX_SUPERSCRIPT_BIT   32
#define WPX_SUBSCRIPT_BIT   64
#define WPX_OUTLINE_BIT   128
#define WPX_ITALICS_BIT   256
#define WPX_SHADOW_BIT   512
#define WPX_REDLINE_BIT   1024
#define WPX_DOUBLE_UNDERLINE_BIT   2048
#define WPX_BOLD_BIT   4096
#define WPX_STRIKEOUT_BIT   8192
#define WPX_UNDERLINE_BIT   16384
#define WPX_SMALL_CAPS_BIT   32768
#define WPX_BLINK_BIT   65536
#define WPX_REVERSEVIDEO_BIT   131072
#define WPX_PARAGRAPH_JUSTIFICATION_LEFT   0x00
#define WPX_PARAGRAPH_JUSTIFICATION_FULL   0x01
#define WPX_PARAGRAPH_JUSTIFICATION_CENTER   0x02
#define WPX_PARAGRAPH_JUSTIFICATION_RIGHT   0x03
#define WPX_PARAGRAPH_JUSTIFICATION_FULL_ALL_LINES   0x04
#define WPX_PARAGRAPH_JUSTIFICATION_DECIMAL_ALIGNED   0x05
#define WPX_TABLE_POSITION_ALIGN_WITH_LEFT_MARGIN   0x00
#define WPX_TABLE_POSITION_ALIGN_WITH_RIGHT_MARGIN   0x01
#define WPX_TABLE_POSITION_CENTER_BETWEEN_MARGINS   0x02
#define WPX_TABLE_POSITION_FULL   0x03
#define WPX_TABLE_POSITION_ABSOLUTE_FROM_LEFT_MARGIN   0x04
#define WPX_PAGE_BREAK   0x00
#define WPX_SOFT_PAGE_BREAK   0x01
#define WPX_COLUMN_BREAK   0x02
#define WPX_LEFT   0x00
#define WPX_RIGHT   0x01
#define WPX_CENTER   0x02
#define WPX_TOP   0x03
#define WPX_BOTTOM   0x04

Typedefs

typedef _RGBSColor RGBSColor
typedef _WPXColumnDefinition WPXColumnDefinition
typedef _WPXColumnProperties WPXColumnProperties
typedef _WPXTabStop WPXTabStop

Enumerations

enum  WPXFileType { WP6_DOCUMENT, WP5_DOCUMENT, WP42_DOCUMENT, OTHER }
enum  WPXNumberingType {
  ARABIC, LOWERCASE, UPPERCASE, LOWERCASE_ROMAN,
  UPPERCASE_ROMAN
}
enum  WPXNoteType { FOOTNOTE, ENDNOTE }
enum  WPXHeaderFooterType { HEADER, FOOTER }
enum  WPXHeaderFooterInternalType {
  HEADER_A, HEADER_B, FOOTER_A, FOOTER_B,
  DUMMY
}
enum  WPXHeaderFooterOccurence { ODD, EVEN, ALL, NEVER }
enum  WPXFormOrientation { PORTRAIT, LANDSCAPE }
enum  WPXTabAlignment {
  LEFT, RIGHT, CENTER, DECIMAL,
  BAR
}
enum  WPXVerticalAlignment { TOP, MIDDLE, BOTTOM, FULL }
enum  WPXTextColumnType { NEWSPAPER, NEWSPAPER_VERTICAL_BALANCE, PARALLEL, PARALLEL_PROTECT }

Functions

int8_t read8 (WPXInputStream *input)
uint8_t readU8 (WPXInputStream *input)
uint16_t readU16 (WPXInputStream *input, bool bigendian=false)
uint32_t readU32 (WPXInputStream *input, bool bigendian=false)
WPXString readPascalString (WPXInputStream *input)
WPXString readCString (WPXInputStream *input)
void appendUCS4 (WPXString &str, uint32_t ucs4)
int extendedCharacterWP6ToUCS2 (uint8_t character, uint8_t characterSet, const uint16_t **chars)
int extendedCharacterWP5ToUCS2 (uint8_t character, uint8_t characterSet, const uint16_t **chars)
uint16_t fixedPointToWPUs (const uint32_t fixedPointNumber)
float fixedPointToFloat (const uint32_t fixedPointNumber)
int _extractNumericValueFromRoman (const char romanChar)
int _extractDisplayReferenceNumberFromBuf (const WPXString &buf, const WPXNumberingType listType)
WPXNumberingType _extractWPXNumberingTypeFromBuf (const WPXString &buf, const WPXNumberingType putativeWPXNumberingType)
WPXString _numberingTypeToString (WPXNumberingType t)

Variables

const uint8_t WPX_TABLE_CELL_LEFT_BORDER_OFF = 0x01
const uint8_t WPX_TABLE_CELL_RIGHT_BORDER_OFF = 0x02
const uint8_t WPX_TABLE_CELL_TOP_BORDER_OFF = 0x04
const uint8_t WPX_TABLE_CELL_BOTTOM_BORDER_OFF = 0x08
const uint16_t macintoshCharacterMap []


Define Documentation

#define DELETEP (  )     if (m) { delete m; m = 0; }

#define LIBWPD_MAX   std::max

#define LIBWPD_MIN   std::min

#define WPD_BE_GET_GUINT16 (  ) 

Value:

(uint16_t)((((uint8_t const *)(p))[1] << 0)  |    \
                  (((uint8_t const *)(p))[0] << 8))

#define WPD_BE_GET_GUINT32 (  ) 

Value:

(uint32_t)((((uint8_t const *)(p))[3] << 0)  |    \
                  (((uint8_t const *)(p))[2] << 8)  |    \
                  (((uint8_t const *)(p))[1] << 16) |    \
                  (((uint8_t const *)(p))[0] << 24))

#define WPD_BE_GET_GUINT8 (  )     (*(uint8_t const *)(p))

#define WPD_CHECK_FILE_ERROR (  )     if (v==EOF) { WPD_DEBUG_MSG(("X_CheckFileError: %d\n", __LINE__)); throw FileException(); }

#define WPD_CHECK_FILE_READ_ERROR ( v,
num_elements   ) 

Value:

if (v != num_elements) {\
 WPD_DEBUG_MSG(("X_CheckFileReadElementError: %d\n", __LINE__)); throw FileException(); }

#define WPD_CHECK_FILE_SEEK_ERROR (  )     if (v) { WPD_DEBUG_MSG(("X_CheckFileSeekError: %d\n", __LINE__)); throw FileException(); }

#define WPD_DEBUG_MSG (  ) 

#define WPD_LE_GET_GUINT16 (  ) 

Value:

(uint16_t)((((uint8_t const *)(p))[0] << 0)  |    \
                  (((uint8_t const *)(p))[1] << 8))

#define WPD_LE_GET_GUINT32 (  ) 

Value:

(uint32_t)((((uint8_t const *)(p))[0] << 0)  |    \
                  (((uint8_t const *)(p))[1] << 8)  |    \
                  (((uint8_t const *)(p))[2] << 16) |    \
                  (((uint8_t const *)(p))[3] << 24))

#define WPD_LE_GET_GUINT8 (  )     (*(uint8_t const *)(p))

#define WPX_BLINK_BIT   65536

#define WPX_BOLD_BIT   4096

#define WPX_BOTTOM   0x04

#define WPX_CENTER   0x02

#define WPX_COLUMN_BREAK   0x02

#define WPX_DOUBLE_UNDERLINE_BIT   2048

#define WPX_EXTRA_LARGE_BIT   1

#define WPX_FINE_PRINT_BIT   16

#define WPX_ITALICS_BIT   256

#define WPX_LARGE_BIT   4

#define WPX_LEFT   0x00

#define WPX_OUTLINE_BIT   128

#define WPX_PAGE_BREAK   0x00

#define WPX_PARAGRAPH_JUSTIFICATION_CENTER   0x02

#define WPX_PARAGRAPH_JUSTIFICATION_DECIMAL_ALIGNED   0x05

#define WPX_PARAGRAPH_JUSTIFICATION_FULL   0x01

#define WPX_PARAGRAPH_JUSTIFICATION_FULL_ALL_LINES   0x04

#define WPX_PARAGRAPH_JUSTIFICATION_LEFT   0x00

#define WPX_PARAGRAPH_JUSTIFICATION_RIGHT   0x03

#define WPX_REDLINE_BIT   1024

#define WPX_REVERSEVIDEO_BIT   131072

#define WPX_RIGHT   0x01

#define WPX_SHADOW_BIT   512

#define WPX_SMALL_CAPS_BIT   32768

#define WPX_SMALL_PRINT_BIT   8

#define WPX_SOFT_PAGE_BREAK   0x01

#define WPX_STRIKEOUT_BIT   8192

#define WPX_SUBSCRIPT_BIT   64

#define WPX_SUPERSCRIPT_BIT   32

#define WPX_TABLE_POSITION_ABSOLUTE_FROM_LEFT_MARGIN   0x04

#define WPX_TABLE_POSITION_ALIGN_WITH_LEFT_MARGIN   0x00

#define WPX_TABLE_POSITION_ALIGN_WITH_RIGHT_MARGIN   0x01

#define WPX_TABLE_POSITION_CENTER_BETWEEN_MARGINS   0x02

#define WPX_TABLE_POSITION_FULL   0x03

#define WPX_TOP   0x03

#define WPX_UNDERLINE_BIT   16384

#define WPX_VERY_LARGE_BIT   2


Typedef Documentation

typedef struct _RGBSColor RGBSColor

typedef struct _WPXColumnDefinition WPXColumnDefinition

typedef struct _WPXColumnProperties WPXColumnProperties

typedef struct _WPXTabStop WPXTabStop


Enumeration Type Documentation

enum WPXFileType

Enumerator:
WP6_DOCUMENT 
WP5_DOCUMENT 
WP42_DOCUMENT 
OTHER 

enum WPXFormOrientation

Enumerator:
PORTRAIT 
LANDSCAPE 

enum WPXHeaderFooterInternalType

Enumerator:
HEADER_A 
HEADER_B 
FOOTER_A 
FOOTER_B 
DUMMY 

enum WPXHeaderFooterOccurence

Enumerator:
ODD 
EVEN 
ALL 
NEVER 

enum WPXHeaderFooterType

Enumerator:
HEADER 
FOOTER 

enum WPXNoteType

Enumerator:
FOOTNOTE 
ENDNOTE 

enum WPXNumberingType

Enumerator:
ARABIC 
LOWERCASE 
UPPERCASE 
LOWERCASE_ROMAN 
UPPERCASE_ROMAN 

enum WPXTabAlignment

Enumerator:
LEFT 
RIGHT 
CENTER 
DECIMAL 
BAR 

enum WPXTextColumnType

Enumerator:
NEWSPAPER 
NEWSPAPER_VERTICAL_BALANCE 
PARALLEL 
PARALLEL_PROTECT 

enum WPXVerticalAlignment

Enumerator:
TOP 
MIDDLE 
BOTTOM 
FULL 


Function Documentation

int _extractDisplayReferenceNumberFromBuf ( const WPXString buf,
const WPXNumberingType  listType 
)

int _extractNumericValueFromRoman ( const char  romanChar  ) 

WPXNumberingType _extractWPXNumberingTypeFromBuf ( const WPXString buf,
const WPXNumberingType  putativeWPXNumberingType 
)

WPXString _numberingTypeToString ( WPXNumberingType  t  ) 

void appendUCS4 ( WPXString str,
uint32_t  ucs4 
)

int extendedCharacterWP5ToUCS2 ( uint8_t  character,
uint8_t  characterSet,
const uint16_t **  chars 
)

int extendedCharacterWP6ToUCS2 ( uint8_t  character,
uint8_t  characterSet,
const uint16_t **  chars 
)

float fixedPointToFloat ( const uint32_t  fixedPointNumber  ) 

uint16_t fixedPointToWPUs ( const uint32_t  fixedPointNumber  ) 

int8_t read8 ( WPXInputStream input  ) 

WPXString readCString ( WPXInputStream input  ) 

WPXString readPascalString ( WPXInputStream input  ) 

uint16_t readU16 ( WPXInputStream input,
bool  bigendian = false 
)

uint32_t readU32 ( WPXInputStream input,
bool  bigendian = false 
)

uint8_t readU8 ( WPXInputStream input  ) 


Variable Documentation

const uint16_t macintoshCharacterMap[]

const uint8_t WPX_TABLE_CELL_BOTTOM_BORDER_OFF = 0x08

const uint8_t WPX_TABLE_CELL_LEFT_BORDER_OFF = 0x01

const uint8_t WPX_TABLE_CELL_RIGHT_BORDER_OFF = 0x02

const uint8_t WPX_TABLE_CELL_TOP_BORDER_OFF = 0x04


Generated on Mon Mar 19 15:09:58 2007 for libwpd by doxygen 1.5.1