GNOME Bugzilla – Bug 686789
Problems with strike-through in ODS import
Last modified: 2012-10-27 01:10:27 UTC
Strikeout line of characters saved in ODS by LibreOffice is not visible in Gnumeric. It is visible in Google Docs. How to reproduce: 1. Open LibreOffice, type something in a cell 2. Apply 'Strikeout' (single line) to the cell 3. Save to ODS 4. Open it in Gnumeric 5. Observe that only the characters are shown, but not the strikeout line
It would be helpful if you could attach a sample file.
Created attachment 227155 [details] sample file with the problem
This wasn't implemented in the 1.10 series but has since then be implemented in the 1.11 series. Testing it with a file I created myself seems to work fine, but your test file does not show strikeout in Gnumeric 1.11. WE will need to investigate further.
Okay the point with the above sample file is that LibreOffice stored the formatting in the style specified by the table:default-cell-style-name attached to the first column. We apparently ignore that column specific default cell style.
Do we knew whether col style or row style takes priority?
Well we have in ODF 1.2: If a cell does not have a cell style assigned, then the table:default-cell-style-name attribute of the table row specifies the cell style. If that does not exist, the table:default-cell-style-name attribute of the table column specifies the cell style. If that does not exist, the default style with family table-cell specifies the style for the cell.
Comment 4 is wrong. We do in fact handle both row and column styles. Something is up in oo_style_prop_cell, though. It appears to me that the strings "text-line-through-style" and "text-line-through-type" have been swapped. But fixing that is not enough since content.xml only contains text-line-through-style="solid" and nothing for "text-line-through-type".
Sounds like it is related to http://tools.oasis-open.org/version-control/browse/wsvn/oic/Advisories/00005-line_through_style/trunk/description.html Note that in ODF 1.2 we have: The style:text-line-through-type attribute specifies whether text is lined through, and if so, whether a single or double line will be used. The defined values for the style:text-line-through-type attribute are: ● double: a double line should be used for a line-through text. ● none: deprecated. ● single: a single line should be used for a line-through text. Every occurrence of the style:text-line-through-type attribute should be accompanied by an occurrence of the style:text-line-through-style attribute on the same element. There should not be an occurrence of the style:text-line-through-type attribute if the value of the style:text-line-through-style attribute is none.
https://www.oasis-open.org/committees/vote_details.php?id=2181&voter_id=10903 says that a "style" without a "type" is to be ignored. That would make this an OO/LO bug.
According to the OIC advisory, of the 4 styles: <office:styles> <style:style style:name="Strike1" style:family="table-cell"> <style:text-properties style:text-line-through-style="solid" style:text-line-through-type="single"/> </style:style> <style:style style:name="Strike2" style:family="table-cell"> <style:text-properties style:text-line-through-style="solid" style:text-line-through-type="none"/> </style:style> <style:style style:name="Strike3" style:family="table-cell"> <style:text-properties style:text-line-through-style="solid"/> </style:style> <style:style style:name="Strike4" style:family="table-cell"> <style:text-properties style:text-line-through-type="single"/> </style:style> </office:styles> only the first should result in a strike-through. The sample file matches style Strike3. So our behaviour matches the OIC advisory.
The OIC advisory claims that this is fixed in ODF 1.2. This does not seem to be the case. The sample file in that advisory does not quite match the description in the advisory either. I have a patch that should do what ODF 1.2 tries to say. I will raise the issue in OIC!
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.
Note that the link in comment #9 is to voter comment. Dennis reading of ODF 1.2 may not necessarily be shared by everybody. What seems to be agreed is that style:text-line-through-style takes precedence: "There should not be an occurrence of the style:text-line-through-type attribute if the value of the style:text-line-through-style attribute is none."