GNOME Bugzilla – Bug 663078
EPS support
Last modified: 2012-03-10 07:59:43 UTC
Created attachment 200321 [details] Sample file When opening attached file, I get: Unexpected element 'table:shapes' in state : document-content -> body -> spreadsheet -> table Note that the "shape" being an eps image, we also need to add eps support in GOImage API to fully fix this bug.
Note that technically the "shape" is not an eps file but a draw:frame. The draw:frame in this case happens to contain an image which in this case appears to be an eps file only, in circumvention of the ODF standard that states: "While the image data may have an arbitrary format, vector graphics should be stored in the [SVG] format and bitmap graphics in the [PNG] format." So supporting the eps format would really be low priority since it should be SVG or PNG. Moreover, a shape in table:shapes is a shape attached to the table (sheet) proper rather than anchored to any specific cell. Technically Gnumeric does not support such shapes at all.
(In reply to comment #1) > Note that technically the "shape" is not an eps file but a draw:frame. The > draw:frame in this case happens to contain an image which in this case appears > to be an eps file only, in circumvention of the ODF standard that states: > "While the image data may have an arbitrary format, vector graphics should be > stored in the [SVG] format and bitmap graphics in the [PNG] format." So > supporting the eps format would really be low priority since it should be SVG > or PNG. It might be not that difficult, using libevince (or so). > Moreover, a shape in table:shapes is a shape attached to the table (sheet) > proper rather than anchored to any specific cell. Technically Gnumeric does not > support such shapes at all. It would be easy to fix that, imho.
How did you create this file in LibreOffice? When I add a picture it ends up inside a draw frame in a table cell. I need a file with an image we support inside a frame inside a table:shapes element.
Created attachment 200336 [details] sample file with an svg image inside I just Insert/Image/From file...
If I use Insert/Image/From it ends up inside the selected cell, ie. inside a <table:table-cell>.
Not here, apparently, very strange.
We are now reading those shapes, but we get for the eps image: ** (gnumeric:16495): WARNING **: Unrecognized image file format and the unrecognized-image image is shown svg image: ** (gnumeric:16495): CRITICAL **: go_image_new_from_data: assertion `type != NULL' failed ** (gnumeric:16495): WARNING **: Unrecognized image file format and again the unrecognized-image image is shown In the latter case the bt for the CRITICAL is: Breakpoint 1, 0xb70f2f34 in g_log () from /lib/i386-linux-gnu/libglib-2.0.so.0 (gdb) bt
+ Trace 228955
Note that sheet_object_image_set_image is called with a type of "". Inside the ODF file we do not know the type of the image: <manifest:file-entry manifest:media-type="" manifest:full-path="Pictures/2000012200002A900000127321A322BA.svm"/> but we aren't even trying to obtain the type. For the eps file, similarly the ODF manifest does not give a type: <manifest:file-entry manifest:media-type="" manifest:full-path="Pictures/20000002000002590000012D59FC8949.eps"/>
The eps is not an issue, goffice recognizes that. Just we can't display it at the moment.
Fixed the critical(s), and the crash which occured when trying to save the image as a file. Clearly, LibreOffice does not support svg properly.
Sending to goffice since the remaining issues: eps and GDI support are within its domain.
eps support, certainly, but I don't think that GDI support is worth the effort all the more so as there is apparently no documentation available, except the code in OOo/LibreOffice which are released with a license (LGPL-v3) incompatible with ours.
This problem has been fixed in the development version. The fix will be available in the next major software release. Thank you for your bug report. It's in (if libpresent is there at configure time). Not perfect though, since resolution is not excellent, should be enhanced in needed and if time permits. About GDI support, I vote for WONTFIX.
Actually we can't use libspectre for now because it uses libgs which overrides some jpeg methods (memory handlers) and this makes gnumeric crash when inserting a jpeg image.
Should now work with next ghostscript release.