Bug 79304 - FORMATTING: Copy/paste: strikethrough attribute is not exported
Summary: FORMATTING: Copy/paste: strikethrough attribute is not exported
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.4.2 release
Hardware: Other All
: medium minor
Assignee: Sean Stangl
URL:
Whiteboard: BSA target:6.0.0 target:5.4.1 target:...
Keywords:
Depends on:
Blocks: (X)HTML-Export
  Show dependency treegraph
 
Reported: 2014-05-27 12:05 UTC by mario.schroeder
Modified: 2017-11-05 21:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Handle CrossedOut in HTML export. (3.25 KB, patch)
2017-07-08 23:45 UTC, Sean Stangl
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mario.schroeder 2014-05-27 12:05:49 UTC
The HTML exporter doesn't export the strikethrough attribute.

Steps to reproduce:
1. Create a new spreadsheet
2. Type some text into one ore more cells and apply the strikethrough attribute.
3. Select the cell(s) and copy/paste the into a HTML editor (like BlueGriffon)

Current behavior:
The exported HTML contains no indication for the strikethrough attribute.

Expected behavior:
Strikethrough being exported as <strike>, <s> or <del> element or as CSS style 'text-decoration'.

Please also refer to AOO issue #I124992.
Operating System: All
Version: 4.2.4.2 release
Comment 1 Buovjaga 2014-10-31 21:21:51 UTC
I confirm, pasted as HTML to writer and strikethrough didn't survive.

Win 7 64-bit Version: 4.4.0.0.alpha1+
Build ID: 56019dcb79475606952a954fe732a3109441ffec
TinderBox: Win-x86@39, Branch:master, Time: 2014-10-30_07:27:11
Comment 2 jmorrison 2014-12-24 20:14:30 UTC
Also in 4.3.5.2 when exporting spreadsheet as html
Comment 3 QA Administrators 2016-01-17 20:04:22 UTC Comment hidden (obsolete)
Comment 4 QA Administrators 2017-03-06 14:23:24 UTC Comment hidden (obsolete)
Comment 5 Sean Stangl 2017-07-08 18:38:07 UTC
I've confirmed that this issue is still present in LibreOffice 5.2.7.2.

I need this bug fixed for a project that uses LibreOffice for headless XLSX to HTML conversion. Currently, as reported in Comment 0, all the strikethrough effects are dropped in the HTML output.

I'm willing to fix this bug myself. Would anyone be available to point me in the right direction?
Comment 6 Sean Stangl 2017-07-08 23:45:00 UTC
Created attachment 134555 [details]
Handle CrossedOut in HTML export.

The attached patch fixes HTML export for me. Headless conversion to HTML and "Preview in Web Browser" both correctly report strikethroughs.

Note that this still does not fix strikethroughs when saving as HTML (for example, when using Export). That function seems to use a completely different codepath that stores the cell style information in header CSS, while the headless/preview function uses inline HTML tags.

quikee on IRC suggested also that I add a test to sc/qa/extras/htmlexporttest.cxx (run via "make CppunitTest_sc_html_export_test"). I can do that once feedback is provided on this patch, hopefully with pointers for where the CSS-related HTML code is.
Comment 7 Sean Stangl 2017-07-09 05:38:54 UTC
Submitted for review on Gerrit: https://gerrit.libreoffice.org/#/c/39719/
Comment 8 Commit Notification 2017-07-09 10:15:42 UTC
Sean Stangl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2f2eba56d1f8ec5cdcadb4852e8856858477c008

tdf#79304 - Handle CrossedOutItems in HTML export.

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2017-07-09 12:14:50 UTC
Sean Stangl committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d4d34ae87c6135b075c59adeb09739d1647aa4bb&h=libreoffice-5-4

tdf#79304 - Handle CrossedOutItems in HTML export.

It will be available in 5.4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2017-07-09 12:20:28 UTC
Sean Stangl committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=884979ebe7d464e8b29d331a58ddf943bc9030df&h=libreoffice-5-3

tdf#79304 - Handle CrossedOutItems in HTML export.

It will be available in 5.3.5.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Xisco Faulí 2017-08-10 21:37:03 UTC Comment hidden (obsolete)
Comment 12 Xisco Faulí 2017-11-05 21:53:21 UTC
A polite ping to Sean Stangl: is this bug fixed? if so, could you please close it as RESOLVED FIXED ? Thanks
Comment 13 Sean Stangl 2017-11-05 21:57:36 UTC
The bug was fixed.