Closed Bug 648797 Opened 13 years ago Closed 12 years ago

Copying from OpenOffice spreadsheet and pasting in Message Compose window causes font to shrink.

Categories

(Thunderbird :: Message Compose Window, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 758999

People

(Reporter: CarlPonder, Unassigned)

References

Details

Attachments

(3 files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.16) Gecko/20110323 Ubuntu/10.04 (lucid) Firefox/3.6.16
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.15) Gecko/20110303 Lightning/1.0b2 Thunderbird/3.1.9

I'm selecting a portion of an OpenOffice spreadsheet, copying it and pasting it into the body of a message that I am sending.
The pasted portion is correctly converted into a table.
The problem is that the fonts go haywire and can't be repaired.

Reproducible: Always

Steps to Reproduce:
1. Open an OpenOffice spreadsheet
2. Select a submatrix and copy it.
3. Open a new message in Thunderbird
4. Enter some text
5. Do a paste into the message
Actual Results:  
ALL the fonts shrink in the message and it doesn't look like they can be reset.
I can increase the font size manually but can't change font types.
"Remove all text styles" doesn't work.

Expected Results:  
The fonts in the message body should be preserved when the spreadsheet is pasted.
The default font of the spreadsheet table is an open question, but leastwise I should be able to select it and change the font properties.
My guess is that the pasted component is an HTML string and it breaks the HTML structure of the message being composed.
Either the pasted HTML should be parsed and converted before insertion, or some HTML "padding" needs to be added around the insertion-point to make the syntax flow consistent.
See Also: → 221655
bug 221655 looks equivalent to this but was supposedly fixed; it may also be referring to the browser-page composer as opposed to the mailer-message composer.
(In reply to comment #2)
> bug 221655 looks equivalent to this but was supposedly fixed; it may also be
> referring to the browser-page composer as opposed to the mailer-message
> composer.

It's not fixed unfortunately :(
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Resolution: --- → DUPLICATE
Bug 221655 was marked as "Resolved Incomplete" since the reviewer decided there wasn't enough detail to reproduce the problem.
I hope this report does include enough detail; also the issue is the mailer-composer rather than the browser-composer.
Could you please keep at least one of these open? Otherwise nothing will get fixed...
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
I am having exactly the same problem and, FWIW, my outgoing mail folder shows that Thunderbird was handling the situation properly at least as recently as July (2011).

-- Fred Goldrich
(Thunderbird 7.0.1, OO 3.3.0)
I've never seen this work correctly, and have been using these tools for 10 years....
Very interesting. I am running Windows XP and the problem began for me in the past couple of months although it's been plaguing Carl for much longer.

OS-related, perhaps? Is that factoid enough to stimulate anyone's interest?
This is still a problem with Thunderbird 8.

One side note: I had a quotation inside the note that was of type "preformat".
Its size did not change when I inserted the spreadsheet.
When I change the format to "bodytext" or "paragraph" then the font shrunk.
I saved the message as a Draft and dumped the HTML source to a file.
I just attached the HTML portion of the file (omitting the message header) from before and after the paste was performed.
You can view these yourself in Firefox and see that the font has shrunk in the portion before the pasted table.
Note that the first statement in the message comes *before* the inserted table, yet the table causes the font to shrink retroactively:

<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    Here is a test message<br>
    <br>
!!!! HERE IS WHERE THE TABLE WAS INSERTED !!!!!!
  </body>
</html>
The problem is this comment clause:
    <style>
        <!-- 
        BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Arial"; font-size:x-small }
         -->
    </style><br>

The third attachment removes the "font-size:x-small" clause and you can see that the problem goes away.
I don't know why this clause is there in the first place.
Also, since it's formatted like a comment, I'm not sure why it would have any effect, either.
This is an issue with Libreoffice Calc.  You can manually fix this in Thunderbird after pasting the table in:

Select All
Insert menu -> HTML
Locate and remove the <style> block.
Issue also affecting me, and the bug is not assigned to anyone, what can be done to speed up the fix? :-)
I can CONFIRM this behaviour exactly as described as a kind of javascript-injection mentioned in comment #12
done with Copy&Paste from LibreOffice 3.5.4.2. just dropping a CALC-table-selection.

It can easily be seen, that with pasting HTML-style-code
<style>
        <!-- 
        BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Arial"; font-size:x-small }
         -->
    </style>

it takes effect back to Thunderbird's editor style.

So, how to change this bug into status "CONFIRMED" or "NEW"?

What's the difference of this BUGZILLA compared with LibreOffice's "https://bugs.freedesktop.org/"- BUGZILLA where you have got the possibility to "edit" the Status?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Status: NEW → RESOLVED
Closed: 13 years ago12 years ago
Resolution: --- → DUPLICATE
If you find this bug as irritating as I do, try this workaround (it works in Windows 7 x64 anyway):

Paste your LibreOffice Calc table into Thunderbird.

Click on the line immediately after the inserted table. Press shift-back arrow. Press delete. Tada! - the email goes back to normal size text everywhere :-)

YMMV, but this works every time for me.

Cheers,
Mark
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: