GNOME Bugzilla – Bug 313460
Missing quotes around strings in graph scalar values
Last modified: 2005-09-10 02:41:53 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.
Created attachment 50683 [details] Sample file
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.
Patch doesn't work for me...
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.
*** Bug 313751 has been marked as a duplicate of this bug. ***
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.
I forgot to mention that with my patch, to type a simple text, you should add quotes when typing it.
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.
Created attachment 51802 [details] [review] revert old patch, and move intelligence into xls export
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.
*** Bug 315840 has been marked as a duplicate of this bug. ***