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 715110 - Cell comments get truncated when saving as .xls file
Cell comments get truncated when saving as .xls file
Status: RESOLVED OBSOLETE
Product: Gnumeric
Classification: Applications
Component: import/export MS Excel (tm)
1.10.x
Other Linux
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2013-11-24 13:55 UTC by Steff
Modified: 2018-05-22 14:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Open the test file and save as .xls to watch yourself. (2.76 KB, application/x-gnumeric)
2013-11-24 13:55 UTC, Steff
  Details
Initial patch (1.46 KB, patch)
2013-11-24 16:46 UTC, Jean Bréfort
none Details | Review
Full patch (2.70 KB, patch)
2013-11-24 17:54 UTC, Jean Bréfort
none Details | Review
Updated patch (2.62 KB, patch)
2013-11-25 15:03 UTC, Morten Welinder
committed Details | Review

Description Steff 2013-11-24 13:55:43 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.
Comment 1 Jean Bréfort 2013-11-24 16:46:01 UTC
Created attachment 261357 [details] [review]
Initial patch

Fixes for large ASCII strings, but not yet for Unicode.
Comment 2 Jean Bréfort 2013-11-24 17:54:05 UTC
Created attachment 261365 [details] [review]
Full patch

Needs review.
Comment 3 Steff 2013-11-24 21:50:17 UTC
(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?
Comment 4 Jean Bréfort 2013-11-24 22:06:37 UTC
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.
Comment 5 Jean Bréfort 2013-11-25 07:04:00 UTC
Calc still does not import the long comments from our .xls files (it does not import short unicode comments either).
Comment 6 Morten Welinder 2013-11-25 14:36:09 UTC
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.
Comment 7 Morten Welinder 2013-11-25 15:03:19 UTC
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.
Comment 8 Morten Welinder 2013-11-25 15:04:11 UTC
Neither LO nor XL is happy with the resulting file.
Comment 9 Jean Bréfort 2013-11-26 13:18:33 UTC
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).
Comment 10 GNOME Infrastructure Team 2018-05-22 14:06:14 UTC
-- 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.