After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 613273 - Argument type 'r' and single-cell names
Argument type 'r' and single-cell names
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: General
git master
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2010-03-18 20:37 UTC by Morten Welinder
Modified: 2011-02-16 14:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Tentative patch (4.05 KB, patch)
2010-03-20 02:42 UTC, Morten Welinder
none Details | Review
Updated patch (4.22 KB, patch)
2010-04-16 14:09 UTC, Morten Welinder
none Details | Review

Description Morten Welinder 2010-03-18 20:37:29 UTC
Functions that take 'r' type arguments will fail if given an argument
that is a name defined to be a single cell.  OFFSET is such a function.

We have special code for the case where the single cell is given directly
as an argument so that works ok.

  1250  if (arg_type == 'A' || arg_type == 'r') {
  1251          if (GNM_EXPR_GET_OPER (expr) == GNM_EXPR_OP_CELLREF) {
>>>SPECIAL CASE
  1252                  GnmCellRef r;
  1253                  gnm_cellref_make_abs (&r, &expr->cellref.ref, ei->pos);
  1254                  args[i] = value_new_cellrange_unsafe (&r, &r);
  1255          } else {
  1256                  tmp = args[i] = gnm_expr_eval (expr, ei->pos,
  1257                          GNM_EXPR_EVAL_PERMIT_NON_SCALAR);
>>>SINGLE CELL WILL PRODUCE A (DEREFERENCED) VALUE
  1258                  if (tmp->type == VALUE_CELLRANGE) {
  1259                          gnm_cellref_make_abs (&tmp->v_ra
Comment 1 Morten Welinder 2010-03-20 02:42:16 UTC
Created attachment 156601 [details] [review]
Tentative patch

This patch ought to solve the problem.  However, I don't feel like messing
with the evaluation system in the stable series.
Comment 2 Morten Welinder 2010-04-16 14:09:50 UTC
Created attachment 158893 [details] [review]
Updated patch

Patch updated due to conflicts with unrelated changes.
Comment 3 Andreas J. Guelzow 2011-02-14 00:09:42 UTC
The patch seems to work fine for me.
Comment 4 Morten Welinder 2011-02-16 14:45:31 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.