gnumeric r17275 - in trunk: . plugins/excel plugins/fn-database plugins/fn-date plugins/fn-eng plugins/fn-erlang plugins/fn-financial plugins/fn-info plugins/fn-lookup plugins/fn-string src src/dialogs
- From: mortenw svn gnome org
- To: svn-commits-list gnome org
- Subject: gnumeric r17275 - in trunk: . plugins/excel plugins/fn-database plugins/fn-date plugins/fn-eng plugins/fn-erlang plugins/fn-financial plugins/fn-info plugins/fn-lookup plugins/fn-string src src/dialogs
- Date: Wed, 1 Apr 2009 18:14:50 +0000 (UTC)
Author: mortenw
Date: Wed Apr 1 18:14:50 2009
New Revision: 17275
URL: http://svn.gnome.org/viewvc/gnumeric?rev=17275&view=rev
Log:
2009-04-01 Morten Welinder <terra gnome org>
* src/expr-name.c (expr_name_name): New function.
* */*.c: don't include str.h unless we have to.
Modified:
trunk/ChangeLog
trunk/NEWS
trunk/plugins/excel/ms-chart.c
trunk/plugins/excel/ms-container.c
trunk/plugins/excel/ms-excel-read.c
trunk/plugins/excel/ms-formula-read.c
trunk/plugins/excel/ms-formula-write.c
trunk/plugins/excel/xlsx-read.c
trunk/plugins/fn-database/functions.c
trunk/plugins/fn-date/functions.c
trunk/plugins/fn-eng/functions.c
trunk/plugins/fn-erlang/functions.c
trunk/plugins/fn-financial/functions.c
trunk/plugins/fn-info/functions.c
trunk/plugins/fn-lookup/functions.c
trunk/plugins/fn-string/functions.c
trunk/src/cell.c
trunk/src/commands.c
trunk/src/complete-sheet.c
trunk/src/consolidate.c
trunk/src/dialogs/dialog-define-names.c
trunk/src/dialogs/dialog-goto-cell.c
trunk/src/dialogs/dialog-paste-names.c
trunk/src/expr-name.c
trunk/src/expr-name.h
trunk/src/expr.c
trunk/src/gnm-style-impl.h
trunk/src/mstyle.c
trunk/src/number-match.c
trunk/src/parse-util.c
trunk/src/parser.y
trunk/src/print-cell.c
trunk/src/sheet-filter.c
trunk/src/sheet-object-graph.c
trunk/src/sheet.c
trunk/src/validation.c
trunk/src/validation.h
trunk/src/workbook-view.c
Modified: trunk/NEWS
==============================================================================
--- trunk/NEWS (original)
+++ trunk/NEWS Wed Apr 1 18:14:50 2009
@@ -11,6 +11,8 @@
[#577348] [#577351] [#577399] [#577400] [#577503] [#577504]
* Add sorted sheet list to tab menu.
* Fix criticals during Lotus load.
+ * Clean up Sheet object.
+ * Clean up str.h usage.
--------------------------------------------------------------------------
Gnumeric 1.9.5
Modified: trunk/plugins/excel/ms-chart.c
==============================================================================
--- trunk/plugins/excel/ms-chart.c (original)
+++ trunk/plugins/excel/ms-chart.c Wed Apr 1 18:14:50 2009
@@ -25,7 +25,6 @@
#include <value.h>
#include <gutils.h>
#include <graph.h>
-#include <str.h>
#include <style-color.h>
#include <sheet-object-graph.h>
#include <workbook-view.h>
@@ -5409,7 +5408,7 @@
GSF_LE_SET_GUINT16 (dat + 4, 0);
ms_biff_put_var_write (s->bp, (guint8*) dat, 6);
excel_write_string (s->bp, STR_TWO_BYTE_LENGTH,
- value->v_str.val->str);
+ value_peek_string (value));
ms_biff_put_commit (s->bp);
continue;
default:
Modified: trunk/plugins/excel/ms-container.c
==============================================================================
--- trunk/plugins/excel/ms-container.c (original)
+++ trunk/plugins/excel/ms-container.c Wed Apr 1 18:14:50 2009
@@ -18,7 +18,6 @@
#include "ms-excel-util.h"
#include <expr-name.h>
-#include <str.h>
#include <value.h>
#include <gsf/gsf-utils.h>
Modified: trunk/plugins/excel/ms-excel-read.c
==============================================================================
--- trunk/plugins/excel/ms-excel-read.c (original)
+++ trunk/plugins/excel/ms-excel-read.c Wed Apr 1 18:14:50 2009
@@ -54,6 +54,7 @@
#include <input-msg.h>
#include <parse-util.h> /* for cell_name */
#include <ranges.h>
+#include <str.h>
#include <expr.h>
#include <expr-name.h>
#include <value.h>
Modified: trunk/plugins/excel/ms-formula-read.c
==============================================================================
--- trunk/plugins/excel/ms-formula-read.c (original)
+++ trunk/plugins/excel/ms-formula-read.c Wed Apr 1 18:14:50 2009
@@ -22,7 +22,6 @@
#include <value.h>
#include <expr-impl.h>
#include <expr-name.h>
-#include <str.h>
#include <parse-util.h>
#include <sheet.h>
#include <workbook.h>
@@ -643,9 +642,9 @@
if (tmp != NULL) {
if (GNM_EXPR_GET_OPER (tmp) == GNM_EXPR_OP_CONSTANT &&
VALUE_IS_STRING (tmp->constant.value))
- f_name = tmp->constant.value->v_str.val->str;
+ f_name = value_peek_string (tmp->constant.value);
else if (GNM_EXPR_GET_OPER (tmp) == GNM_EXPR_OP_NAME)
- f_name = tmp->name.name->name->str;
+ f_name = expr_name_name (tmp->name.name);
}
if (f_name == NULL) {
Modified: trunk/plugins/excel/ms-formula-write.c
==============================================================================
--- trunk/plugins/excel/ms-formula-write.c (original)
+++ trunk/plugins/excel/ms-formula-write.c Wed Apr 1 18:14:50 2009
@@ -29,7 +29,6 @@
#include <expr.h>
#include <expr-impl.h>
#include <expr-name.h>
-#include <str.h>
#include <parse-util.h>
#include <goffice/app/io-context.h>
@@ -742,7 +741,7 @@
}
case VALUE_STRING:
- write_string (pd, v->v_str.val->str);
+ write_string (pd, value_peek_string (v));
break;
case VALUE_CELLRANGE:
Modified: trunk/plugins/excel/xlsx-read.c
==============================================================================
--- trunk/plugins/excel/xlsx-read.c (original)
+++ trunk/plugins/excel/xlsx-read.c Wed Apr 1 18:14:50 2009
@@ -33,6 +33,7 @@
#include "gnm-format.h"
#include "cell.h"
#include "position.h"
+#include "str.h"
#include "expr.h"
#include "expr-name.h"
#include "print-info.h"
Modified: trunk/plugins/fn-database/functions.c
==============================================================================
--- trunk/plugins/fn-database/functions.c (original)
+++ trunk/plugins/fn-database/functions.c Wed Apr 1 18:14:50 2009
@@ -20,17 +20,16 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
+
#include <gnumeric-config.h>
#include <gnumeric.h>
#include <func.h>
#include <parse-util.h>
-#include <str.h>
#include <cell.h>
#include <sheet.h>
#include <workbook.h>
#include <value.h>
-#include <number-match.h>
#include <collect.h>
#include <rangefunc.h>
#include <gnm-i18n.h>
Modified: trunk/plugins/fn-date/functions.c
==============================================================================
--- trunk/plugins/fn-date/functions.c (original)
+++ trunk/plugins/fn-date/functions.c Wed Apr 1 18:14:50 2009
@@ -26,7 +26,6 @@
#include <func.h>
#include <parse-util.h>
-#include <str.h>
#include <cell.h>
#include <gnm-datetime.h>
#include <value.h>
Modified: trunk/plugins/fn-eng/functions.c
==============================================================================
--- trunk/plugins/fn-eng/functions.c (original)
+++ trunk/plugins/fn-eng/functions.c Wed Apr 1 18:14:50 2009
@@ -27,7 +27,6 @@
#include <parse-util.h>
#include <complex.h>
-#include <str.h>
#include <value.h>
#include <mathfunc.h>
#include <collect.h>
Modified: trunk/plugins/fn-erlang/functions.c
==============================================================================
--- trunk/plugins/fn-erlang/functions.c (original)
+++ trunk/plugins/fn-erlang/functions.c Wed Apr 1 18:14:50 2009
@@ -28,7 +28,6 @@
#include <gnumeric.h>
#include <func.h>
#include <parse-util.h>
-#include <str.h>
#include <cell.h>
#include <value.h>
#include <mathfunc.h>
Modified: trunk/plugins/fn-financial/functions.c
==============================================================================
--- trunk/plugins/fn-financial/functions.c (original)
+++ trunk/plugins/fn-financial/functions.c Wed Apr 1 18:14:50 2009
@@ -30,7 +30,6 @@
#include <tools/goal-seek.h>
#include <collect.h>
#include <value.h>
-#include <str.h>
#include <mathfunc.h>
#include <gnm-format.h>
#include <workbook.h>
Modified: trunk/plugins/fn-info/functions.c
==============================================================================
--- trunk/plugins/fn-info/functions.c (original)
+++ trunk/plugins/fn-info/functions.c Wed Apr 1 18:14:50 2009
@@ -29,12 +29,12 @@
* attributes, and the comments on their behviour are. Hence he holds partial
* copyright on the CELL implementation.
*/
+
#include <gnumeric-config.h>
#include <gnumeric.h>
#include <func.h>
#include <parse-util.h>
#include <cell.h>
-#include <str.h>
#include <ranges.h>
#include <sheet.h>
#include <workbook.h>
Modified: trunk/plugins/fn-lookup/functions.c
==============================================================================
--- trunk/plugins/fn-lookup/functions.c (original)
+++ trunk/plugins/fn-lookup/functions.c Wed Apr 1 18:14:50 2009
@@ -30,7 +30,6 @@
#include <parse-util.h>
#include <dependent.h>
#include <cell.h>
-#include <str.h>
#include <sheet.h>
#include <value.h>
#include <ranges.h>
Modified: trunk/plugins/fn-string/functions.c
==============================================================================
--- trunk/plugins/fn-string/functions.c (original)
+++ trunk/plugins/fn-string/functions.c Wed Apr 1 18:14:50 2009
@@ -28,7 +28,6 @@
#include <parse-util.h>
#include <cell.h>
#include <gnm-format.h>
-#include <str.h>
#include <gutils.h>
#include <sheet.h>
#include <workbook.h>
Modified: trunk/src/cell.c
==============================================================================
--- trunk/src/cell.c (original)
+++ trunk/src/cell.c Wed Apr 1 18:14:50 2009
@@ -17,7 +17,6 @@
#include "expr-impl.h"
#include "rendered-value.h"
#include "value.h"
-#include "str.h"
#include "style.h"
#include "ranges.h"
#include "gnm-format.h"
@@ -348,7 +347,8 @@
gnm_cell_is_blank (GnmCell const * cell)
{
return gnm_cell_is_empty (cell) ||
- (VALUE_IS_STRING (cell->value) && *(cell->value->v_str.val->str) == '\0');
+ (VALUE_IS_STRING (cell->value) &&
+ *value_peek_string (cell->value) == '\0');
}
GnmValue *
Modified: trunk/src/commands.c
==============================================================================
--- trunk/src/commands.c (original)
+++ trunk/src/commands.c Wed Apr 1 18:14:50 2009
@@ -5787,7 +5787,7 @@
{
CmdRemoveName *me = CMD_REMOVE_NAME (cmd);
GnmNamedExpr *nexpr =
- expr_name_add (&me->nexpr->pos, me->nexpr->name->str,
+ expr_name_add (&me->nexpr->pos, expr_name_name (me->nexpr),
me->texpr, NULL, TRUE, NULL);
if (nexpr) {
me->texpr = NULL;
@@ -5851,7 +5851,8 @@
me->texpr = NULL;
me->cmd.sheet = wb_control_cur_sheet (wbc);
me->cmd.size = 1;
- me->cmd.cmd_descriptor = g_strdup_printf (_("Remove Name %s"), nexpr->name->str);
+ me->cmd.cmd_descriptor = g_strdup_printf (_("Remove Name %s"),
+ expr_name_name (nexpr));
return command_push_undo (wbc, G_OBJECT (me));
}
Modified: trunk/src/complete-sheet.c
==============================================================================
--- trunk/src/complete-sheet.c (original)
+++ trunk/src/complete-sheet.c Wed Apr 1 18:14:50 2009
@@ -16,7 +16,6 @@
#include "sheet.h"
#include "cell.h"
-#include "str.h"
#include "value.h"
#include "parse-util.h"
Modified: trunk/src/consolidate.c
==============================================================================
--- trunk/src/consolidate.c (original)
+++ trunk/src/consolidate.c Wed Apr 1 18:14:50 2009
@@ -33,7 +33,6 @@
#include "selection.h"
#include "sheet.h"
#include "value.h"
-#include "str.h"
#include "workbook.h"
#include "workbook-control.h"
Modified: trunk/src/dialogs/dialog-define-names.c
==============================================================================
--- trunk/src/dialogs/dialog-define-names.c (original)
+++ trunk/src/dialogs/dialog-define-names.c Wed Apr 1 18:14:50 2009
@@ -129,7 +129,7 @@
g_return_val_if_fail (nexpr != NULL, NULL);
g_return_val_if_fail (nexpr->name != NULL, NULL);
- g_return_val_if_fail (nexpr->name->str != NULL, NULL);
+ g_return_val_if_fail (expr_name_name (nexpr) != NULL, NULL);
if (ignore_placeholders && expr_name_is_placeholder (nexpr))
continue;
@@ -137,7 +137,7 @@
continue;
/* no need for UTF-8 or collation magic, just equality */
- if (strcmp (name, nexpr->name->str) == 0)
+ if (strcmp (name, expr_name_name (nexpr)) == 0)
return nexpr;
}
@@ -153,7 +153,7 @@
gnm_conventions_default);
gnm_expr_entry_load_from_text (state->expr_entry, txt);
g_free (txt);
- gtk_entry_set_text (state->name, nexpr->name->str);
+ gtk_entry_set_text (state->name, expr_name_name (nexpr));
} else {
gnm_expr_entry_load_from_text (state->expr_entry, "");
gtk_entry_set_text (state->name, "");
@@ -211,7 +211,7 @@
if (nexpr != NULL )
switchscope = !nexpr->is_permanent &&
- (NULL == name_guru_in_list (state, nexpr->name->str,
+ (NULL == name_guru_in_list (state, expr_name_name (nexpr),
TRUE, (nexpr->pos.sheet == NULL)));
}
@@ -265,13 +265,16 @@
if (nexpr->pos.sheet != NULL) {
char *name = g_strdup_printf ("%s!%s",
nexpr->pos.sheet->name_unquoted,
- nexpr->name->str);
+ expr_name_name (nexpr));
gtk_list_store_set (state->model,
&iter, 0, name, 1, nexpr, -1);
g_free (name);
} else
gtk_list_store_set (state->model,
- &iter, 0, nexpr->name->str, 1, nexpr, -1);
+ &iter,
+ 0, expr_name_name (nexpr),
+ 1, nexpr,
+ -1);
}
name_guru_update_sensitivity (state, TRUE);
}
@@ -311,7 +314,7 @@
g_return_if_fail (nexpr != NULL);
g_return_if_fail (nexpr->name != NULL);
- g_return_if_fail (nexpr->name->str != NULL);
+ g_return_if_fail (expr_name_name (nexpr) != NULL);
state->cur_name = nexpr;
Modified: trunk/src/dialogs/dialog-goto-cell.c
==============================================================================
--- trunk/src/dialogs/dialog-goto-cell.c (original)
+++ trunk/src/dialogs/dialog-goto-cell.c Wed Apr 1 18:14:50 2009
@@ -142,12 +142,12 @@
if (nexpr->pos.sheet != NULL)
expr_name = g_strdup_printf ("%s!%s",
nexpr->pos.sheet->name_unquoted,
- nexpr->name->str);
+ expr_name_name (nexpr));
gtk_tree_store_set (user->state->model, &iter,
- ITEM_NAME, expr_name ? expr_name : nexpr->name->str,
- SHEET_POINTER, nexpr->pos.sheet,
- EXPRESSION, nexpr,
- -1);
+ ITEM_NAME, expr_name ? expr_name : expr_name_name (nexpr),
+ SHEET_POINTER, nexpr->pos.sheet,
+ EXPRESSION, nexpr,
+ -1);
g_free (expr_name);
}
Modified: trunk/src/dialogs/dialog-paste-names.c
==============================================================================
--- trunk/src/dialogs/dialog-paste-names.c (original)
+++ trunk/src/dialogs/dialog-paste-names.c Wed Apr 1 18:14:50 2009
@@ -27,7 +27,6 @@
#include "help.h"
#include <expr.h>
-#include <str.h>
#include <expr-name.h>
#include <sheet.h>
#include <sheet-view.h>
Modified: trunk/src/expr-name.c
==============================================================================
--- trunk/src/expr-name.c (original)
+++ trunk/src/expr-name.c Wed Apr 1 18:14:50 2009
@@ -633,6 +633,13 @@
nexpr->name->str);
}
+const char *
+expr_name_name (GnmNamedExpr const *nexpr)
+{
+ g_return_val_if_fail (nexpr != NULL, NULL);
+ return nexpr->name->str;
+}
+
/**
* expr_name_as_string :
* @nexpr :
Modified: trunk/src/expr-name.h
==============================================================================
--- trunk/src/expr-name.h (original)
+++ trunk/src/expr-name.h Wed Apr 1 18:14:50 2009
@@ -41,6 +41,7 @@
void expr_name_remove (GnmNamedExpr *nexpr);
GnmValue*expr_name_eval (GnmNamedExpr const *ne, GnmEvalPos const *ep,
GnmExprEvalFlags flags);
+const char *expr_name_name (GnmNamedExpr const *nexpr);
char *expr_name_as_string (GnmNamedExpr const *ne, GnmParsePos const *pp,
GnmConventions const *fmt);
char *expr_name_set_scope (GnmNamedExpr *ne, Sheet *sheet);
Modified: trunk/src/expr.c
==============================================================================
--- trunk/src/expr.c (original)
+++ trunk/src/expr.c Wed Apr 1 18:14:50 2009
@@ -30,7 +30,6 @@
#include "func.h"
#include "cell.h"
#include "sheet.h"
-#include "str.h"
#include "value.h"
#include "parse-util.h"
#include "ranges.h"
@@ -838,7 +837,7 @@
if (VALUE_IS_EMPTY (a))
a = va = (GnmValue *)value_zero;
else if (VALUE_IS_STRING (a)) {
- va = format_match_number (a->v_str.val->str, NULL,
+ va = format_match_number (value_peek_string (a), NULL,
workbook_date_conv (ep->sheet->workbook));
if (va == NULL)
return value_new_error_VALUE (ep);
@@ -849,7 +848,7 @@
if (VALUE_IS_EMPTY (b))
b = vb = (GnmValue *)value_zero;
else if (VALUE_IS_STRING (b)) {
- vb = format_match_number (b->v_str.val->str, NULL,
+ vb = format_match_number (value_peek_string (b), NULL,
workbook_date_conv (ep->sheet->workbook));
if (vb == NULL) {
if (va != a)
@@ -1237,7 +1236,7 @@
/* 2) #!VALUE error if A is not a number */
if (VALUE_IS_STRING (a)) {
- GnmValue *tmp = format_match_number (a->v_str.val->str, NULL,
+ GnmValue *tmp = format_match_number (value_peek_string (a), NULL,
workbook_date_conv (pos->sheet->workbook));
value_release (a);
@@ -1247,7 +1246,7 @@
} else if (a->type == VALUE_CELLRANGE || a->type == VALUE_ARRAY) {
b = gnm_expr_eval (expr->binary.value_b, pos, flags);
if (VALUE_IS_STRING (b)) {
- res = format_match_number (b->v_str.val->str, NULL,
+ res = format_match_number (value_peek_string (b), NULL,
workbook_date_conv (pos->sheet->workbook));
value_release (b);
b = (res == NULL) ? value_new_error_VALUE (pos) : res;
@@ -1269,7 +1268,7 @@
/* 4) #!VALUE error if B is not a number */
if (VALUE_IS_STRING (b)) {
- GnmValue *tmp = format_match_number (b->v_str.val->str, NULL,
+ GnmValue *tmp = format_match_number (value_peek_string (b), NULL,
workbook_date_conv (pos->sheet->workbook));
value_release (b);
@@ -1312,7 +1311,7 @@
/* 2) #!VALUE error if A is not a number */
if (VALUE_IS_STRING (a)) {
- GnmValue *tmp = format_match_number (a->v_str.val->str, NULL,
+ GnmValue *tmp = format_match_number (value_peek_string (a), NULL,
workbook_date_conv (pos->sheet->workbook));
value_release (a);
@@ -2047,7 +2046,7 @@
parse_pos_init_sheet (&pos, rinfo->details->target_sheet);
/* If the name is not available in the new scope explicitly scope it */
- new_nexpr = expr_name_lookup (&pos, nexpr->name->str);
+ new_nexpr = expr_name_lookup (&pos, expr_name_name (nexpr));
if (new_nexpr == NULL) {
if (nexpr->pos.sheet != NULL)
return gnm_expr_new_name (nexpr, nexpr->pos.sheet, NULL);
Modified: trunk/src/gnm-style-impl.h
==============================================================================
--- trunk/src/gnm-style-impl.h (original)
+++ trunk/src/gnm-style-impl.h Wed Apr 1 18:14:50 2009
@@ -2,7 +2,6 @@
#ifndef _GNM_STYLE_IMPL_H_
# define _GNM_STYLE_IMPL_H_
-#include "str.h"
#include "style-border.h"
#include "style-color.h"
#include "style-font.h"
Modified: trunk/src/mstyle.c
==============================================================================
--- trunk/src/mstyle.c (original)
+++ trunk/src/mstyle.c Wed Apr 1 18:14:50 2009
@@ -17,6 +17,7 @@
#include "style-conditions.h"
#include "application.h"
#include "gutils.h"
+#include "str.h"
#include "gnumeric-gconf.h"
#include <goffice/utils/go-glib-extras.h>
#include <goffice/utils/go-font.h>
Modified: trunk/src/number-match.c
==============================================================================
--- trunk/src/number-match.c (original)
+++ trunk/src/number-match.c Wed Apr 1 18:14:50 2009
@@ -24,7 +24,6 @@
#include "gnm-format.h"
#include "value.h"
#include "mathfunc.h"
-#include "str.h"
#include "numbers.h"
#include <goffice/utils/regutf8.h>
#include <goffice/utils/datetime.h>
Modified: trunk/src/parse-util.c
==============================================================================
--- trunk/src/parse-util.c (original)
+++ trunk/src/parse-util.c Wed Apr 1 18:14:50 2009
@@ -1216,7 +1216,7 @@
g_string_append_unichar (target, out->convs->sheet_name_sep);
}
- g_string_append (target, thename->name->str);
+ g_string_append (target, expr_name_name (thename));
}
static void
Modified: trunk/src/parser.y
==============================================================================
--- trunk/src/parser.y (original)
+++ trunk/src/parser.y Wed Apr 1 18:14:50 2009
@@ -16,6 +16,7 @@
#include <glib/gi18n-lib.h>
#include "gnumeric.h"
#include "number-match.h"
+#include "str.h"
#include "expr.h"
#include "expr-impl.h"
#include "expr-name.h"
@@ -27,7 +28,6 @@
#include "gutils.h"
#include "style.h"
#include "value.h"
-#include "str.h"
#include <goffice/utils/go-glib-extras.h>
#include <goffice/app/go-doc.h>
#include <goffice/utils/go-locale.h>
@@ -457,7 +457,7 @@
static GnmExpr *
parse_string_as_value (GnmExpr *str)
{
- GnmValue *v = format_match_simple (str->constant.value->v_str.val->str);
+ GnmValue *v = format_match_simple (value_peek_string (str->constant.value));
if (v != NULL) {
unregister_allocation (str);
@@ -478,7 +478,7 @@
parser_simple_val_or_name (GnmExpr *str_expr)
{
GnmExpr const *res;
- char const *str = str_expr->constant.value->v_str.val->str;
+ char const *str = value_peek_string (str_expr->constant.value);
GnmValue *v = format_match_simple (str);
/* if it is not a simple value see if it is a name */
@@ -513,7 +513,7 @@
static Sheet *
parser_sheet_by_name (Workbook *wb, GnmExpr *name_expr)
{
- char const *name = name_expr->constant.value->v_str.val->str;
+ char const *name = value_peek_string (name_expr->constant.value);
Sheet *sheet = NULL;
if (wb == NULL)
@@ -668,7 +668,7 @@
| function
| sheetref STRING {
GnmNamedExpr *nexpr = NULL;
- char const *name = $2->constant.value->v_str.val->str;
+ char const *name = value_peek_string ($2->constant.value);
GnmParsePos pos = *state->pos;
pos.sheet = $1;
@@ -686,7 +686,7 @@
}
| workbookref STRING {
GnmNamedExpr *nexpr = NULL;
- char const *name = $2->constant.value->v_str.val->str;
+ char const *name = value_peek_string ($2->constant.value);
GnmParsePos pos = *state->pos;
pos.sheet = NULL;
@@ -706,7 +706,7 @@
;
function : STRING '(' arg_list ')' {
- char const *name = $1->constant.value->v_str.val->str;
+ char const *name = value_peek_string ($1->constant.value);
GnmExpr const *f_call = (*state->convs->input.func) (
state->convs, state->pos->wb, name, $3);
@@ -727,7 +727,7 @@
;
workbookref : '[' string_opt_quote ']' {
- char const *wb_name = $2->constant.value->v_str.val->str;
+ char const *wb_name = value_peek_string ($2->constant.value);
Workbook *ref_wb = state->pos
? (state->pos->wb
? state->pos->wb
Modified: trunk/src/print-cell.c
==============================================================================
--- trunk/src/print-cell.c (original)
+++ trunk/src/print-cell.c Wed Apr 1 18:14:50 2009
@@ -29,7 +29,6 @@
#include "sheet-style.h"
#include "sheet-merge.h"
#include "rendered-value.h"
-#include "str.h"
#include "cell-draw.h"
#include <string.h>
Modified: trunk/src/sheet-filter.c
==============================================================================
--- trunk/src/sheet-filter.c (original)
+++ trunk/src/sheet-filter.c Wed Apr 1 18:14:50 2009
@@ -32,7 +32,6 @@
#include "value.h"
#include "gnm-format.h"
#include "ranges.h"
-#include "str.h"
#include "number-match.h"
#include "gutils.h"
#include "sheet-object.h"
Modified: trunk/src/sheet-object-graph.c
==============================================================================
--- trunk/src/sheet-object-graph.c (original)
+++ trunk/src/sheet-object-graph.c Wed Apr 1 18:14:50 2009
@@ -26,7 +26,6 @@
#include "gnm-pane-impl.h"
#include "sheet-control-gui.h"
-#include "str.h"
#include "gui-util.h"
#include "gui-file.h"
#include "gnm-graph-window.h"
Modified: trunk/src/sheet.c
==============================================================================
--- trunk/src/sheet.c (original)
+++ trunk/src/sheet.c Wed Apr 1 18:14:50 2009
@@ -5070,7 +5070,7 @@
/* Pass 1: add placeholders. */
for (l = names; l; l = l->next) {
GnmNamedExpr *src_nexpr = l->data;
- char const *name = src_nexpr->name->str;
+ char const *name = expr_name_name (src_nexpr);
GnmNamedExpr *dst_nexpr =
gnm_named_expr_collection_lookup (dst->names, name);
GnmExprTop const *texpr;
@@ -5085,7 +5085,7 @@
/* Pass 2: assign the right expression. */
for (l = names; l; l = l->next) {
GnmNamedExpr *src_nexpr = l->data;
- char const *name = src_nexpr->name->str;
+ char const *name = expr_name_name (src_nexpr);
GnmNamedExpr *dst_nexpr =
gnm_named_expr_collection_lookup (dst->names, name);
GnmExprTop const *texpr;
Modified: trunk/src/validation.c
==============================================================================
--- trunk/src/validation.c (original)
+++ trunk/src/validation.c Wed Apr 1 18:14:50 2009
@@ -33,6 +33,7 @@
#include "sheet.h"
#include "cell.h"
#include "value.h"
+#include "str.h"
#include "workbook-control.h"
#include "parse-util.h"
Modified: trunk/src/validation.h
==============================================================================
--- trunk/src/validation.h (original)
+++ trunk/src/validation.h Wed Apr 1 18:14:50 2009
@@ -3,7 +3,6 @@
# define _GNM_VALIDATION_H_
#include "gnumeric.h"
-#include "str.h"
G_BEGIN_DECLS
Modified: trunk/src/workbook-view.c
==============================================================================
--- trunk/src/workbook-view.c (original)
+++ trunk/src/workbook-view.c Wed Apr 1 18:14:50 2009
@@ -30,7 +30,6 @@
#include "sheet-view.h"
#include "sheet-merge.h"
#include "sheet-style.h"
-#include "str.h"
#include "gnm-format.h"
#include "func.h"
#include "expr.h"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]