Description: Copy pasting from OpenOffice/LibreOffice with default formatting, to Thunderbird Mail Composer will ruin the formatting in the Thunderbird Mail Composer. This happens even if the user has unchecked the option "Use Paragraph format instead of Body Text by default" from Thunderird. Steps to Reproduce: 1. Write text in OpenOffice or Libreoffice with default formatting (line spacing is 1). Select this text and press CTRL+C. 2. Open Thunderbird and go to Preferences -> Composition. From here uncheck the box "Use Paragraph format instead of Body Text by default". Press close. 3. Open Thunderbird and press the Write button to open a new window to write an email. 4. Paste the text you copied from OpenOffice/Libreoffice to this "Write window" of Thunderbird. Actual Results: The formatting of the pasted text is now ruined, because it is paragraph formatted (it should not be). Also if I select all of the text, and change from "Paragraph" to "Body Text", it does not change the formatting the way it should be. Expected Results: By pasting text from OpenOffice/LibreOffice to Thunderbird, the formatting should stay the same, just like it was in the original OpenOffice/LibreOffice file. (And not change into paragraph formatting.) Reproducible: Always User Profile Reset: No Additional Info: I posted similar problem into BugZilla.Mozilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1425661 Also similar kind of issue might be with Word: https://support.mozilla.org/fi/questions/1173599 Help - About LibreOffice Version: 5.3.4.2 Build ID: f82d347ccc0be322489bf7da61d7e4ad13fe2ff3 CPU Threads: 2; OS Version: Windows 6.0; UI Render: default; Layout Engine: new; Locale: fi-FI (fi_FI); Calc: group User-Agent: Mozilla/5.0 (Windows NT 6.0; rv:52.0) Gecko/20100101 Firefox/52.0
I do not understand your bug description: 1/ what do you mean by "the formating is ruined", please give an exhaustive example: an odt test file, instruction for what part of text must be copied and pasted, what you see in the compose window of Thunderbird and what you should see in the same window. 2/ why do you think that the problem (if there is a problem) is on LibreOffice side and not on Thunderbird side? Set status to NEEDINFO, please set it back to UNCONFIRMED once requested informations are provided. Best regards. JBF
(In reply to Jean-Baptiste Faure from comment #1) > I do not understand your bug description: > 1/ what do you mean by "the formating is ruined", please give an exhaustive > example: an odt test file, instruction for what part of text must be copied > and pasted, what you see in the compose window of Thunderbird and what you > should see in the same window. > > 2/ why do you think that the problem (if there is a problem) is on > LibreOffice side and not on Thunderbird side? > > Set status to NEEDINFO, please set it back to UNCONFIRMED once requested > informations are provided. > > Best regards. JBF You can use this service to try out what happens in Thunderbird, because the exact same thing happens in Thunderbird: https://www-archive.mozilla.org/editor/midasdemo/ Here is a text file you can try called "paste_this_into_thunderbird.odt": https://ufile.io/u0dpy That file has been uploaded into the service https://uploadfiles.io/ and it only contains this (not including /START and /END): /START Text here Text here Text here Text here Text here Text here Text Text Text Text End. /END When you paste this text from LibreOffice into Thunderbird (or that "midasdemo" website linked up there), you see that the formatting gets ruined. In this case meaning that there is a lot more paragraph spacing above and below each paragraph. So if I type these "keystrokes" on my keyboard in Thunderbird: *press A-key* *press J-key* *press ENTER-key* *press ENTER-key* *press A-key* And then I type in LibreOffice these exact same "keystrokes": *press A-key* *press J-key* *press ENTER-key* *press ENTER-key* *press A-key* Then these both messages look visually exactly the same. But now, if I paste that particular text from LibreOffice to Thunderbird, then that message looks different from the one I typed in Thunderbird itself. So the text got ruined during this pasting process. When a user writes text inside either of these programs (Thunderbird and LibreOffice), then the ENTER-key behaves in the exact same way in both of the programs, producing the exact same result. But if the user then pastes from LibreOffice to Thunderbird, then that formatting of the pasted text gets ruined. This is not logical at all. The ENTER-key has the work the same way in all of these very common and useful programs, and copy-pasting just cannot ruin that logic. Well then you suggest: Paste Without Formatting? No, this is not a proper solution at all. Let's say I have a text (written in OpenOffice/LibreOffice) that is 3000 words long and includes: 30 links, texts that are bolded, unordered lists etc. And I wish to send this text to 20 different people. And I want to change the introduction of the text slightly for all these different people. I just cannot "Paste Without Formatting", because it requires tremendous work to get that formatting then correct.
Created attachment 138659 [details] Example file
(In reply to tbreportbug from comment #2) > When you paste this text from LibreOffice into Thunderbird (or that > "midasdemo" website linked up there), you see that the formatting gets > ruined. In this case meaning that there is a lot more paragraph spacing > above and below each paragraph. That's not the fault of LibreOffice, now is it? If you look at the source of the Midas demo after pasting the stuff in, you see that inside every empty paragraph they have added a break element. Deleting these elements make for a sane line spacing.
(In reply to Buovjaga from comment #4) > (In reply to tbreportbug from comment #2) > > When you paste this text from LibreOffice into Thunderbird (or that > > "midasdemo" website linked up there), you see that the formatting gets > > ruined. In this case meaning that there is a lot more paragraph spacing > > above and below each paragraph. > > That's not the fault of LibreOffice, now is it? > > If you look at the source of the Midas demo after pasting the stuff in, you > see that inside every empty paragraph they have added a break element. > Deleting these elements make for a sane line spacing. The Midas demo does not add additional break elements. It is the LibreOffice that is adding additional paragraph elements! You can test this by going into LibreOffice, and then export (using Save As...) the document as HTML. So exporting out you get this: <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">End.</p> But exporting SHOULD give something like this, to make it render properly in Firefox and Thunderbird: <p style="margin-bottom: 0cm; line-height: 100%">Text here<br/> <br/> Text here<br/> <br/> Text here<br/> <br/> Text here<br/> <br/> Text here<br/> <br/> Text here<br/> <br/> Text<br/> Text<br/> Text<br/> Text<br/> End.</p> The problem seems to be obviously with LibreOffice! Can we now please get this fixed? This problem is completely ruining the usage of Thunderbird!
And using find & replace does not work in LibreOffice. I tried to replaces all $ (new paragraph) with \n (new line break) but this does NOT replace those $ symbols, even though the tool CLAIMS that it changed many entries.
(In reply to tbreportbug from comment #6) > And using find & replace does not work in LibreOffice. I tried to replaces > all $ (new paragraph) with \n (new line break) but this does NOT replace > those $ symbols, even though the tool CLAIMS that it changed many entries. And even if I use this "trick" (https://forum.openoffice.org/en/forum/viewtopic.php?f=20&t=67679#p301299): START_QUOTE Enter a line break normally and copy it to the clipboard Edit > Find & Replace Search for: $ Options/Regular expressions: ON Click "Find All" Edit > Paste /END_QUOTE to replace all $ signs, then all of my indentations and unordered list formattings will be ruined in the process. So using find & replace will not solve this issue.
Currently this is what is EXPORTED from LibreOffice: <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">End.</p> One solution would be to make LibreOffice export (and I presume then normal CTRL+C and CTRL+V will work as desired) the above mentioned HTML like this: <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">Text</p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">Text</p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">Text</p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">Text</p> <p style="margin-bottom: 0cm; line-height: 100%; margin-top: 0cm">End.</p> To reiterate, the problem with the current system seems to be: 1) Paragraphs have default margin-top value. The margin-top value should be 0cm!
Apologies, the <br/> elements inside the empty paragraphs are inserted by LibreOffice. Confirmed by running this command in Linux after copying the text from LibreOffice: xclip -selection clipboard -o -t text/html (In reply to tbreportbug from comment #8) > To reiterate, the problem with the current system seems to be: > > 1) Paragraphs have default margin-top value. The margin-top value should be > 0cm! From what I am seeing, if the paragraphs have a default margin-top value, it is not assigned in LibreOffice, but Thunderbird. Indeed, Richard Marti in the Thunderbird report says: "From toolkit html.css a margin-block-start: 1em; is applied as default for <p>. You'd need also a margin-top: 0 to remove all space above the <p>." If I look at the styles in Firefox dev tools, I can see the 16px margin-top for the paragraphs in *browser styles*, so this is something the browser (or Thunderbird) is applying. It's late and I have to think about this more tomorrow. I don't really have a clear picture of what should be done or what would be the perfect result. For reference, I will include below the clipboard text/html contents from LibreOffice. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8"/> <title></title> <meta name="generator" content="LibreOffice 6.1.4.2 (Linux)"/> <style type="text/css"> @page { size: 21.59cm 27.94cm; margin: 2cm } p { margin-bottom: 0.25cm; line-height: 120%; background: transparent } </style> </head> <body lang="fi-FI" link="#000080" vlink="#800000" dir="ltr"><p style="margin-bottom: 0cm; line-height: 100%"> Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text here</p> <p style="margin-bottom: 0cm; line-height: 100%"><br/> </p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">Text</p> <p style="margin-bottom: 0cm; line-height: 100%">End.</p> </body>
Ok, so having margin-top: 1em for paragraphs is an established practice in browser rendering. Setting the property to 0 does make the formatting mimic the one seen in LibreOffice. Furthermore, if no spacing above or below and no indentation is set for a paragraph, the shortest rule would be just margin: 0. Setting to NEW.
Dear tbreportbug, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug
Dear tbreportbug, To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the information from Help - About LibreOffice. If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice. Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to 'inherited from OOo'; 4b. If the bug was not present in 3.3 - add 'regression' to keyword Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug