Undo: fix problem with col widths after paste undo.
[gnumeric.git] / plugins / excel / ms-excel-biff.h
blob730202101e8099d3eae71b7d50a972a03d90fb13
1 /* vim: set sw=8 ts=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 #ifndef GNM_EXCEL_BIFF_H
3 #define GNM_EXCEL_BIFF_H
5 /**
6 * ms-excel-biff.h: MS Excel BIFF header for Gnumeric
7 * contains data about the Excel BIFF records
9 * Authors:
10 * Jody Goldberg (jody@gnome.org)
11 * Michael Meeks (michael@ximian.com)
13 * (C) 1998-2001 Michael Meeks
14 * (C) 2002-2007 Jody Goldberg
15 **/
17 #include "excel.h"
18 #include "ms-biff.h"
20 #define EX_SETROW(p,d) (GSF_LE_SET_GUINT16(p + 0, d))
21 #define EX_SETCOL(p,d) (GSF_LE_SET_GUINT16(p + 2, d))
22 #define EX_SETXF(p,d) (GSF_LE_SET_GUINT16(p + 4, d))
24 /* Version info types as found in various Biff records */
25 typedef enum {
26 MS_BIFF_TYPE_Workbook = 0,
27 MS_BIFF_TYPE_VBModule = 1,
28 MS_BIFF_TYPE_Worksheet = 2,
29 MS_BIFF_TYPE_Chart = 3,
30 MS_BIFF_TYPE_Macrosheet = 4,
31 MS_BIFF_TYPE_Workspace = 5,
32 MS_BIFF_TYPE_Unknown = 6
33 } MsBiffFileType ;
35 /* Cell / XF types */
36 typedef enum { MS_BIFF_X_STYLE=0, MS_BIFF_X_CELL=1 } MsBiffXfType ;
37 typedef enum { MS_BIFF_F_MS=0, MS_BIFF_F_LOTUS=1 } MsBiffFormat ;
39 typedef enum {
40 XLS_ULINE_NONE = 1,
41 XLS_ULINE_SINGLE = 2,
42 XLS_ULINE_DOUBLE = 3,
43 XLS_ULINE_SINGLE_ACC = 4,
44 XLS_ULINE_DOUBLE_ACC = 5
45 } MsBiffFontUnderline ;
47 typedef enum {
48 MS_BIFF_H_A_GENERAL = 0,
49 MS_BIFF_H_A_LEFT = 1,
50 MS_BIFF_H_A_CENTER = 2,
51 MS_BIFF_H_A_RIGHT = 3,
52 MS_BIFF_H_A_FILL = 4,
53 MS_BIFF_H_A_JUSTIFTY = 5,
54 MS_BIFF_H_A_CENTER_ACROSS_SELECTION = 6,
55 MS_BIFF_H_A_DISTRIBUTED = 7
56 } MsBiffHAlign;
58 typedef enum {
59 MS_BIFF_V_A_TOP = 0,
60 MS_BIFF_V_A_CENTER = 1,
61 MS_BIFF_V_A_BOTTOM = 2,
62 MS_BIFF_V_A_JUSTIFY = 3,
63 MS_BIFF_V_A_DISTRIBUTED = 4
64 } MsBiffVAlign;
66 typedef enum { /* Differences to parent styles */
67 MS_BIFF_D_FORMAT_BIT = 10,
68 MS_BIFF_D_FONT_BIT = 11,
69 MS_BIFF_D_ALIGN_BIT = 12,
70 MS_BIFF_D_BORDER_BIT = 13,
71 MS_BIFF_D_FILL_BIT = 14,
72 MS_BIFF_D_LOCK_BIT = 15
73 } MsBiffDifferences;
75 typedef struct {
76 MsBiffVersion version;
77 MsBiffFileType type;
78 } MsBiffBofData;
80 #define XLS_MaxRow_V7 16384
81 #define XLS_MaxRow_V8 65536
82 #define XLS_MaxCol 256
84 #include "biff-types.h"
86 #endif /* GNM_EXCEL_BIFF_H */