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 686789 - Problems with strike-through in ODS import
Problems with strike-through in ODS import
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: import/export OOo / OASIS
git master
Other All
: Normal normal
: ---
Assigned To: Andreas J. Guelzow
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2012-10-24 12:23 UTC by Walter Cheuk
Modified: 2012-10-27 01:10 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
sample file with the problem (7.52 KB, application/vnd.oasis.opendocument.spreadsheet)
2012-10-24 15:12 UTC, Walter Cheuk
Details

Description Walter Cheuk 2012-10-24 12:23:35 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
Comment 1 Morten Welinder 2012-10-24 14:31:47 UTC
It would be helpful if you could attach a sample file.
Comment 2 Walter Cheuk 2012-10-24 15:12:05 UTC
Created attachment 227155 [details]
sample file with the problem
Comment 3 Andreas J. Guelzow 2012-10-24 15:46:00 UTC
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.
Comment 4 Andreas J. Guelzow 2012-10-24 16:55:52 UTC
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.
Comment 5 Morten Welinder 2012-10-24 18:05:28 UTC
Do we knew whether col style or row style takes priority?
Comment 6 Andreas J. Guelzow 2012-10-24 18:23:35 UTC
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 7 Morten Welinder 2012-10-27 00:10:49 UTC
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".
Comment 8 Andreas J. Guelzow 2012-10-27 00:20:03 UTC
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.
Comment 9 Morten Welinder 2012-10-27 00:24:08 UTC
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.
Comment 10 Andreas J. Guelzow 2012-10-27 00:48:24 UTC
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.
Comment 11 Andreas J. Guelzow 2012-10-27 00:57:01 UTC
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!
Comment 12 Andreas J. Guelzow 2012-10-27 01:02:39 UTC
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.
Comment 13 Andreas J. Guelzow 2012-10-27 01:10:27 UTC
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."