Bug 79298 - FORMATTING: Copy/paste: importing of strikethrough attribute doesn't work
Summary: FORMATTING: Copy/paste: importing of strikethrough attribute doesn't work
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium minor
Assignee: Andreas Heinisch
URL:
Whiteboard: BSA target:25.8.0 target:25.2.0.0.bet...
Keywords: filter:html
Depends on:
Blocks: Paste Calc-Styles
  Show dependency treegraph
 
Reported: 2014-05-27 10:27 UTC by mario.schroeder
Modified: 2025-01-10 21:51 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
HTML sample file (490 bytes, text/html)
2014-05-27 10:33 UTC, mario.schroeder
Details
Copy-pasted text strikethrough is handled by LO master 2025-01-09 (461.19 KB, image/png)
2025-01-10 21:49 UTC, Piotr Osada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mario.schroeder 2014-05-27 10:27:16 UTC
Pasting HTML content into Calc doesn't apply the strikethrough attribute.
Neither the CSS style 'text-decoration', nor the <strike>, <s> or <del> show an effect.

Steps to reproduce:
1. Open the sample HTML code in a HTML editor (like BlueGriffon)
2. Create a new spreadsheet
3. Copy/paste the HTML to Calc

Sample HTML:
<!DOCTYPE html>
<html>
  <head><meta charset="utf-8"></head>
  <body>
    <table>
      <tbody>
        <tr>
          <td style="text-decoration:line-through;"><s>foo</s></td>
          <td style="text-decoration:line-through;"><strike>bar</strike></td>
        </tr>
        <tr>
          <td style="text-decoration:line-through;"><del>baz</del></td>
          <td style="text-decoration:line-through;"><s>qux</s></td>
        </tr>
      </tbody>
    </table>    
  </body>
</html>


Current behavior:
The cell content is pasted but strikethrough is ignored.

Expected behavior:
Strikethrough should be supported like e.g. bold, underline, ...

Please also refer to AOO issue #124991

Operating System: All
Version: 4.2.4.2 release
Comment 1 mario.schroeder 2014-05-27 10:33:59 UTC
Created attachment 99942 [details]
HTML sample file
Comment 2 sophie 2014-06-05 13:34:49 UTC
Hi, confirmed using 4.2.4.2 Ubuntu 14.04. Step to reproduce:
- copy the text in the html file
- ctrl+maj+v in a Calc sheet, choose HTML
==> text is pasted without strikethrough.
Set as New - Sophie
Comment 3 QA Administrators 2015-06-08 14:41:34 UTC Comment hidden (obsolete)
Comment 4 Buovjaga 2015-06-21 17:13:56 UTC
Still repro.

Win 7 Pro 64-bit Version: 5.1.0.0.alpha1+
Build ID: 3ecef8cedb215e49237a11607197edc91639bfcd
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2015-06-19_23:16:58
Locale: fi-FI (fi_FI)
Comment 5 QA Administrators 2016-09-20 10:09:54 UTC Comment hidden (obsolete)
Comment 6 mario.schroeder 2017-03-08 15:30:01 UTC
Still occurs in LO Version: 5.2.5.1 on Mac OS X 10.11.6.
Comment 7 QA Administrators 2018-07-06 02:45:58 UTC Comment hidden (obsolete)
Comment 8 mario.schroeder 2018-07-06 09:19:34 UTC
The same procedure as last year, Miss Sophie?
The same procedure as every year, James!

Still occurs with LO
Version: 5.4.6.2
Build ID: 1:5.4.6-0ubuntu0.17.10.1
CPU threads: 8; OS: Linux 4.13; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: CL
Comment 9 Buovjaga 2018-07-06 17:04:52 UTC
(In reply to mario.schroeder from comment #8)
> The same procedure as last year, Miss Sophie?
> The same procedure as every year, James!

https://www.youtube.com/watch?v=b1v4BYV-YvA

Still repro.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: ea39c41fdf63191579d25f327db81db14862251c
CPU threads: 8; OS: Linux 4.17; UI render: default; VCL: gtk3; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on July 4th 2018
Comment 10 QA Administrators 2019-07-07 03:38:52 UTC Comment hidden (obsolete)
Comment 11 QA Administrators 2021-07-07 04:02:57 UTC Comment hidden (obsolete)
Comment 12 Diana Vides 2023-07-04 05:12:30 UTC
This problem is still present in Version: 7.5.3.2 (X86_64) / LibreOffice Community
Build ID: 9f56dff12ba03b9acd7730a5a481eea045e468f3
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: es-ES (en_US); UI: en-US
Calc: threaded

It is also present in Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 105f057f5b994b7d79a55ca719240839c2d45b54
CPU threads: 6; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 13 Commit Notification 2024-12-08 11:01:41 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/813f34d6726584368641f2e93fdaf79ff387d6b8

tdf#79298 - FORMATTING: Copy/paste: import strikethrough attribute

It will be available in 25.8.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2024-12-16 09:28:29 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/47176d51b994d7858c1f4ff2f674d2955bc0ca5a

tdf#79298 - FORMATTING: Copy/paste: import strikethrough attribute

It will be available in 25.2.0.0.beta2.

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

Affected users are encouraged to test the fix and report feedback.
Comment 15 Piotr Osada 2025-01-10 21:49:57 UTC
Created attachment 198483 [details]
Copy-pasted text strikethrough is handled by LO master 2025-01-09

Verified with:

Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 89c00618b9cee6e786fd11a7fdbf7aaf24e4fbb7
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: pl-PL (pl_PL); UI: pl-PL
Calc: CL threaded

Text formatting is handled by Calc when pasting it from an HTML editor (eg. BlueGriffon) or web browser.