Commit 8b5866fb authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

New base class for Cells. Convert everything to access the elements that


2000-08-30  Jody Goldberg <jgoldberg@home.com>

	* dependent.[ch] : New base class for Cells.
	  Convert everything to access the elements that are now
	  in the cell's base.
	s/Cell::sheet/Cell::Dependent::sheet/
	s/Cell::cell_flags/Cell::Dependent::flags/

	* Makefile.am : Because of XL we need to build plugins before src.
	  That will need changing.

	* src/func.c (function_marshal_arg) : Use expr_array_intersection.

	* src/expr.c (eval_expr_real) : Do implicit conversions from strings
	  to numbers if possible.
	  Access the first element of an array.  NOTE : This is WRONG
	  We need to implement array expression behavior some day.
	(expr_array_intersection) : New routine.
parent 29debbc9
2000-08-30 Jody Goldberg <jgoldberg@home.com>
* dependent.[ch] : New base class for Cells.
Convert everything to access the elements that are now
in the cell's base.
s/Cell::sheet/Cell::Dependent::sheet/
s/Cell::cell_flags/Cell::Dependent::flags/
* Makefile.am : Because of XL we need to build plugins before src.
That will need changing.
* src/func.c (function_marshal_arg) : Use expr_array_intersection.
* src/expr.c (eval_expr_real) : Do implicit conversions from strings
to numbers if possible.
Access the first element of an array. NOTE : This is WRONG
We need to implement array expression behavior some day.
(expr_array_intersection) : New routine.
2000-08-30 Morten Welinder <terra@diku.dk> 2000-08-30 Morten Welinder <terra@diku.dk>
* src/print-cell.c (print_show_iso8859_1): Fix a few type errors. * src/print-cell.c (print_show_iso8859_1): Fix a few type errors.
......
2000-08-30 Jody Goldberg <jgoldberg@home.com>
* dependent.[ch] : New base class for Cells.
Convert everything to access the elements that are now
in the cell's base.
s/Cell::sheet/Cell::Dependent::sheet/
s/Cell::cell_flags/Cell::Dependent::flags/
* Makefile.am : Because of XL we need to build plugins before src.
That will need changing.
* src/func.c (function_marshal_arg) : Use expr_array_intersection.
* src/expr.c (eval_expr_real) : Do implicit conversions from strings
to numbers if possible.
Access the first element of an array. NOTE : This is WRONG
We need to implement array expression behavior some day.
(expr_array_intersection) : New routine.
2000-08-30 Morten Welinder <terra@diku.dk> 2000-08-30 Morten Welinder <terra@diku.dk>
* src/print-cell.c (print_show_iso8859_1): Fix a few type errors. * src/print-cell.c (print_show_iso8859_1): Fix a few type errors.
......
...@@ -6,6 +6,7 @@ Almer: ...@@ -6,6 +6,7 @@ Almer:
Chema: Chema:
* Copy sheet. * Copy sheet.
Jody: Jody:
* Applix support mostly functional. * Applix support mostly functional.
* Improve support for named expressions. * Improve support for named expressions.
...@@ -13,6 +14,7 @@ Jody: ...@@ -13,6 +14,7 @@ Jody:
* Improve internation keyboard support. * Improve internation keyboard support.
* Fix XIRR and friends. * Fix XIRR and friends.
* A few more bugs in printing multiline text. * A few more bugs in printing multiline text.
* Correct handling of number formating in intl locales.
John Gill: John Gill:
* Double click fill support. * Double click fill support.
...@@ -23,6 +25,7 @@ Jon K ...@@ -23,6 +25,7 @@ Jon K
JPR: JPR:
* Put more effort into reverse engineering MATCH (and friends) * Put more effort into reverse engineering MATCH (and friends)
than you want to know about. than you want to know about.
* Fixed sort to ignore hidden rows/cols.
Jukka: Jukka:
* Implementation of `Anova: Two-Factor With Replication' * Implementation of `Anova: Two-Factor With Replication'
...@@ -51,6 +54,9 @@ Morten: ...@@ -51,6 +54,9 @@ Morten:
Pablo De Napoli: Pablo De Napoli:
* New NT_MU function in numtheory. * New NT_MU function in numtheory.
Thomas Canty:
* Updated and improved documentation.
Translations: Translations:
* Updated: da (Kenneth/Keld?), de (Karl), en_GB (Robert), ko * Updated: da (Kenneth/Keld?), de (Karl), en_GB (Robert), ko
(Sung-Hyun Nam), no (Kjartan), ru (Valek), uk (Yuri), maybe more. (Sung-Hyun Nam), no (Kjartan), ru (Valek), uk (Yuri), maybe more.
......
2000-08-30 Jody Goldberg <jgoldberg@home.com>
* dependent.[ch] : New base class for Cells.
Convert everything to access the elements that are now
in the cell's base.
s/Cell::sheet/Cell::Dependent::sheet/
s/Cell::cell_flags/Cell::Dependent::flags/
* Makefile.am : Because of XL we need to build plugins before src.
That will need changing.
* src/func.c (function_marshal_arg) : Use expr_array_intersection.
* src/expr.c (eval_expr_real) : Do implicit conversions from strings
to numbers if possible.
Access the first element of an array. NOTE : This is WRONG
We need to implement array expression behavior some day.
(expr_array_intersection) : New routine.
2000-08-30 Morten Welinder <terra@diku.dk> 2000-08-30 Morten Welinder <terra@diku.dk>
* src/print-cell.c (print_show_iso8859_1): Fix a few type errors. * src/print-cell.c (print_show_iso8859_1): Fix a few type errors.
......
2000-08-30 Jody Goldberg <jgoldberg@home.com>
* dependent.[ch] : New base class for Cells.
Convert everything to access the elements that are now
in the cell's base.
s/Cell::sheet/Cell::Dependent::sheet/
s/Cell::cell_flags/Cell::Dependent::flags/
* Makefile.am : Because of XL we need to build plugins before src.
That will need changing.
* src/func.c (function_marshal_arg) : Use expr_array_intersection.
* src/expr.c (eval_expr_real) : Do implicit conversions from strings
to numbers if possible.
Access the first element of an array. NOTE : This is WRONG
We need to implement array expression behavior some day.
(expr_array_intersection) : New routine.
2000-08-30 Morten Welinder <terra@diku.dk> 2000-08-30 Morten Welinder <terra@diku.dk>
* src/print-cell.c (print_show_iso8859_1): Fix a few type errors. * src/print-cell.c (print_show_iso8859_1): Fix a few type errors.
......
2000-08-30 Jody Goldberg <jgoldberg@home.com>
* dependent.[ch] : New base class for Cells.
Convert everything to access the elements that are now
in the cell's base.
s/Cell::sheet/Cell::Dependent::sheet/
s/Cell::cell_flags/Cell::Dependent::flags/
* Makefile.am : Because of XL we need to build plugins before src.
That will need changing.
* src/func.c (function_marshal_arg) : Use expr_array_intersection.
* src/expr.c (eval_expr_real) : Do implicit conversions from strings
to numbers if possible.
Access the first element of an array. NOTE : This is WRONG
We need to implement array expression behavior some day.
(expr_array_intersection) : New routine.
2000-08-30 Morten Welinder <terra@diku.dk> 2000-08-30 Morten Welinder <terra@diku.dk>
* src/print-cell.c (print_show_iso8859_1): Fix a few type errors. * src/print-cell.c (print_show_iso8859_1): Fix a few type errors.
......
2000-08-30 Jody Goldberg <jgoldberg@home.com>
* dependent.[ch] : New base class for Cells.
Convert everything to access the elements that are now
in the cell's base.
s/Cell::sheet/Cell::Dependent::sheet/
s/Cell::cell_flags/Cell::Dependent::flags/
* Makefile.am : Because of XL we need to build plugins before src.
That will need changing.
* src/func.c (function_marshal_arg) : Use expr_array_intersection.
* src/expr.c (eval_expr_real) : Do implicit conversions from strings
to numbers if possible.
Access the first element of an array. NOTE : This is WRONG
We need to implement array expression behavior some day.
(expr_array_intersection) : New routine.
2000-08-30 Morten Welinder <terra@diku.dk> 2000-08-30 Morten Welinder <terra@diku.dk>
* src/print-cell.c (print_show_iso8859_1): Fix a few type errors. * src/print-cell.c (print_show_iso8859_1): Fix a few type errors.
......
2000-08-30 Jody Goldberg <jgoldberg@home.com>
* dependent.[ch] : New base class for Cells.
Convert everything to access the elements that are now
in the cell's base.
s/Cell::sheet/Cell::Dependent::sheet/
s/Cell::cell_flags/Cell::Dependent::flags/
* Makefile.am : Because of XL we need to build plugins before src.
That will need changing.
* src/func.c (function_marshal_arg) : Use expr_array_intersection.
* src/expr.c (eval_expr_real) : Do implicit conversions from strings
to numbers if possible.
Access the first element of an array. NOTE : This is WRONG
We need to implement array expression behavior some day.
(expr_array_intersection) : New routine.
2000-08-30 Morten Welinder <terra@diku.dk> 2000-08-30 Morten Welinder <terra@diku.dk>
* src/print-cell.c (print_show_iso8859_1): Fix a few type errors. * src/print-cell.c (print_show_iso8859_1): Fix a few type errors.
......
...@@ -28,26 +28,6 @@ ...@@ -28,26 +28,6 @@
<section> <section>
<title>Graphics Component</title> <title>Graphics Component</title>
<entry size="small" status="0%" target="1.0">
<title>Fix scaling in scatter plots</title>
<description>
Scatter plots are not scaling correctly currently: they are
not scaling to the dimensions of the allocated size for the
graph inside the layout.
</description>
<contact>miguel@helixcode.com</contact>
</entry>
<entry size="small" status="0%" target="1.0">
<title>Stacked and Stacked 100% are not implemented for line plots</title>
<description>
The stacked and stacked 100% code paths for line plots have
not been implemented yet. They should be fairly simple to
implement.
</description>
<contact>miguel@helixcode.com</contact>
</entry>
<entry size="medium" status="0%" target="1.0"> <entry size="medium" status="0%" target="1.0">
<title>Need to support captions</title> <title>Need to support captions</title>
<description> <description>
...@@ -56,41 +36,6 @@ ...@@ -56,41 +36,6 @@
<contact>miguel@helixcode.com</contact> <contact>miguel@helixcode.com</contact>
</entry> </entry>
<entry size="medium" status="0%" target="1.0">
<title>Add axis object</title>
<description>
Axis are supposed to be independent objects that are handled
by the Layout object. The Axis object does not yet exist and
needs to be implemented
</description>
<contact>miguel@helixcode.com</contact>
</entry>
<entry size="medium" status="0%" target="1.0">
<title>Pie Charts</title>
<description>
There is no pie support in the Graphics component yet.
</description>
<contact>miguel@helixcode.com</contact>
</entry>
<entry size="medium" status="0%" target="1.0">
<title>Add 3d plotting</title>
<description>
There is no 3d plotting right now.
</description>
<contact>miguel@helixcode.com</contact>
</entry>
<entry size="medium" status="0%" target="1.0">
<title>Add editing facilities</title>
<description>
No graph item supports any form of editing right now, and we
need to implement it.
</description>
<contact>miguel@helixcode.com</contact>
</entry>
</section> <!--Graphics Component--> </section> <!--Graphics Component-->
</todo> </todo>
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
#include "cell.h" #include "cell.h"
#include "workbook.h" #include "workbook.h"
#include "format.h" #include "format.h"
#include "style.h"
#include "number-match.h" #include "number-match.h"
#include <sys/utsname.h> #include <sys/utsname.h>
enum Value_Class { enum Value_Class {
VALUE_CLASS_NUMBER = 1, VALUE_CLASS_NUMBER = 1,
VALUE_CLASS_TEXT = 2, VALUE_CLASS_TEXT = 2,
...@@ -864,7 +864,7 @@ information_functions_init (void) ...@@ -864,7 +864,7 @@ information_functions_init (void)
&help_error, gnumeric_error); &help_error, gnumeric_error);
function_add_nodes (cat, "error.type", "", "", function_add_nodes (cat, "error.type", "", "",
&help_error_type, gnumeric_error_type); &help_error_type, gnumeric_error_type);
function_add_args (cat, "info", "?", "info_type", function_add_args (cat, "info", "s", "info_type",
&help_info, gnumeric_info); &help_info, gnumeric_info);
function_add_nodes (cat, "isblank", "?", "value", function_add_nodes (cat, "isblank", "?", "value",
&help_isblank, gnumeric_isblank); &help_isblank, gnumeric_isblank);
......
...@@ -87,6 +87,8 @@ GNUMERIC_BASE_SOURCES = \ ...@@ -87,6 +87,8 @@ GNUMERIC_BASE_SOURCES = \
dates.h \ dates.h \
datetime.c \ datetime.c \
datetime.h \ datetime.h \
dependent.c \
dependent.h \
eval.h \ eval.h \
eval.c \ eval.c \
expr.c \ expr.c \
...@@ -99,7 +101,7 @@ GNUMERIC_BASE_SOURCES = \ ...@@ -99,7 +101,7 @@ GNUMERIC_BASE_SOURCES = \
formats.c \ formats.c \
func.c \ func.c \
func.h \ func.h \
func-utils.h \ func-util.h \
format.c \ format.c \
format.h \ format.h \
global-gnome-font.c \ global-gnome-font.c \
...@@ -226,8 +228,7 @@ GNUMERIC_BONOBO_SOURCES = \ ...@@ -226,8 +228,7 @@ GNUMERIC_BONOBO_SOURCES = \
sheet-object-container.h \ sheet-object-container.h \
sheet-object-item.c \ sheet-object-item.c \
sheet-object-item.h \ sheet-object-item.h \
sheet-vector.c \ graph-series.c
sheet-vector.h
gnumeric_SOURCES = \ gnumeric_SOURCES = \
main.c \ main.c \
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "parse-util.h" #include "parse-util.h"
#include "tools.h" #include "tools.h"
#include "value.h" #include "value.h"
#include "style.h"
#include "regression.h" #include "regression.h"
#include "workbook.h" #include "workbook.h"
......
...@@ -117,7 +117,7 @@ cell_comment_realize (Cell *cell) ...@@ -117,7 +117,7 @@ cell_comment_realize (Cell *cell)
g_return_if_fail (cell->comment != NULL); g_return_if_fail (cell->comment != NULL);
sheet_cell_comment_link (cell); sheet_cell_comment_link (cell);
for (l = cell->sheet->sheet_views; l; l = l->next){ for (l = cell->base.sheet->sheet_views; l; l = l->next){
SheetView *sheet_view = SHEET_VIEW (l->data); SheetView *sheet_view = SHEET_VIEW (l->data);
GnomeCanvasItem *o; GnomeCanvasItem *o;
...@@ -149,7 +149,7 @@ cell_set_comment (Cell *cell, const char *str) ...@@ -149,7 +149,7 @@ cell_set_comment (Cell *cell, const char *str)
cell->comment->comment = string_get (str); cell->comment->comment = string_get (str);
if (cell->sheet) if (cell->base.sheet)
cell_comment_realize (cell); cell_comment_realize (cell);
} }
......
...@@ -140,7 +140,7 @@ cell_draw (Cell const *cell, MStyle *mstyle, CellSpanInfo const * const spaninfo ...@@ -140,7 +140,7 @@ cell_draw (Cell const *cell, MStyle *mstyle, CellSpanInfo const * const spaninfo
GdkFont *font; GdkFont *font;
GdkRectangle rect; GdkRectangle rect;
Sheet const * const sheet = cell->sheet; Sheet const * const sheet = cell->base.sheet;
ColRowInfo const * const ci = cell->col_info; ColRowInfo const * const ci = cell->col_info;
ColRowInfo const * const ri = cell->row_info; ColRowInfo const * const ri = cell->row_info;
int start_col, end_col; int start_col, end_col;
......
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "cell-comment.h" #include "cell-comment.h"
#include "expr.h" #include "expr.h"
#include "eval.h" #include "eval.h"
#include "style.h"
#include "sheet.h" #include "sheet.h"
#include "value.h" #include "value.h"
#include "rendered-value.h" #include "rendered-value.h"
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
static inline void static inline void
cell_dirty (Cell *cell) cell_dirty (Cell *cell)
{ {
Sheet *sheet = cell->sheet; Sheet *sheet = cell->base.sheet;
/* Cells from the clipboard do not have a sheet attached */ /* Cells from the clipboard do not have a sheet attached */
if (sheet) if (sheet)
...@@ -96,7 +97,7 @@ cell_cleanout (Cell *cell) ...@@ -96,7 +97,7 @@ cell_cleanout (Cell *cell)
cell->format = NULL; cell->format = NULL;
} }
cell->cell_flags &= ~(CELL_HAS_EXPRESSION|CELL_QUEUED_FOR_RECALC); cell->base.flags &= ~(CELL_HAS_EXPRESSION|DEPENDENT_QUEUED_FOR_RECALC);
} }
/** /**
...@@ -120,8 +121,8 @@ cell_copy (Cell const *cell) ...@@ -120,8 +121,8 @@ cell_copy (Cell const *cell)
*new_cell = *cell; *new_cell = *cell;
/* The new cell is not linked into any of the major management structures */ /* The new cell is not linked into any of the major management structures */
new_cell->sheet = NULL; new_cell->base.sheet = NULL;
new_cell->cell_flags &= ~(CELL_QUEUED_FOR_RECALC|CELL_IN_SHEET_LIST|CELL_IN_EXPR_LIST); new_cell->base.flags &= ~(DEPENDENT_QUEUED_FOR_RECALC|CELL_IN_SHEET_LIST|CELL_IN_EXPR_LIST);
/* now copy properly the rest */ /* now copy properly the rest */
if (cell_has_expr (new_cell)) if (cell_has_expr (new_cell))
...@@ -218,7 +219,7 @@ cell_relocate (Cell *cell, ExprRewriteInfo *rwinfo) ...@@ -218,7 +219,7 @@ cell_relocate (Cell *cell, ExprRewriteInfo *rwinfo)
int const y = expr->array.y; int const y = expr->array.y;
if (x != 0 || y != 0) if (x != 0 || y != 0)
expr->array.corner.cell = expr->array.corner.cell =
sheet_cell_get (cell->sheet, sheet_cell_get (cell->base.sheet,
cell->pos.col - x, cell->pos.col - x,
cell->pos.row - y); cell->pos.row - y);
} }
...@@ -278,7 +279,7 @@ cell_set_text (Cell *cell, char const *text) ...@@ -278,7 +279,7 @@ cell_set_text (Cell *cell, char const *text)
if (val != NULL) { /* String was a value */ if (val != NULL) { /* String was a value */
cell_cleanout (cell); cell_cleanout (cell);
cell->cell_flags &= ~CELL_HAS_EXPRESSION; cell->base.flags &= ~CELL_HAS_EXPRESSION;
cell->value = val; cell->value = val;
cell->u.entered_text = string_get (text); cell->u.entered_text = string_get (text);
cell->format = format; cell->format = format;
...@@ -439,7 +440,7 @@ cell_set_expr_and_value (Cell *cell, ExprTree *expr, Value *v) ...@@ -439,7 +440,7 @@ cell_set_expr_and_value (Cell *cell, ExprTree *expr, Value *v)
cell_cleanout (cell); cell_cleanout (cell);
cell->u.expression = expr; cell->u.expression = expr;
cell->cell_flags |= CELL_HAS_EXPRESSION; cell->base.flags |= CELL_HAS_EXPRESSION;
sheet_cell_expr_link (cell); sheet_cell_expr_link (cell);
#if 0 #if 0
/* TODO : Should we add this for consistancy ? */ /* TODO : Should we add this for consistancy ? */
...@@ -478,7 +479,7 @@ cell_set_expr_internal (Cell *cell, ExprTree *expr, StyleFormat *opt_fmt) ...@@ -478,7 +479,7 @@ cell_set_expr_internal (Cell *cell, ExprTree *expr, StyleFormat *opt_fmt)
cell->format = opt_fmt; cell->format = opt_fmt;
cell->u.expression = expr; cell->u.expression = expr;
cell->cell_flags |= CELL_HAS_EXPRESSION; cell->base.flags |= CELL_HAS_EXPRESSION;
/* Until the value is recomputed, we put in this value. */ /* Until the value is recomputed, we put in this value. */
cell->value = value_new_error (NULL, gnumeric_err_RECALC); cell->value = value_new_error (NULL, gnumeric_err_RECALC);
...@@ -679,7 +680,7 @@ cell_render_value (Cell *cell) ...@@ -679,7 +680,7 @@ cell_render_value (Cell *cell)
MStyle * MStyle *
cell_get_mstyle (Cell const *cell) cell_get_mstyle (Cell const *cell)
{ {
return sheet_style_compute (cell->sheet, return sheet_style_compute (cell->base.sheet,
cell->pos.col, cell->pos.col,
cell->pos.row); cell->pos.row);
} }
...@@ -692,7 +693,7 @@ cell_set_mstyle (Cell const *cell, MStyle *mstyle) ...@@ -692,7 +693,7 @@ cell_set_mstyle (Cell const *cell, MStyle *mstyle)
range.start = cell->pos; range.start = cell->pos;
range.end = range.start; range.end = range.start;
sheet_style_attach (cell->sheet, range, mstyle); sheet_style_attach (cell->base.sheet, range, mstyle);
} }
char * char *
...@@ -771,7 +772,7 @@ cell_make_value (Cell *cell) ...@@ -771,7 +772,7 @@ cell_make_value (Cell *cell)
expr_tree_unref (cell->u.expression); expr_tree_unref (cell->u.expression);
cell->u.expression = NULL; cell->u.expression = NULL;
cell->cell_flags &= ~CELL_HAS_EXPRESSION; cell->base.flags &= ~CELL_HAS_EXPRESSION;
if (cell->rendered_value == NULL) if (cell->rendered_value == NULL)
cell_render_value (cell); cell_render_value (cell);
......
...@@ -3,32 +3,28 @@ ...@@ -3,32 +3,28 @@
#include <glib.h> #include <glib.h>
#include "gnumeric.h" #include "gnumeric.h"
#include "dependent.h"
#include "style.h"
#include "str.h"
typedef enum { typedef enum {
/* Cell has an expression rather than entered_text */ /* Cell has an expression rather than entered_text */
CELL_HAS_EXPRESSION = 0x1, CELL_HAS_EXPRESSION = 0x1,
/* Cell has been queued for recalc */
CELL_QUEUED_FOR_RECALC = 0x2,
/* Cell has be linked into the workbook wide expression list */ /* Cell has be linked into the workbook wide expression list */
CELL_IN_EXPR_LIST = 0x4, CELL_IN_EXPR_LIST = 0x2,
/* Cell is linked into the sheet */ /* Cell is linked into the sheet */
CELL_IN_SHEET_LIST = 0x8 CELL_IN_SHEET_LIST = 0x4
/* MUST BE <= 0xffff */
} CellFlags; } CellFlags;
typedef struct _CellComment CellComment; typedef struct _CellComment CellComment;
/* Definition of a Gnumeric Cell */ /* Definition of a Gnumeric Cell */
struct _Cell { struct _Cell {
Dependent base;
/* Mandatory state information */ /* Mandatory state information */
CellPos pos; CellPos pos;
CellFlags cell_flags;
Sheet *sheet;
ColRowInfo *col_info; ColRowInfo *col_info;
ColRowInfo *row_info; ColRowInfo *row_info;
...@@ -64,10 +60,10 @@ gboolean cell_is_number (Cell const * cell); ...@@ -64,10 +60,10 @@ gboolean cell_is_number (Cell const * cell);
gboolean cell_is_zero (Cell const * cell); gboolean cell_is_zero (Cell const * cell);
ExprArray const * cell_is_array (Cell const * cell); ExprArray const * cell_is_array (Cell const * cell);
gboolean cell_is_partial_array (Cell const * cell); gboolean cell_is_partial_array (Cell const * cell);
#define cell_needs_recalc(cell) ((cell)->cell_flags & CELL_QUEUED_FOR_RECALC) #define cell_needs_recalc(cell) ((cell)->base.flags & DEPENDENT_QUEUED_FOR_RECALC)
#define cell_has_expr(cell) ((cell)->cell_flags & CELL_HAS_EXPRESSION) #define cell_has_expr(cell) ((cell)->base.flags & CELL_HAS_EXPRESSION)
#define cell_is_linked(cell) ((cell)->cell_flags & CELL_IN_SHEET_LIST) #define cell_is_linked(cell) ((cell)->base.flags & CELL_IN_SHEET_LIST)
#define cell_expr_is_linked(cell) ((cell)->cell_flags & CELL_IN_EXPR_LIST) #define cell_expr_is_linked(cell) ((cell)->base.flags & CELL_IN_EXPR_LIST)
#define cell_has_comment(cell) ((cell)->comment != NULL) #define cell_has_comment(cell) ((cell)->comment != NULL)
/** /**
......
...@@ -17,6 +17,7 @@ ...@@ -17,6 +17,7 @@
#include <config.h> #include <config.h>
#include "cellspan.h" #include "cellspan.h"
#include "cell.h" #include "cell.h"
#include "style.h"
#include "colrow.h" #include "colrow.h"
#include "value.h" #include "value.h"
#include "rendered-value.h" #include "rendered-value.h"
...@@ -175,7 +176,7 @@ cell_calc_span (Cell const * const cell, int * const col1, int * const col2) ...@@ -175,7 +176,7 @@ cell_calc_span (Cell const * const cell, int * const col1, int * const col2)
return; return;
} }
sheet = cell->sheet; sheet = cell->base.sheet;
mstyle = cell_get_mstyle (cell); mstyle = cell_get_mstyle (cell);
align = value_get_default_halign (cell->value, mstyle); align = value_get_default_halign (cell->value, mstyle);
row = cell->pos.row; row = cell->pos.row;
...@@ -317,7 +318,7 @@ cell_calc_span (Cell const * const cell, int * const col1, int * const col2) ...@@ -317,7 +318,7 @@ cell_calc_span (Cell const * const cell, int * const col1, int * const col2)
cell_is_blank (sheet_cell_get (sheet, tmp, row)) && cell_is_blank (sheet_cell_get (sheet, tmp, row)) &&
NULL == row_span_get (ri, tmp)) { NULL == row_span_get (ri, tmp)) {
MStyle * const mstyle = MStyle * const mstyle =
sheet_style_compute (cell->sheet, tmp, row); sheet_style_compute (cell->base.sheet, tmp, row);
gboolean const res = gboolean const res =
(mstyle_get_align_h (mstyle) == HALIGN_CENTER_ACROSS_SELECTION); (mstyle_get_align_h (mstyle) == HALIGN_CENTER_ACROSS_SELECTION);
mstyle_unref (mstyle); mstyle_unref (mstyle);
...@@ -332,7 +333,7 @@ cell_calc_span (Cell const * const cell, int * const col1, int * const col2) ...@@ -332,7 +333,7 @@ cell_calc_span (Cell const * const cell, int * const col1, int * const col2)
if (tmp < SHEET_MAX_COLS && if (tmp < SHEET_MAX_COLS &&
cell_is_blank (sheet_cell_get (sheet, tmp, row))) { cell_is_blank (sheet_cell_get (sheet, tmp, row))) {
MStyle * const mstyle = MStyle * const mstyle =