Commit 401cb7da authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

fix handling of multiline text. fix position of cursor line.


2002-09-04  Jody Goldberg <jody@gnome.org>

	* src/cell-draw.c (cell_draw) : fix handling of multiline text.
	* src/item-edit.c (item_edit_draw) : fix position of cursor line.

2002-09-03  Jody Goldberg <jody@gnome.org>

	* src/position.c (rangeref_name) : new.

	* src/expr.c (do_expr_as_string) : Use rangeref_name.

	* src/parser.y (sheetref) : support XL style 3d references
	(cellref) : accept XL style 3d references in addition to applix format.
	  Produce an error if an invalid combination is used.
	    eg sheet1:sheet2!a1:sheet3!a1
	  Prepare to support row only or col only references (A:C or 1:5)
parent 05e6a763
2002-09-04 Jody Goldberg <jody@gnome.org>
* src/cell-draw.c (cell_draw) : fix handling of multiline text.
* src/item-edit.c (item_edit_draw) : fix position of cursor line.
2002-09-03 Jody Goldberg <jody@gnome.org>
* src/position.c (rangeref_name) : new.
* src/expr.c (do_expr_as_string) : Use rangeref_name.
* src/parser.y (sheetref) : support XL style 3d references
(cellref) : accept XL style 3d references in addition to applix format.
Produce an error if an invalid combination is used.
eg sheet1:sheet2!a1:sheet3!a1
Prepare to support row only or col only references (A:C or 1:5)
2002-09-02 Jody Goldberg <jody@gnome.org>
* src/sheet.c (sheet_range_bounding_box) : doh!
......
......@@ -5,6 +5,9 @@ Jody:
* Begin to re-enable xls document metadata
* Fix translations in the bonobo build
* Enable translation of function category names
* Parser support for both sytaxes of 3d reference
* Parser support for row or col only references (A:C or 1:5)
* Fix some drawing issues related to the pango conversion
Morten:
* Leak plugging.
......
2002-09-04 Jody Goldberg <jody@gnome.org>
* src/cell-draw.c (cell_draw) : fix handling of multiline text.
* src/item-edit.c (item_edit_draw) : fix position of cursor line.
2002-09-03 Jody Goldberg <jody@gnome.org>
* src/position.c (rangeref_name) : new.
* src/expr.c (do_expr_as_string) : Use rangeref_name.
* src/parser.y (sheetref) : support XL style 3d references
(cellref) : accept XL style 3d references in addition to applix format.
Produce an error if an invalid combination is used.
eg sheet1:sheet2!a1:sheet3!a1
Prepare to support row only or col only references (A:C or 1:5)
2002-09-02 Jody Goldberg <jody@gnome.org>
* src/sheet.c (sheet_range_bounding_box) : doh!
......
2002-09-04 Jody Goldberg <jody@gnome.org>
* src/cell-draw.c (cell_draw) : fix handling of multiline text.
* src/item-edit.c (item_edit_draw) : fix position of cursor line.
2002-09-03 Jody Goldberg <jody@gnome.org>
* src/position.c (rangeref_name) : new.
* src/expr.c (do_expr_as_string) : Use rangeref_name.
* src/parser.y (sheetref) : support XL style 3d references
(cellref) : accept XL style 3d references in addition to applix format.
Produce an error if an invalid combination is used.
eg sheet1:sheet2!a1:sheet3!a1
Prepare to support row only or col only references (A:C or 1:5)
2002-09-02 Jody Goldberg <jody@gnome.org>
* src/sheet.c (sheet_range_bounding_box) : doh!
......
2002-09-04 Jody Goldberg <jody@gnome.org>
* *.c : remove ifdef WITH_BONOBOization of graphs
2002-08-30 Jody Goldberg <jody@gnome.org>
* boot.c (excel_read_metadata) : new.
......
......@@ -24,9 +24,7 @@
#include <value.h>
#include <gutils.h>
#ifdef WITH_BONOBO
#include <gnumeric-graph.h>
#endif
#include <xml-io.h>
#include <gal/util/e-xml-utils.h>
#include <libxml/tree.h>
......@@ -57,9 +55,7 @@ char const *const ms_vector_purpose_type_name [] =
typedef struct _ExcelChartSeries
{
struct {
#ifdef WITH_BONOBO
GnmGraphVectorType type;
#endif
int count, remote_ID;
} vector [MS_VECTOR_PURPOSE_MAX];
......@@ -125,15 +121,11 @@ excel_chart_series_new (void)
series->xml = NULL;
for (i = MS_VECTOR_PURPOSE_MAX; i-- > 0 ; ) {
series->vector [i].remote_ID = -1;
#ifdef WITH_BONOBO
series->vector [i].type = GNM_VECTOR_AUTO; /* may be reset later */
#endif
}
/* labels are always strings */
#ifdef WITH_BONOBO
series->vector [MS_VECTOR_PURPOSE_LABELS].type = GNM_VECTOR_STRING;
#endif
return series;
}
......@@ -156,13 +148,11 @@ excel_chart_series_write_xml (ExcelChartSeries *series,
xmlAddChild (data, series->xml);
for (i = 0 ; i < MS_VECTOR_PURPOSE_MAX; i++ )
if (series->vector [i].remote_ID >= 0) {
#ifdef WITH_BONOBO
xmlNode *v = gnm_graph_series_add_dimension (series->xml,
ms_vector_purpose_type_name [i]);
if (v != NULL)
e_xml_set_integer_prop_by_name (v, (xmlChar *)"ID",
series->vector [i].remote_ID);
#endif
}
}
......@@ -344,13 +334,10 @@ BC_R(ai)(ExcelChartHandler const *handle,
g_return_val_if_fail (sheet != NULL, FALSE);
g_return_val_if_fail (s->currentSeries != NULL, TRUE);
#ifdef WITH_BONOBO
s->currentSeries->vector [purpose].remote_ID =
gnm_graph_add_vector (s->graph, expr,
s->currentSeries->vector [purpose].type,
sheet);
#endif
}
} else {
g_return_val_if_fail (length == 0, TRUE);
......@@ -1723,7 +1710,6 @@ BC_R(vector_details)(ExcelChartReadState *s, BiffQuery *q, ExcelChartSeries *ser
MS_VECTOR_PURPOSE purpose,
int type_offset, int count_offset, char const *name)
{
#ifdef WITH_BONOBO
GnmGraphVectorType type;
guint16 e_type = GSF_LE_GET_GUINT16 (q->data + type_offset);
......@@ -1750,7 +1736,6 @@ BC_R(vector_details)(ExcelChartReadState *s, BiffQuery *q, ExcelChartSeries *ser
d (0, printf ("%d %s are %s\n",
series->vector [purpose].count, name,
gnm_graph_vector_type_name [series->vector [purpose].type]););
#endif
}
......@@ -1827,7 +1812,6 @@ BC_R(seriestext)(ExcelChartHandler const *handle,
/* A quick heuristic */
if (s->currentSeries != NULL &&
s->currentSeries->vector [MS_VECTOR_PURPOSE_LABELS].remote_ID == -1) {
#ifdef WITH_BONOBO
s->currentSeries->vector [MS_VECTOR_PURPOSE_LABELS].type = GNM_VECTOR_STRING;
s->currentSeries->vector [MS_VECTOR_PURPOSE_LABELS].remote_ID =
......@@ -1835,7 +1819,6 @@ BC_R(seriestext)(ExcelChartHandler const *handle,
gnm_expr_new_constant (value_new_string (str)),
GNM_VECTOR_STRING,
ms_container_sheet (s->parent));
#endif
}
/* TODO : handle axis and chart titles */
......@@ -2417,11 +2400,9 @@ ms_excel_chart (BiffQuery *q, MSContainer *container, MsBiffVersion ver, GObject
state.xml.currentChartGroup = NULL;
state.xml.dataFormat = NULL;
#ifdef WITH_BONOBO
if (graph != NULL)
state.graph = GNUMERIC_GRAPH (graph);
else
#endif
state.graph = NULL;
d (0, puts ("{ CHART"););
......@@ -2524,10 +2505,8 @@ ms_excel_chart (BiffQuery *q, MSContainer *container, MsBiffVersion ver, GObject
state.prev_opcode = q->opcode;
}
#ifdef WITH_BONOBO
if (state.graph != NULL)
gnm_graph_import_specification (state.graph, state.xml.doc);
#endif
/* Cleanup */
xmlFreeDoc (state.xml.doc);
......
......@@ -47,9 +47,7 @@
#include <sheet-object-widget.h>
#include <sheet-object-graphic.h>
#include <sheet-object-image.h>
#ifdef WITH_BONOBO
# include <gnumeric-graph.h>
#endif
#include <gnumeric-graph.h>
#include <gsf/gsf-input.h>
#include <gsf/gsf-utils.h>
......@@ -414,16 +412,7 @@ ms_sheet_create_obj (MSContainer *container, MSObj *obj)
}
case 0x05: { /* Chart */
#ifdef WITH_BONOBO
so = SHEET_OBJECT (gnm_graph_new (wb));
#else
so = sheet_object_box_new (FALSE); /* placeholder */
if (esheet->wb->warn_unsupported_graphs) {
/* TODO : Use IOContext when available */
esheet->wb->warn_unsupported_graphs = FALSE;
g_warning ("Graphs are not supported in non-bonobo version.");
}
#endif
break;
}
......@@ -4063,12 +4052,7 @@ ms_excel_read_sheet (BiffQuery *q, ExcelWorkbook *wb,
* at the NEXT record.
*/
if (q->opcode == BIFF_CHART_units) {
GObject *graph =
#ifdef WITH_BONOBO
gnm_graph_new (esheet->wb->gnum_wb);
#else
NULL;
#endif
GObject *graph = gnm_graph_new (esheet->wb->gnum_wb);
ms_excel_chart (q, sheet_container (esheet),
esheet->container.ver,
graph);
......
......@@ -380,7 +380,6 @@ cell_draw (Cell const *cell, MStyle const *mstyle,
inter_space = font_height;
}
y_offset += font_height - 1;
for (l = lines; l; l = l->next) {
char const * const str = l->data;
int len = 0;
......@@ -395,18 +394,18 @@ cell_draw (Cell const *cell, MStyle const *mstyle,
break;
case HALIGN_RIGHT:
len = style_font_string_width(style_font,str);
len = style_font_string_width (style_font,str);
x = rect.x + rect.width - 1 - len - indent;
break;
case HALIGN_CENTER:
case HALIGN_CENTER_ACROSS_SELECTION:
len = style_font_string_width(style_font,str);
len = style_font_string_width (style_font,str);
x = rect.x + h_center - len / 2;
}
draw_text (drawable, style_font, gc,
x, y1 + y_offset,
x, rect.y + y_offset,
str, strlen (str), attrs);
y_offset += inter_space;
......
......@@ -1251,30 +1251,22 @@ do_expr_as_string (GnmExpr const *expr, ParsePos const *pp,
Value const *v = expr->constant.value;
if (v->type == VALUE_STRING)
return gnumeric_strescape (v->v_str.val->str);
if (v->type == VALUE_CELLRANGE) {
char *b, *a = cellref_name (&v->v_range.cell.a, pp, FALSE);
if (cellref_equal (&v->v_range.cell.a, &v->v_range.cell.b))
return a;
b = cellref_name (&v->v_range.cell.b, pp,
v->v_range.cell.a.sheet == v->v_range.cell.b.sheet);
res = g_strconcat (a, ":", b, NULL);
g_free (a);
g_free (b);
} else {
res = value_get_as_string (v);
if (v->type == VALUE_CELLRANGE)
return rangeref_name (&v->v_range.cell, pp);
/* If the number has a sign, pretend that it is the result of
* OPER_UNARY_{NEG,PLUS}. It is not clear how we would
* currently get negative numbers here, but some loader might
* do it.
*/
if ((v->type == VALUE_INTEGER || v->type == VALUE_FLOAT) &&
(res[0] == '-' || res[0] == '+') &&
operations[GNM_EXPR_OP_UNARY_NEG].prec <= paren_level) {
char *new_res = g_strconcat ("(", res, ")", NULL);
g_free (res);
return new_res;
}
res = value_get_as_string (v);
/* If the number has a sign, pretend that it is the result of
* OPER_UNARY_{NEG,PLUS}. It is not clear how we would
* currently get negative numbers here, but some loader might
* do it.
*/
if ((v->type == VALUE_INTEGER || v->type == VALUE_FLOAT) &&
(res[0] == '-' || res[0] == '+') &&
operations[GNM_EXPR_OP_UNARY_NEG].prec <= paren_level) {
char *new_res = g_strconcat ("(", res, ")", NULL);
g_free (res);
return new_res;
}
return res;
}
......
......@@ -29,10 +29,6 @@
#include "formats.h"
#include "cmd-edit.h"
#include "clipboard.h"
#ifdef WITH_BONOBO
# include "sheet-object-container.h"
#endif
#include <gal/widgets/e-cursors.h>
#include <gsf/gsf-impl-utils.h>
#include <gdk/gdkkeysyms.h>
......
......@@ -150,8 +150,8 @@ item_edit_draw (GnomeCanvasItem *item, GdkDrawable *drawable,
left_pos, top_pos, layout);
if (item_edit->cursor_visible)
gdk_draw_line (drawable, canvas->style->black_gc,
left_pos + PANGO_PIXELS (pos.x), PANGO_PIXELS (pos.y),
left_pos + PANGO_PIXELS (pos.x), PANGO_PIXELS (pos.y + pos.height));
left_pos + PANGO_PIXELS (pos.x), top_pos + PANGO_PIXELS (pos.y),
left_pos + PANGO_PIXELS (pos.x), top_pos + PANGO_PIXELS (pos.y + pos.height));
g_object_unref (G_OBJECT (layout));
}
......
......@@ -41,6 +41,134 @@
#include <glib.h>
#include <string.h>
inline static char *
col_name_internal (char *buf, int col)
{
g_return_val_if_fail (col < SHEET_MAX_COLS, buf);
g_return_val_if_fail (col >= 0, buf);
if (col <= 'Z'-'A') {
*buf++ = col + 'A';
} else {
int a = col / ('Z'-'A'+1);
int b = col % ('Z'-'A'+1);
*buf++ = a + 'A' - 1;
*buf++ = b + 'A';
}
return buf;
}
inline static char *
row_name_internal (char *buf, int row)
{
int len = g_snprintf (buf, 6, "%d", row + 1); /* The 6 is hardcoded, see comments in row{s}_name */
return buf + len;
}
inline static int
cellref_abs_col (CellRef const *ref, ParsePos const *pp)
{
int col = (ref->col_relative) ? pp->eval.col + ref->col : ref->col;
/* ICK! XL compatibility kludge */
col %= SHEET_MAX_COLS;
if (col < 0)
return col + SHEET_MAX_COLS;
return col;
}
inline static int
cellref_abs_row (CellRef const *ref, ParsePos const *pp)
{
int row = (ref->row_relative) ? pp->eval.row + ref->row : ref->row;
/* ICK! XL compatibility kludge */
row %= SHEET_MAX_ROWS;
if (row < 0)
return row + SHEET_MAX_ROWS;
return row;
}
/**
* rangeref_name :
* @ref :
* @pp :
*
**/
char *
rangeref_name (RangeRef const *ref, ParsePos const *pp)
{
char buf [2*(10 /* max digits in 32 bit row */
+ 7 /* max letters in 32 bit col */
+ 2 /* dollar signs for abs */
) + 2 /* colon and eos */];
char *p = buf;
Range r;
r.start.col = cellref_abs_col (&ref->a, pp);
r.end.col = cellref_abs_col (&ref->b, pp);
r.start.row = cellref_abs_row (&ref->a, pp);
r.end.row = cellref_abs_row (&ref->b, pp);
/* be sure to use else if so that a1:iv65535 does not vanish */
if (r.start.col == 0 && r.end.col == SHEET_MAX_COLS-1) {
if (!ref->a.row_relative)
*p++ = '$';
p = row_name_internal (p, r.start.row);
*p++ = ':';
if (!ref->b.row_relative)
*p++ = '$';
p = row_name_internal (p, r.end.row);
} else if (r.start.row == 0 && r.end.row == SHEET_MAX_ROWS-1) {
if (!ref->a.col_relative)
*p++ = '$';
p = col_name_internal (p, r.start.col);
*p++ = ':';
if (!ref->b.col_relative)
*p++ = '$';
p = col_name_internal (p, r.end.col);
} else {
if (!ref->a.col_relative)
*p++ = '$';
p = col_name_internal (p, r.start.col);
if (!ref->a.row_relative)
*p++ = '$';
p = row_name_internal (p, r.start.row);
if (r.start.col != r.end.col || r.start.row != r.end.row) {
*p++ = ':';
if (!ref->b.col_relative)
*p++ = '$';
p = col_name_internal (p, r.end.col);
if (!ref->b.row_relative)
*p++ = '$';
p = row_name_internal (p, r.end.row);
}
}
*p = '\0';
if (ref->a.sheet == NULL)
return g_strdup (buf);
/* For the expression leak printer. */
if (pp->wb == NULL && pp->sheet == NULL)
return g_strconcat ("'?'!", buf, NULL);
if (ref->b.sheet == NULL || ref->a.sheet == ref->b.sheet) {
if (pp->wb == NULL || ref->a.sheet->workbook == pp->wb)
return g_strconcat (ref->a.sheet->name_quoted, "!", buf, NULL);
return g_strconcat ("[", ref->a.sheet->workbook->filename, "]",
ref->a.sheet->name_quoted, "!", buf, NULL);
} else {
if (pp->wb == NULL || ref->a.sheet->workbook == pp->wb)
return g_strconcat (ref->a.sheet->name_quoted, ":", ref->b.sheet->name_quoted, "!", buf, NULL);
return g_strconcat ("[", ref->a.sheet->workbook->filename, "]",
ref->a.sheet->name_quoted, ":", ref->b.sheet->name_quoted, "!", buf, NULL);
}
}
/* Can remove sheet since local references have NULL sheet */
char *
cellref_name (CellRef const *cell_ref, ParsePos const *pp, gboolean no_sheetname)
......@@ -302,24 +430,6 @@ gnumeric_char_start_expr_p (char const * c)
return NULL;
}
static char *
col_name_internal (char *buf, int col)
{
g_return_val_if_fail (col < SHEET_MAX_COLS, buf);
g_return_val_if_fail (col >= 0, buf);
if (col <= 'Z'-'A') {
*buf++ = col + 'A';
} else {
int a = col / ('Z'-'A'+1);
int b = col % ('Z'-'A'+1);
*buf++ = a + 'A' - 1;
*buf++ = b + 'A';
}
return buf;
}
char const *
col_name (int col)
{
......@@ -343,13 +453,6 @@ cols_name (int start_col, int end_col)
return buffer;
}
static char *
row_name_internal (char *buf, int row)
{
int len = g_snprintf (buf, 6, "%d", row + 1); /* The 6 is hardcoded, see comments in row{s}_name */
return buf + len;
}
char const *
row_name (int row)
{
......
......@@ -8,7 +8,8 @@ char const *cols_name (int start_col, int end_col);
char const *row_name (int row);
char const *rows_name (int start_row, int end_col);
char *cellref_name (CellRef const *cell_ref,
char *rangeref_name (RangeRef const *ref, ParsePos const *pp);
char *cellref_name (CellRef const *ref,
ParsePos const *pp, gboolean no_sheetname);
char const *cellref_get (CellRef *out, char const *in,
CellPos const *pos);
......
%{
/* vim: set sw=8: -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/*
* Gnumeric Parser
*
......@@ -421,7 +422,7 @@ int yyparse (void);
}
%type <list> opt_exp arg_list array_row, array_cols
%type <expr> exp array_exp function string_opt_quote cellref
%token <expr> STRING QUOTED_STRING CONSTANT CELLREF GTE LTE NE AND OR NOT
%token <expr> STRING QUOTED_STRING CONSTANT CELLREF RANGEREF GTE LTE NE AND OR NOT
%token SEPARATOR INVALID_TOKEN
%type <sheet> sheetref opt_sheetref
......@@ -592,6 +593,18 @@ sheetref: string_opt_quote SHEET_SEP {
$$.first = sheet;
$$.last = NULL;
}
| string_opt_quote RANGE_SEP string_opt_quote SHEET_SEP {
Sheet *a_sheet = parser_sheet_by_name (state->pos->wb, $1);
Sheet *b_sheet = parser_sheet_by_name (state->pos->wb, $3);
unregister_allocation ($1); gnm_expr_unref ($1);
unregister_allocation ($3); gnm_expr_unref ($3);
if (a_sheet == NULL || b_sheet == NULL)
return ERROR;
$$.first = a_sheet;
$$.last = b_sheet;
}
| '[' string_opt_quote ']' string_opt_quote SHEET_SEP {
Workbook *wb = application_workbook_get_by_name (
......@@ -606,6 +619,21 @@ sheetref: string_opt_quote SHEET_SEP {
$$.first = sheet;
$$.last = NULL;
}
| '[' string_opt_quote ']' string_opt_quote RANGE_SEP string_opt_quote SHEET_SEP {
Workbook *wb = application_workbook_get_by_name (
$2->constant.value->v_str.val->str);
Sheet *a_sheet = parser_sheet_by_name (wb, $4);
Sheet *b_sheet = parser_sheet_by_name (wb, $6);
unregister_allocation ($2); gnm_expr_unref ($2);
unregister_allocation ($4); gnm_expr_unref ($4);
unregister_allocation ($6); gnm_expr_unref ($6);
if (a_sheet == NULL || b_sheet == NULL)
return ERROR;
$$.first = a_sheet;
$$.last = b_sheet;
}
;
opt_sheetref: sheetref
......@@ -624,18 +652,27 @@ cellref: CELLREF {
| sheetref CELLREF {
$2->cellref.ref.sheet = $1.first;
if (state->use_excel_reference_conventions && $1.last != NULL) {
if ($1.last != NULL) {
CellRef tmp = $2->cellref.ref;
$$ = register_expr_allocation
(gnm_expr_new_constant
(value_new_cellrange (&($2->cellref.ref), &tmp,
state->pos->eval.col, state->pos->eval.row)));
tmp.sheet = $1.last;
$$ = register_expr_allocation (
gnm_expr_new_constant (
value_new_cellrange (&($2->cellref.ref), &tmp,
state->pos->eval.col,
state->pos->eval.row)));
unregister_allocation ($2);
gnm_expr_unref ($2);
} else
$$ = $2;
}
/* special case to handle 3:5 or A:C style references. */
| RANGEREF { $$ = $1; }
| sheetref RANGEREF {
$2->constant.value->v_range.cell.a.sheet = $1.first;
$2->constant.value->v_range.cell.b.sheet = $1.last;
}
| CELLREF RANGE_SEP CELLREF {
unregister_allocation ($3);
unregister_allocation ($1);
......@@ -657,14 +694,29 @@ cellref: CELLREF {
}
| sheetref CELLREF RANGE_SEP opt_sheetref CELLREF {
gboolean failed;
unregister_allocation ($5);
unregister_allocation ($2);
$2->cellref.ref.sheet = $1.first;
if (state->use_excel_reference_conventions) {
$5->cellref.ref.sheet = $1.last ? $1.last : $1.first;
} else {
$5->cellref.ref.sheet = $4.first ? $4.first : $1.first;
if ($1.last != NULL) {
$5->cellref.ref.sheet = $1.last;
failed = ($4.first != NULL || $4.last != NULL);
} else if ($4.first != NULL) {
$5->cellref.ref.sheet = $4.first;
failed = ($4.last != NULL);
}
if (failed) {
gnm_expr_unref ($5);
gnm_expr_unref ($2);
return gnumeric_parse_error (
state, PERR_3D_NAME,
g_strdup (_("Invalid syntax for a 3d reference")),
state->expr_text - state->expr_backup, 0);
}
$$ = register_expr_allocation
(gnm_expr_new_constant
(value_new_cellrange (&($2->cellref.ref), &($5->cellref.ref),
......@@ -938,10 +990,23 @@ yylex (void)
g_warning ("%s is not an integer, but was expected to be one", start);
} else if (errno != ERANGE) {
/* Check for a Row range ref (3:4 == A3:IV4) */
if (*end == ':' && l < SHEET_MAX_COLS) {
/* TODO : adjust parser to allow returning
* a range, not just a cellref
*/
if (end[0] == ':' && end[1] != '\0' && l < SHEET_MAX_ROWS) {
char *end2;
long r = strtol (end+1, &end2, 10);
if (end+1 != end2 && errno != ERANGE && r < SHEET_MAX_ROWS) {
CellRef a, b;
a.sheet = b.sheet = NULL;
a.col_relative = a.row_relative = b.col_relative = b.row_relative = TRUE;
a.col = 0; b.col = SHEET_MAX_COLS - 1;
a.row = l; b.row = r;
yylval.expr = register_expr_allocation (
gnm_expr_new_constant (
value_new_cellrange (&a, &b,
state->pos->eval.col,
state->pos->eval.row)));
state->expr_text = end2;
return RANGEREF;
}
}
v = value_new_int (l);
state->expr_text = end;
......
......@@ -274,7 +274,8 @@ cellref_hash (const CellRef *cr)
return h;
}
RangeRef *value_to_rangeref (Value *v, gboolean release)
RangeRef *
value_to_rangeref (Value *v, gboolean release)
{
RangeRef *gr;
......@@ -290,6 +291,7 @@ RangeRef *value_to_rangeref (Value *v, gboolean release)
}
/**
* range_ref_normalize : Take a range_ref and normalize it
* by converting to absolute coords and handling inversions.
......
......@@ -63,9 +63,6 @@
#include <errno.h>
#include <string.h>
#include <limits.h>
#ifdef WITH_BONOBO
#include <bonobo/bonobo-exception.h>
#endif
/* Precision to use when saving point measures. */
#define POINT_SIZE_PRECISION 3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment