File: ms-excel-biff.h

package info (click to toggle)
gnumeric 1.4.3-4
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 71,576 kB
  • ctags: 28,555
  • sloc: ansic: 282,333; xml: 45,788; sh: 8,479; makefile: 3,119; yacc: 1,129; lisp: 200; perl: 173; python: 86
file content (85 lines) | stat: -rw-r--r-- 2,286 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#ifndef GNUMERIC_EXCEL_BIFF_H
#define GNUMERIC_EXCEL_BIFF_H

/**
 * ms-excel-biff.h: MS Excel BIFF header for Gnumeric
 * contains data about the Excel BIFF records
 *
 * Author:
 *    Michael Meeks (michael@ximian.com)
 *
 * (C) 1998, 1999, 2000 Michael Meeks
 **/

#include "excel.h"
#include "ms-biff.h"

#define EX_SETROW(p,d)    (GSF_LE_SET_GUINT16(p + 0, d))
#define EX_SETCOL(p,d)    (GSF_LE_SET_GUINT16(p + 2, d))
#define EX_SETXF(p,d)     (GSF_LE_SET_GUINT16(p + 4, d))

/* Version info types as found in various Biff records */
typedef enum { MS_BIFF_TYPE_Workbook=0, MS_BIFF_TYPE_VBModule=1, MS_BIFF_TYPE_Worksheet=2,
	       MS_BIFF_TYPE_Chart=3, MS_BIFF_TYPE_Macrosheet=4, MS_BIFF_TYPE_Workspace=5,
	       MS_BIFF_TYPE_Unknown=6 } MsBiffFileType ;


/* Cell / XF types */
typedef enum { MS_BIFF_X_STYLE=0, MS_BIFF_X_CELL=1 } MsBiffXfType ;
typedef enum { MS_BIFF_F_MS=0, MS_BIFF_F_LOTUS=1 } MsBiffFormat ;
typedef enum { MS_BIFF_E_CONTEXT=0, MS_BIFF_E_LEFT_TO_RIGHT=1,
	       MS_BIFF_E_RIGHT_TO_LEFT=2 } MsBiffEastern ;

typedef enum {
	MS_BIFF_F_U_NONE = 1,
	MS_BIFF_F_U_SINGLE = 2,
	MS_BIFF_F_U_DOUBLE = 3,
	MS_BIFF_F_U_SINGLE_ACC = 4,
	MS_BIFF_F_U_DOUBLE_ACC = 5
} MsBiffFontUnderline ;

typedef enum { MS_BIFF_F_S_NONE, MS_BIFF_F_S_SUB, MS_BIFF_F_S_SUPER } MsBiffFontScript ;

typedef enum {	/* Horizontal alignment */
	MS_BIFF_H_A_GENERAL = 0,
	MS_BIFF_H_A_LEFT    = 1,
	MS_BIFF_H_A_CENTER  = 2,
	MS_BIFF_H_A_RIGHT   = 3,
	MS_BIFF_H_A_FILL    = 4,
	MS_BIFF_H_A_JUSTIFTY = 5,
	MS_BIFF_H_A_CENTER_ACROSS_SELECTION = 6
} MsBiffHAlign;

typedef enum {	/* Vertical alignment */
	MS_BIFF_V_A_TOP     = 0,
	MS_BIFF_V_A_CENTER  = 1,
	MS_BIFF_V_A_BOTTOM  = 2,
	MS_BIFF_V_A_JUSTIFY = 3
} MsBiffVAlign;

typedef enum { /* Differences to parent styles */
	MS_BIFF_D_FORMAT_BIT = 10,
	MS_BIFF_D_FONT_BIT   = 11,
	MS_BIFF_D_ALIGN_BIT  = 12,
	MS_BIFF_D_BORDER_BIT = 13,
	MS_BIFF_D_FILL_BIT   = 14,
	MS_BIFF_D_LOCK_BIT   = 15
} MsBiffDifferences;

typedef struct
{
  MsBiffVersion version ;
  MsBiffFileType type ;
} MsBiffBofData ;

typedef enum {
	MsBiffMaxRowsV7 = 16384,
	MsBiffMaxRowsV8 = 65536
} MsBiffMaxRows;

extern MsBiffBofData *new_ms_biff_bof_data  (BiffQuery *pos) ;
extern void           free_ms_biff_bof_data (MsBiffBofData *data) ;

#include "biff-types.h"

#endif