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 647492 - works spreadsheet support
works spreadsheet support
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export other
1.10.x
Other All
: Normal enhancement
: ---
Assigned To: Morten Welinder
Jody Goldberg
: 35239 645940 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-04-11 19:30 UTC by Urmas
Modified: 2011-05-04 19:28 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
udiff (3.96 KB, patch)
2011-04-11 19:30 UTC, Urmas
none Details | Review
udiff (13.22 KB, patch)
2011-04-11 19:41 UTC, Urmas
none Details | Review
Updated patch (13.00 KB, patch)
2011-05-02 17:22 UTC, Morten Welinder
none Details | Review

Description Urmas 2011-04-11 19:30:47 UTC
Created attachment 185751 [details] [review]
udiff

patch for lotus importer to support ms works 2,3,4 spreadsheets. only basic formatting, formulas and nuber formats work now.
Comment 1 Andreas J. Guelzow 2011-04-11 19:37:51 UTC
The attached file is a binary file I would have expected a patch (ie. a text file).
Comment 2 Urmas 2011-04-11 19:41:47 UTC
Created attachment 185752 [details] [review]
udiff
Comment 3 Andreas J. Guelzow 2011-05-02 14:29:00 UTC
Do you have some testfiles? And erhaps a link to the documentation for the mw works file format?
Comment 4 Andreas J. Guelzow 2011-05-02 15:55:06 UTC
I guess this is related to bug #645940?!
Comment 5 Morten Welinder 2011-05-02 17:22:11 UTC
Created attachment 187055 [details] [review]
Updated patch

This fixes a number of problem with the first patch:

1. Calls the right destructor for fonts.
2. Frees the style pool.
3. Hopefully works on machines that are not little-endian.  [Needs tests]
4. Avoid compiler warnings.
5. Makes cell_set_fmt static.  With a name like that it must be.
Comment 6 Morten Welinder 2011-05-02 17:38:54 UTC
Patch from comment 5 left out works.h -- here it is

#ifndef GNUMERIC_PLUGIN_LOTUS_123_WORKS_H
#define GNUMERIC_PLUGIN_LOTUS_123_WORKS_H

#define WORKS_VERSION_3 0x0404

#define WORKS_BOF 0xff
#define WORKS_FONT  0x5456
#define WORKS_STYLE 0x545a
#define WORKS_SMALL_FLOAT 0x545b

#endif
Comment 7 Andreas J. Guelzow 2011-05-04 00:34:18 UTC
This is also related to bug #35239 (yes, 5 digits)
Comment 8 Andreas J. Guelzow 2011-05-04 00:37:26 UTC
Note that we also have a MS Works file attached to bug #557911 (a duplicate of bug #35239).
Comment 9 Morten Welinder 2011-05-04 15:16:59 UTC
I'd say we have test files now.

But getting documentation would be very, very nice.  Urmas?
Comment 10 Morten Welinder 2011-05-04 15:20:48 UTC
With the test file from bug 557911, these records aren't being handled
by lotus_read_works.  We have no idea what 0x54?? is.  The rest might be
the same as for the other formats.

Unknown record 0x1a of length 8.
Unknown record 0x24 of length 1.
Unknown record 0x25 of length 242.
Unknown record 0x26 of length 242.
Unknown record 0x2 of length 1.
Unknown record 0x31 of length 1.
Unknown record 0x3 of length 1.
Unknown record 0x4 of length 1.
Unknown record 0x5401 of length 12.
Unknown record 0x5405 of length 2.
Unknown record 0x5423 of length 28.
Unknown record 0x5426 of length 2.
Unknown record 0x5450 of length 18.
Unknown record 0x545a of length 10.
Unknown record 0x545c of length 2.
Unknown record 0x545d of length 4.
Unknown record 0x545e of length 4.
Unknown record 0x5462 of length 22.
Unknown record 0x5465 of length 4.
Unknown record 0x5466 of length 2.
Unknown record 0x5467 of length 374.
Unknown record 0x546b of length 4.
Unknown record 0x546f of length 1.
Unknown record 0x5 of length 1.
Unknown record 0x6 of length 8.
Unknown record 0x7 of length 31.
Unknown record 0x8 of length 3.
Unknown record 0xb of length 24.
Comment 11 Urmas 2011-05-04 17:47:18 UTC
There's no documentation released, it's entirely a guesswork.

Examples:

#define WORKS_COL_FORMAT 0x545d
#define WORKS_ROW_FORMAT 0x545e
#define WORKS_PAGE_SETUP 0x5423
#define WORKS_ROW_HEIGHT 0x5465

Still, the current implementation is on par with Lotus importer feature-wise.
Comment 12 Andreas J. Guelzow 2011-05-04 19:15:12 UTC
*** Bug 35239 has been marked as a duplicate of this bug. ***
Comment 13 Andreas J. Guelzow 2011-05-04 19:23:12 UTC
If I use this patch on the file from bug #645940, then B1 contains
├ݯý¹ ß¹Ù¹§ Ô­ÕýÕÝ
I suspect that this should be
Гномы былых времен
or something like that.
Comment 14 Andreas J. Guelzow 2011-05-04 19:24:42 UTC
*** Bug 645940 has been marked as a duplicate of this bug. ***
Comment 15 Andreas J. Guelzow 2011-05-04 19:27:08 UTC
@Urmas, when we get to the stage of adding your patch it would be good to have your name to add appropriate credit.
Comment 16 Morten Welinder 2011-05-04 19:28:46 UTC
This problem has been fixed in our software repository. The fix will go into the next software release. Thank you for your bug report.