GNOME Bugzilla – Bug 603533
ODF, import of hyperlinks
Last modified: 2011-11-01 01:04:16 UTC
Gnumeric 1.9.16 on Windows7 - create a new spreadsheet - insert a new hyperlink (for example: http://www.gnumeric.org) - save as ODF spreadsheet -> link is lost Hyperlinks don't get saved as a <text:a> element (they are just stored as plain text inside a <text:p>) when exporting to .ods. Importing an .ods spreadsheet generated with OOo also displays links as text.
Rereading the ODF 1.1 specification, it seems that this is in fact not possible within ODF 1.1 (except with foreign elements). According to 5.1.4 "Hyperlinks in text documents are represented by a <text:a> element." Gnumeric creates and reads spreadsheet documents, not text documents. The only other hyperlinks are described in 9.3.9: "Frames may behave like hyperlinks. Such hyperlinks are represented by the <draw:a> element, where. the element's content is the frame that should be the source of the link." Clearly these hyperlinks are not applicable to this situation. Note that OOo does _not_ create ODF documents. (OOo appears to claim that it creates ODF1.2 documents but there is no ODF 1.2 (at this time).)
Created attachment 148883 [details] valid according to office-o-tron (although one can argue about the file's conformance)
Good catch about ODF 1.1 - 5.1.4 Hyperlinks specifically mentioning "text documents", I totally missed that, although the intention is - IMHO - not to restrict this to text documents only This should be changed in the next version of ODF spec to make this clear. Strictly speaking, this does not actually forbid to add the same functionality in spreadsheets (can be done inside a <text:p><text:a...>, which is allowed per schema). (I'm aware that OOo 3.x, by default, uses ODF 1.2-draft. However, one can change that to ODF 1.1 in one of the options, or use OOo 2.x and check it with either the ODF Validator or Alex Brown's office-o-tron)
Note that even in the current ODF1.2 draft it says in 5.1.4: "The <text:a> element represents a hyperlink in a text document." Note the "in a text document".
We are now exporting hyperlinks into ODF files using <text:a> whatever that is supposed to mean.
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.