1 #ifndef _GNM_GNUMERIC_H_ 2 # define _GNM_GNUMERIC_H_ 3 4 #include <glib.h> 5 #include <goffice/goffice.h> 6 #include <gnumeric-fwd.h> 7 8 G_BEGIN_DECLS 9 10 /* Individual maxima for the dimensions. See also gnm_sheet_valid_size. */ 11 #define GNM_MAX_ROWS 0x1000000 12 #define GNM_MAX_COLS 0x4000 13 14 /* Standard size */ 15 #define GNM_DEFAULT_COLS 0x100 16 #define GNM_DEFAULT_ROWS 0x10000 17 18 /* Minimum size. dependent.c sets row constraint. */ 19 #define GNM_MIN_ROWS 0x80 20 #define GNM_MIN_COLS 0x80 21 22 // Note: more than 364238 columns will introduce a column named TRUE. 23 24 struct _GnmSheetSize { 25 int max_cols, max_rows; 26 }; 27 28 typedef enum { 29 GNM_SHEET_VISIBILITY_VISIBLE, 30 GNM_SHEET_VISIBILITY_HIDDEN, 31 GNM_SHEET_VISIBILITY_VERY_HIDDEN 32 } GnmSheetVisibility; 33 typedef enum { 34 GNM_SHEET_DATA, 35 GNM_SHEET_OBJECT, 36 GNM_SHEET_XLM 37 } GnmSheetType; 38 39 typedef enum { 40 GNM_ERROR_NULL, 41 GNM_ERROR_DIV0, 42 GNM_ERROR_VALUE, 43 GNM_ERROR_REF, 44 GNM_ERROR_NAME, 45 GNM_ERROR_NUM, 46 GNM_ERROR_NA, 47 GNM_ERROR_UNKNOWN 48 } GnmStdError; 49 50 typedef struct { 51 int col, row; /* these must be int not unsigned in some places (eg SUMIF ) */ 52 } GnmCellPos; 53 typedef struct { 54 GnmCellPos start, end; 55 } GnmRange; 56 typedef struct { 57 Sheet *sheet; 58 GnmRange range; 59 } GnmSheetRange; 60 61 typedef enum { 62 CELL_ITER_ALL = 0, 63 CELL_ITER_IGNORE_NONEXISTENT = 1 << 0, 64 CELL_ITER_IGNORE_EMPTY = 1 << 1, 65 CELL_ITER_IGNORE_BLANK = (CELL_ITER_IGNORE_NONEXISTENT | CELL_ITER_IGNORE_EMPTY), 66 CELL_ITER_IGNORE_HIDDEN = 1 << 2, /* hidden manually */ 67 68 /* contains SUBTOTAL */ 69 CELL_ITER_IGNORE_SUBTOTAL = 1 << 3, 70 /* hidden row in a filter */ 71 CELL_ITER_IGNORE_FILTERED = 1 << 4 72 } CellIterFlags; 73 typedef struct _GnmCellIter GnmCellIter; 74 typedef GnmValue *(*CellIterFunc) (GnmCellIter const *iter, gpointer user); 75 76 typedef enum { 77 GNM_SPANCALC_SIMPLE = 0x0, /* Just calc spans */ 78 GNM_SPANCALC_RESIZE = 0x1, /* Calculate sizes of all cells */ 79 GNM_SPANCALC_RE_RENDER = 0x2, /* Render and Size all cells */ 80 GNM_SPANCALC_RENDER = 0x4, /* Render and Size any unrendered cells */ 81 GNM_SPANCALC_ROW_HEIGHT = 0x8 /* Resize the row height */ 82 } GnmSpanCalcFlags; 83 84 typedef enum { 85 GNM_EXPR_EVAL_SCALAR_NON_EMPTY = 0, 86 GNM_EXPR_EVAL_PERMIT_NON_SCALAR = 0x1, 87 GNM_EXPR_EVAL_PERMIT_EMPTY = 0x2, 88 GNM_EXPR_EVAL_WANT_REF = 0x4 89 } GnmExprEvalFlags; 90 91 G_END_DECLS 92 93 #endif /* _GNM_GNUMERIC_H_ */ 94