Bug 331022 - Copy/paste table selections from libreoffice fails more often than not
Summary: Copy/paste table selections from libreoffice fails more often than not
Status: RESOLVED FIXED
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.11.4
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-11 22:01 UTC by Hans-Peter Jansen
Modified: 2014-02-17 21:03 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.3


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hans-Peter Jansen 2014-02-11 22:01:29 UTC
kmail has a nice feature, that allows pasting selections of a calc table as images into html mails.
Unfortunately, that feature fails often, due to creating invalid image tags, eg:

<im=
g src=3D"PLZ=09Transporte=09STP=09STP-=F8=09Paletten=09Pal-=F8=09Gesamt=
gewicht=09Gewicht-=F8
0=092" /></p>

(line wraps left intact intentionally)

while the attachment looks like:

--nextPart3277463.dT9fysvj0a
Content-ID: <1173981377@KDE>
Content-Transfer-Encoding: base64
Content-Type: image/png

[...]

Consequently, the picture isn't shown in the mail. Now, older kmail versions (1.6) deal better with that situation by displaying the picture like an ordinary attachment below the mail. 

Not so kmail2: it just shows a symbol for a damaged image, with no way to get to the image other than saving the mail to disk, and using some external tools to extract its attachments. 

That combination is very unfortunate. So here are two kind requests for changes:
when inserting inlined images, always address them by content id: src="cid:1173981377@KDE"

When detecting attachments with no (valid) anchors in the mail text, display them as usual attachments, please.


Reproducible: Always

Steps to Reproduce:
Select some part of a table in calc, copy it, and paste it into a html mail.
Actual Results:  
Often, an icon for an invalid image is shown

Expected Results:  
The image should be visible

BTW: using gimp as a copy/paste trampoline, that failure disappears.
Comment 1 Hans-Peter Jansen 2014-02-11 22:03:33 UTC
openSUSE 13.1/x86_64, kmail-4.11.5-460.5.x86_64, libreoffice-4.1.4.2-13.1.x86_64
Comment 2 Laurent Montel 2014-02-14 13:08:04 UTC
I need a real test case.
Here it works fine.
Regards
Comment 3 Hans-Peter Jansen 2014-02-15 14:32:56 UTC
Dear Laurent,

thanks for caring. 

I forgot to mention, that the result looks always fine in composer, but when you send the mail to yourself and display the received mail, it shows above mentioned deficits.

It happens more often, when I include pastes of several (complex) tables into one mail, and the issue arises often only for a subset of included pictures.

Let me know, if this helped you to reproduce this.

If not, I can offer you to send you some samples directly. It seems to happen for complex tables much more often, but for the table in question, you must keep that private.
Comment 4 Laurent Montel 2014-02-16 07:49:59 UTC
Not necessary to send me a lot of example
just one :)
I restested it and work fine.
Comment 5 Laurent Montel 2014-02-17 12:54:25 UTC
Git commit 4ee0ca6b5a8541c994e6b60ca3ec5882a0c86151 by Montel Laurent.
Committed on 17/02/2014 at 12:54.
Pushed by mlaurent into branch 'KDE/4.12'.

Fix Bug 331022 - Copy/paste table selections from libreoffice fails more often than not

FIXED-IN: 4.12.3

M  +1    -1    kpimtextedit/textedit.cpp

http://commits.kde.org/kdepimlibs/4ee0ca6b5a8541c994e6b60ca3ec5882a0c86151
Comment 6 Laurent Montel 2014-02-17 12:55:29 UTC
Fixed now.
Thanks
Comment 7 Hans-Peter Jansen 2014-02-17 21:03:21 UTC
I can confirm, that your fix solves the issue in question, it even applies cleanly for 4.11.5.

Great performance, Laurent!

Thank you very much.