GNOME Bugzilla – Bug 715110
Cell comments get truncated when saving as .xls file
Last modified: 2018-05-22 14:06:14 UTC
Created attachment 261354 [details] Open the test file and save as .xls to watch yourself. When I save a file with long cell comments inside as .xls file, the cell comments get truncated. The lenght of the truncated cell comments is different. Bye.
Created attachment 261357 [details] [review] Initial patch Fixes for large ASCII strings, but not yet for Unicode.
Created attachment 261365 [details] [review] Full patch Needs review.
(In reply to comment #2) > Created an attachment (id=261365) [details] [review] > Full patch > > Needs review. Thanks for fixing my bug, Jean. I downloaded version 1.12.8 with your patch applied and can say it works now. The long comment didn't get truncated when saving as .xls and loading afterwards. But I get warnings in the console: during saving: ** (gnumeric:11641): WARNING **: XL does not support unqualified references in global names ** (gnumeric:11641): WARNING **: Ein Problem ist aufgetreten: Es wurde bereits die Länge einer Zeichenkette für diese reserviert, obwohl sie auf Grund von Problemen mit der Zeichenkodierung abgeschnitten wird. during loading: ** (gnumeric:11681): WARNING **: Unusual, TXO text with no formatting has 0xec @ 0x3a6ba But a question: There is still a length limit of cell comments when saved in .xls files, right? Or how can you be compatible to MS Excel? And why are cell comments now in a black frame? I would like the old white frame more. Or is this a bug, too?
The warnings don't seem directly related. There is no length limit in excel, but the string must be split since the xls format have a field size limit. The black frame is a style issue, it can probably be changed, but I'm not sure how.
Calc still does not import the long comments from our .xls files (it does not import short unicode comments either).
This does sound related: welinder@sherwood:~/gnome-src/gnumeric/src> ./ssconvert ~/Comments.gnumeric ~/Comments.xls Using exporter Gnumeric_Excel:excel_biff8 ** (/home/welinder/gnome-src/gnumeric/src/.libs/ssconvert:17559): WARNING **: This is somewhat corrupt. We already wrote a length for a string that is being truncated due to encoding problems.
Created attachment 261445 [details] [review] Updated patch I changed bp->buf_len = ((char_len >> 2) + 1) << 2; to bp->buf_len = (((out_bytes + 6) >> 2) + 1) << 2; and committed. The patch is the rest of Jean's.
Neither LO nor XL is happy with the resulting file.
XL reads the comment but does not show it. Might be a flag issue. Editing the comment (changing the window size is enough) makes the comment visible (in XL).
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnumeric/issues/241.