Commit 3314f46e authored by Andreas J. Guelzow 's avatar Andreas J. Guelzow

We don't want to duplicate GnmConventions

2011-05-26  Andreas J. Guelzow <aguelzow@pyrshep.ca>

	* src/parse-util.h (gnm_conventions_dup): delete again
	* src/parse-util.c (gnm_conventions_dup): delete again
	* src/workbook-control.c (wb_control_parse_and_jump): use
	existing GnmConventions
parent 57cbb286
2011-05-26 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* src/parse-util.h (gnm_conventions_dup): delete again
* src/parse-util.c (gnm_conventions_dup): delete again
* src/workbook-control.c (wb_control_parse_and_jump): use
existing GnmConventions
2011-05-26 Andreas J. Guelzow <aguelzow@pyrshep.ca>
* src/workbook.c (workbook_sheet_state_size): adjust scale
......
......@@ -1399,13 +1399,6 @@ gnm_conventions_new (void)
return gnm_conventions_new_full (sizeof (GnmConventions));
}
GnmConventions *
gnm_conventions_dup (GnmConventions const *c)
{
GnmConventions *conv = g_memdup (c, sizeof (GnmConventions));
conv->ref_count = 1;
}
/**
* gnm_conventions_unref :
* @c : #GnmConventions
......
......@@ -200,7 +200,6 @@ struct _GnmConventions {
};
GnmConventions *gnm_conventions_new (void);
GnmConventions *gnm_conventions_new_full (unsigned size);
GnmConventions *gnm_conventions_dup (GnmConventions const*c);
GnmConventions *gnm_conventions_ref (GnmConventions *c);
void gnm_conventions_unref (GnmConventions *c);
......
......@@ -282,18 +282,25 @@ wb_control_parse_and_jump (WorkbookControl *wbc, char const *text)
GNM_EXPR_PARSE_DEFAULT);
if (target == NULL) {
GnmExprTop const *texpr;
GnmConventions *convs = gnm_conventions_dup
(sheet_get_conventions(sv->sheet));
convs->r1c1_addresses = !convs->r1c1_addresses;
texpr = gnm_expr_parse_str
(text, &pp, GNM_EXPR_PARSE_DEFAULT, convs, NULL);
(text, &pp, GNM_EXPR_PARSE_DEFAULT,
gnm_conventions_xls_r1c1, NULL);
if (texpr != NULL) {
target = gnm_expr_top_get_range (texpr);
gnm_expr_top_unref (texpr);
}
}
if (target == NULL) {
GnmExprTop const *texpr;
gnm_conventions_unref (convs);
texpr = gnm_expr_parse_str
(text, &pp, GNM_EXPR_PARSE_DEFAULT,
gnm_conventions_default, NULL);
if (texpr != NULL) {
target = gnm_expr_top_get_range (texpr);
gnm_expr_top_unref (texpr);
}
}
if (target == NULL) {
......
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