Bug 160583 - Pasted text in HTML-Format doesn't contain Field-Content
Summary: Pasted text in HTML-Format doesn't contain Field-Content
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.5.0.3 release
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:25.2.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Fields Clipboard
  Show dependency treegraph
 
Reported: 2024-04-08 09:37 UTC by Jürgen
Modified: 2024-09-11 08:09 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT-Document for Mailmerge (27.66 KB, application/vnd.oasis.opendocument.text)
2024-05-06 08:07 UTC, Jürgen
Details
Database for mailmerge (93.87 KB, application/vnd.sun.xml.base)
2024-05-06 08:37 UTC, Jürgen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jürgen 2024-04-08 09:37:12 UTC
Description:
When a text is copied from a LibreOffice-Writer Mail-Merge-Document an pasted in HTML-Format, Field-Content is empty. 
Works well in 7.4.6, doesn't work after updating to 7.6.6. - workaraound by downgrading to 7.4.6 again.

Steps to Reproduce:
1. Copy text from a Mail-Merge-Docoment
2. Paste in HTML-Format - Field-Content is empty
3. Paste in Plain-Text-Format or as Libre-office-Text - Field content is filled

Actual Results:
 After update to 7.6.6. text copied from LibreOffice-Writer and pasted into Thunderbird in HTML-Format doesn't contain the Mail-Merge-Fields.
Same behavior if copied text is pasted into new Libre-Office-Document in HTML-Format.
Pasted text in pure Text-Format contains all information

Expected Results:
When a text is copied from a LibreOffice-Writer Mail-Merge-Document it should contain the content of Mail-Merge-Fields. In version 7.4.6 it worked fine.


Reproducible: Always


User Profile Reset: No

Additional Info:
[Information automatically included from LibreOffice]
Locale: de
Module: TextDocument
[Information guessed from browser]
OS: Windows (All)
OS is 64bit: yes
Version: 7.6.6 (x64) / LibreOffice Community
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL
Comment 1 Dieter 2024-05-04 09:15:45 UTC
Jürgen, thank you for reporting the bug. Please attach a sample document, as that makes it easier for us to follow step 1 and to reproduce the bug. thnak you.
=> NEEDINFO
Comment 2 Jürgen 2024-05-06 08:07:19 UTC
Created attachment 193982 [details]
ODT-Document for Mailmerge

This text is connected to a simple database with all order-details and is made to be copied into email-programm like Thunderbird.
Comment 3 Jürgen 2024-05-06 08:37:10 UTC
Created attachment 193983 [details]
Database for mailmerge

To reconstruct easier - this is a copy of the database concerned.
Comment 4 QA Administrators 2024-05-07 03:15:15 UTC Comment hidden (obsolete)
Comment 5 Buovjaga 2024-07-24 08:06:39 UTC
Bibisected with linux-64-7.5 to e09d7acd6148b8417487a4473fdc038c7e30d1c4
sw: fix crash in OutHTML_SwFormatField()

Opened attachment 193982 [details] and copied paragraphs including fields into an HTML mail in Thunderbird.
Comment 6 Commit Notification 2024-08-09 08:58:50 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/419c9f40eca646a59b57486ef13f8b8fefb9ba8f

tdf#160583 sw HTML export: fix empty field content on copy

It will be available in 25.2.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 7 Jürgen 2024-09-11 08:09:29 UTC
Hi there,
thanks for the good job. I tried it with 
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 3e8183e0c4b4c116cbd9187bfdfa7dfdf447805e
CPU threads: 12; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded

The error is fixed!

I'm happy to see, that an former minor error was fixed same time. In version 7.4.6. I had to set field-background from automatic to white in order to have a white background in the text copied and pasted into Thunderbird. That bug is gone, too.

so THANK YOU VERY MUCH to all, who helped fixing that bug.