Bug 154581 - Paragraph language and character formatting (bold, italic) lost when pasting HTML
Summary: Paragraph language and character formatting (bold, italic) lost when pasting ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.6.0.0 alpha0+
Hardware: x86-64 (AMD64) Linux (All)
: high normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:24.8.0 target:24.2.4 target:7....
Keywords: bibisected, bisected, regression
: 156612 (view as bug list)
Depends on:
Blocks: HTML-Paste
  Show dependency treegraph
 
Reported: 2023-04-03 12:11 UTC by Stéphane Guillou (stragu)
Modified: 2024-05-09 10:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stéphane Guillou (stragu) 2023-04-03 12:11:03 UTC
Steps:
1. Open Writer
2. Copy paragraph in French from https://translate.google.com/?sl=en&tl=fr&text=To%20be%20hopeful%20in%20bad%20times%20is%20not%20just%20foolishly%20romantic.%20It%20is%20based%20on%20the%20fact%20that%20human%20history%20is%20a%20history%20not%20only%20of%20cruelty%2C%20but%20also%20of%20compassion%2C%20sacrifice%2C%20courage%2C%20kindness.&op=translate
3. Paste into Writer

Result: paragraph language remains the document's default instead of being copied across.

Regression bibisected with linux-64-7.6 repository to first bad commit 134be7c58b05aa3cec939901f66430b2f87b8e4e which points to core commit:

commit db115bec9254417ef7a3faf687478fe5424ab378
author	Michael Stahl <michael.stahl@allotropia.de>	Tue Feb 14 18:03:55 2023 +0100
committer	Michael Stahl <michael.stahl@allotropia.de>	Fri Feb 24 07:32:23 2023 +0000
tree 0b5f58cda73137302fd955db3e0958dda71358fb
parent 7e7b69829db63e64b8aed8d03c6eaed6d8f1a27c
tdf#78510 sw,cui: split SvxLRSpaceItem for SwTextNode, SwTextFormatColl
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147024

Michael, can you please have a look?
Comment 1 Stéphane Guillou (stragu) 2023-08-10 09:04:38 UTC
*** Bug 156612 has been marked as a duplicate of this bug. ***
Comment 2 Stéphane Guillou (stragu) 2023-08-10 09:09:13 UTC
From duplicate bug 156612, we also have lost italics and bold character formatting. Can be tested with attachment 188774 [details].

Setting priority to "major" as it's a regression affecting basic functionality.

Michael, can you please have a look?
Comment 3 Stéphane Guillou (stragu) 2023-08-10 09:09:58 UTC
(In reply to Stéphane Guillou (stragu) from comment #2)
> Setting priority to "major"

to "high", sorry.
Comment 4 Commit Notification 2024-04-26 11:00:01 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ac05822b8957d80018d3ce1cbf97cd9faa0dfe99

tdf#154581 tdf#157411 tdf#158549 sw: HTML import: fix SfxItemIter reuse

It will be available in 24.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 5 Michael Stahl (allotropia) 2024-04-26 11:03:31 UTC
fixed on master
Comment 6 Stéphane Guillou (stragu) 2024-04-29 11:36:31 UTC
Thanks Michael, fix verified in a recent daily build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 2f5ab5b8e7bd7dd06e00153abb77a69e5d192dd2
CPU threads: 8; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: CL threaded
Comment 7 Commit Notification 2024-04-29 16:40:05 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/d33d3bbd9fb021c9ef15689f4e8e5b9898541e70

tdf#154581 tdf#157411 tdf#158549 sw: HTML import: fix SfxItemIter reuse

It will be available in 24.2.4.

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 8 Commit Notification 2024-04-29 16:40:12 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6":

https://git.libreoffice.org/core/commit/f6fb5dedc3926ce214560a4053815f692b29b934

tdf#154581 tdf#157411 tdf#158549 sw: HTML import: fix SfxItemIter reuse

It will be available in 7.6.8.

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 9 Commit Notification 2024-04-29 16:43:23 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-24-2-3":

https://git.libreoffice.org/core/commit/9b5b007df580eaeff2bab2fda9a6cb45e3a3bd24

tdf#154581 tdf#157411 tdf#158549 sw: HTML import: fix SfxItemIter reuse

It will be available in 24.2.3.

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 10 Commit Notification 2024-05-07 16:12:31 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-6-7":

https://git.libreoffice.org/core/commit/598cc6c5f03bf0aae525e80ae6960de2c78efeae

tdf#154581 tdf#157411 tdf#158549 sw: HTML import: fix SfxItemIter reuse

It will be available in 7.6.7.

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 11 Commit Notification 2024-05-09 10:40:49 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/0479f870e05d5d231d2d57aaeedff11544bd370c

tdf#154581 tdf#157411 tdf#158549: sw_htmlimport: Add unittest

It will be available in 24.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.