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 339834 - Some cells cannot be assigned function values, only text
Some cells cannot be assigned function values, only text
Status: RESOLVED NOTABUG
Product: Gnumeric
Classification: Applications
Component: GUI
1.6.x
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2006-04-26 17:07 UTC by Tammo Spalink
Modified: 2006-04-27 19:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Spreadsheet with one such problem cell, as described in bug report. (1.64 KB, application/octet-stream)
2006-04-26 17:26 UTC, Tammo Spalink
Details

Description Tammo Spalink 2006-04-26 17:07:40 UTC
Please describe the problem:
I am not sure the exact circumstances required to create these cells -- they
happen for me only in fairly complex sheets.  What happens is that I assign a
function to a cell, possibly as the result of an autofill, and after this point
I am never allowed to edit this function without it forcibly converting the cell
to text type.  Once this text conversion occurs, the cell can never again be
assigned a function value -- any attempt to do so will result in gnumeric
automagically adding a preceeding single quote.

Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
I will upload an example spreadsheet with just one such cell in it (that I
copied from my complex sheet -- interestingly, the property survives cut and paste).
Comment 1 Tammo Spalink 2006-04-26 17:26:17 UTC
Created attachment 64337 [details]
Spreadsheet with one such problem cell, as described in bug report.
Comment 2 Morten Welinder 2006-04-26 19:14:57 UTC
Cell has been formatted as "text" so this is expected behaviour.
Comment 3 Tammo Spalink 2006-04-26 19:35:39 UTC
Ah, excellent I should have noticed that.  This leads me to ask:

If I have a cell with a formula in it, and I format that cell as text, why does it not add the quote immediately?  Currently it will retain the formula behavior until I try to change it, at which point it prepends the quote...

Comment 4 Morten Welinder 2006-04-26 20:01:32 UTC
Formatting never changes the value in the cell.

It (obviously) changes the display of a cell's value.

It (less obviously) changes the way new entries are interpreted.  Besides
text, dates and fractions are affected too.  The only thing that makes
text special is that it suddenly can become impossible to re-enter the
cell's current contents.  We could conceivably pop up a warning dialog
the first time one tries to edit such a cell.
Comment 5 Tammo Spalink 2006-04-26 20:10:44 UTC
I see.  As you have noticed, this completely baffled me.  I intentionally chose text formatting because I knew the results of the cell's function to be of string type.  Then I forgot about the formatting, and eventually became very frustrated that I could never change the formula...

I re-assert that this is in some way a bug :-)

I suppose the pop-up would be workable, but seems a bit inelegant...  I sometimes use plugins to clobber cell values (intentionally) without changing their formatting, and this could produce odd behavior...

If you are willing to impose value changes later on (which I am not sure is really such a great idea), why the resistance to immediately changing the value when the formatting is imposed to "ensure it is really text"?
Comment 6 Morten Welinder 2006-04-26 20:22:36 UTC
I'm not willing to impose any value changes as a result of a format change.

I am willing to issue a warning when someone hit F2 or anything else
that starts an edit:

     Warning: this cell has been formatted as text after it was assigned
     an expression [or a numeric value or whatever].

     Anything you enter in this cell will become a string.

     [ ]  Don't show this message next time.

     [Edit]  [Remove text format]  [Cancel]


Plugins should not be affected.  They should almost never use
sheet_cell_set_text [which parses strings and is locale dependent]
but call, e.g., sheet_cell_set_expr instead.
Comment 7 Morten Welinder 2006-04-27 19:14:38 UTC
Such a dialog is in place.