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 313460 - Missing quotes around strings in graph scalar values
Missing quotes around strings in graph scalar values
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Charting
git master
Other Linux
: Immediate blocker
: ---
Assigned To: Emmanuel Pacaud
Jody Goldberg
: 313751 315840 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-08-14 13:48 UTC by Emmanuel Pacaud
Modified: 2005-09-10 02:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Sample file (2.04 KB, application/x-gnumeric)
2005-08-14 13:48 UTC, Emmanuel Pacaud
  Details
fixes the bug (836 bytes, patch)
2005-08-15 20:51 UTC, Jean Bréfort
rejected Details | Review
a new proposal (818 bytes, patch)
2005-09-04 13:22 UTC, Jean Bréfort
rejected Details | Review
revert old patch, and move intelligence into xls export (3.87 KB, patch)
2005-09-05 01:06 UTC, Jody Goldberg
none Details | Review

Description Emmanuel Pacaud 2005-08-14 13:48:31 UTC
Since this change:

http://cvs.gnome.org/viewcvs/gnumeric/src/graph.c?r1=1.39&r2=1.40

strings are saved unquoted. The problem is that now, they are loaded also
unquoted, which leads to #NAME? errors in graph labels.

See title label in attached sample graph.
Comment 1 Emmanuel Pacaud 2005-08-14 13:48:55 UTC
Created attachment 50683 [details]
Sample file
Comment 2 Jean Bréfort 2005-08-15 20:51:29 UTC
Created attachment 50743 [details] [review]
fixes the bug

I can't say that I'm happy with this solution. It might be better to fix
gnm_expr_parse_str_simple, but it does not seem necessary.
Comment 3 Emmanuel Pacaud 2005-08-18 07:27:28 UTC
Patch doesn't work for me...
Comment 4 Jody Goldberg 2005-08-24 02:41:54 UTC
We don't want to patch this on import it's ambiguous by then.
I'd rather that we either
    - export as a Simple scalar if the value is a constant
    - add the quotes on export as we did before.  Unfortunately to do this
      we'll need more control of to_str, maybe another arg ?

Either way this must be fixed before 1.5.4 this weekend.
Comment 5 Jody Goldberg 2005-08-24 02:43:28 UTC
*** Bug 313751 has been marked as a duplicate of this bug. ***
Comment 6 Jean Bréfort 2005-09-04 13:22:18 UTC
Created attachment 51785 [details] [review]
a new proposal

The patch just adds quotes for strings in scalar data. This has the advantage
to not break already existing files. The other option would be to add = for
formulas, but this would break existing files and be inconsistent with other
usages of GnmExprEntry.
Comment 7 Jean Bréfort 2005-09-04 13:25:19 UTC
I forgot to mention that with my patch, to type a simple text, you should add
quotes when typing it.
Comment 8 Daniel Vianna 2005-09-05 00:15:54 UTC
Did yous fix the xls import engine? I just tested v. 1.5.5, and it does not
include the quotes when importing. So the graph legends look OK until I open the
properties box. Then it treats it as before, and adds quotes in the wrong places
again.

If I fix it manually, then it works perfectly. But I would like not to be
compelled to do it manually for every graph in the spreadsheet.
Comment 9 Jody Goldberg 2005-09-05 01:06:40 UTC
Created attachment 51802 [details] [review]
revert old patch, and move intelligence into xls export
Comment 10 Jody Goldberg 2005-09-05 01:09:04 UTC
I don't see how that patch changes anything.  We would get the quotes from
expr_as_string.  Nor would it solve the problem in the xls exporter where
constant string items were exported with quotes.  What I'm proposing is
something slightly different.

1) revert to the old behavior.  This will re-break the xls exporter, but will
fix the xml in/out to restore the old 'all content is an expression'

2) Make the existing xls export code slightly smarter and have it manually
convert constant strings to unquoted strings.

While in there patch a leak.
Comment 11 Morten Welinder 2005-09-10 02:41:53 UTC
*** Bug 315840 has been marked as a duplicate of this bug. ***