File: ms-container.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 (64 lines) | stat: -rw-r--r-- 2,205 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
#ifndef MS_OFFICE_CONTAINER_H
#define MS_OFFICE_CONTAINER_H

#include "excel.h"
#include "ms-biff.h"
#include <glib.h>
#include <pango/pango-attributes.h>

typedef struct _MSContainer	MSContainer;
typedef struct _ExcelWorkbook	ExcelWorkbook;
typedef struct _MSEscherBlip	MSEscherBlip;
typedef struct _MSObj		MSObj;

typedef struct {
	gboolean        (*realize_obj)	(MSContainer *c, MSObj *obj);
	SheetObject   * (*create_obj)	(MSContainer *c, MSObj *obj);
	GnmExpr const * (*parse_expr)	(MSContainer *c,
					 guint8 const *expr, int length);
	Sheet	      * (*sheet)	(MSContainer const *c);
	GnmFormat     * (*get_fmt)	(MSContainer const *c, unsigned indx);
	PangoAttrList * (*get_markup)	(MSContainer const *c, unsigned indx);
} MSContainerClass;

struct _MSContainer {
	MSContainerClass const *vtbl;

	ExcelWorkbook	*ewb;
	MsBiffVersion	 ver;
	gboolean	 free_blips;
	GPtrArray	*blips;
	GSList		*obj_queue;

	GPtrArray	 	*names;
	struct {
		GPtrArray	*externsheets;
		GPtrArray	*externnames;
	} v7;	/* biff7 does this at the container level */

	/* This is the container containing this container */
	MSContainer	*parent;
};

void ms_container_init (MSContainer *container, MSContainerClass const *vtbl,
			MSContainer *parent,
			ExcelWorkbook *ewb, MsBiffVersion ver);
void ms_container_finalize (MSContainer *container);

void           ms_container_add_blip	 (MSContainer *c, MSEscherBlip *blip);
MSEscherBlip  *ms_container_get_blip	 (MSContainer *c, int blip_id);
void	       ms_container_set_blips    (MSContainer *c, GPtrArray *blips);
void	       ms_container_add_obj	 (MSContainer *c, MSObj *obj);
MSObj	      *ms_container_get_obj	 (MSContainer *c, int obj_id);
void	       ms_container_realize_objs (MSContainer *c);
GnmExpr	const *ms_container_parse_expr   (MSContainer *c,
					  guint8 const *data, int length);

Sheet       *ms_container_sheet	    (MSContainer const *c);
GnmFormat	*ms_container_get_fmt	 (MSContainer const *c, unsigned indx);
PangoAttrList	*ms_container_get_markup (MSContainer const *c, unsigned indx);
PangoAttrList	*ms_container_read_markup (MSContainer const *c,
					   guint8 const *data, int txo_len,
					   char const *str);

#endif /* MS_OFFICE_CONTAINER_H */