Bug 332614 - Can't copy/paste tables from libreoffice calc after libreoffice update
Summary: Can't copy/paste tables from libreoffice calc after libreoffice update
Status: RESOLVED WORKSFORME
Alias: None
Product: kmail2
Classification: Applications
Component: composer (show other bugs)
Version: 4.13 Pre
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
: 336010 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-03-26 07:40 UTC by Yuriy Vidineev
Modified: 2016-09-26 18:24 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
HTML generated by LibreOffice 4.1.5.3 (749 bytes, text/html)
2014-04-11 06:52 UTC, Yuriy Vidineev
Details
HTML generated by LibreOffice 4.2.3.3 (1.28 KB, text/html)
2014-04-11 06:53 UTC, Yuriy Vidineev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuriy Vidineev 2014-03-26 07:40:33 UTC
Hello
Actually I don't know what the real reason of my problem: libreoffice (4.1 -> 4.2) or kmail (4.11.5 -> 4.13 beta) update
HTML that libreoffice generate looks ordinal:

xclip -o -t text/html

<!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 4.2.2.1 (Linux)">
        <style type="text/css"><!-- 
                body,div,table,thead,tbody,tfoot,tr,th,td,p { font-family:"Liberation Sans"; font-size:x-small }
                 -->
        </style>

</head>

<body text="#000000">
<table cellspacing="0" border="0">
        <colgroup span="2" width="85"></colgroup>
        <tr>
                <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" height="17" align="right" sdval="1" sdnum="1033;">1</td>
                <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" align="right" sdval="3" sdnum="1033;">3</td>
        </tr>
        <tr>
                <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" height="17" align="right" sdval="2" sdnum="1033;">2</td>
                <td style="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" align="right" sdval="4" sdnum="1033;">4</td>
        </tr>
</table>
</body>

</html>

If I'll try to insert it to gmail web interface - it will work as expected (just insert table)
If I'll try to insert in kmail composer - nothing will happen. If I'll try to use 'Insert HTML' function with the same HTML - table will created but without borders.

P.S. Thank you for your help and sorry for my english

Reproducible: Always

Steps to Reproduce:
1. Copy something from LibreOffice Calc
2. Try to insert (ctrl+v) it to kmail composer
3. Nothing will happens
4. Try to insert in Gmail web interface - table will be created
Comment 1 Laurent Montel 2014-04-03 05:56:34 UTC
<table cellspacing="0" border="0">
=> no border.
Comment 2 Yuriy Vidineev 2014-04-11 00:55:58 UTC
Hi Laurent,
Thanks for the answer!
So, is it a libreoffice bug? Do you know some standard about table border and copypaste?
Comment 3 Yuriy Vidineev 2014-04-11 04:22:15 UTC
Here is HTML genered by LibreOffice 4.1 that can be successfully installed in kmail komposer

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
        <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=utf-8">
        <TITLE></TITLE>
        <META NAME="GENERATOR" CONTENT="LibreOffice 4.1.5.3 (Linux)">
        <STYLE>
                <!-- 
                BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TH,TD,P { font-family:"Liberation Sans"; font-size:x-small }
                 -->
        </STYLE>
</HEAD>
<BODY TEXT="#000000">
<TABLE CELLSPACING="0" COLS="2" BORDER="0">
        <COLGROUP SPAN="2" WIDTH="85"></COLGROUP>
        <TR>
                <TD STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" HEIGHT="16" ALIGN="RIGHT" SDVAL="1" SDNUM="1033;">1</TD>
                <TD STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="RIGHT" SDVAL="2" SDNUM="1033;">2</TD>
        </TR>
        <TR>
                <TD STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" HEIGHT="16" ALIGN="RIGHT" SDVAL="3" SDNUM="1033;">3</TD>
                <TD STYLE="border-top: 1px solid #000000; border-bottom: 1px solid #000000; border-left: 1px solid #000000; border-right: 1px solid #000000" ALIGN="RIGHT" SDVAL="4" SDNUM="1033;">4</TD>        
</TR>                                                                                                 
</TABLE>                                                                                                                                                  
</BODY>                                                                                              
</HTML>
Comment 4 Laurent Montel 2014-04-11 05:27:02 UTC
if you can with 4.1 and not 4.2 it's a bug from openoffice.
Perhaps it's a bug when it generates html perhaps it's a bug when it stores in clipboard
Don't know but kmail support html import so don't know for the moment why it doesn't work.
Comment 5 Yuriy Vidineev 2014-04-11 05:34:01 UTC
> if you can with 4.1 and not 4.2 it's a bug from openoffice.

I'm not sure. If I can copy/paste table from libreoffice calc 4.2 to thunderbird and gmail web interface but can't paste to kmail komposer - may be it's bug in komposer?
Comment 6 Laurent Montel 2014-04-11 06:38:50 UTC
As you told it worked with libreoffice 4.1 and not with libreoffice 4.2
so they broke something
They didn't keep compatibility somewhere.
Comment 7 Yuriy Vidineev 2014-04-11 06:52:34 UTC
Created attachment 86038 [details]
HTML generated by LibreOffice 4.1.5.3
Comment 8 Yuriy Vidineev 2014-04-11 06:53:51 UTC
Created attachment 86039 [details]
HTML generated by LibreOffice 4.2.3.3
Comment 9 Yuriy Vidineev 2014-04-11 07:01:54 UTC
(In reply to comment #6)
> As you told it worked with libreoffice 4.1 and not with libreoffice 4.2
> so they broke something
> They didn't keep compatibility somewhere.

Firefox and Rekonq recognize both LO 4.1 and 4.2 generated HTML as valid (4.2 generated HTML had been recognized even as more valid because it has borders). Maybe Libreoffice fix some bug and this fix broke some backward compatibility? Is it possible to find out why composer doesn't recognize generated by LO 4.2 HTML (I've attached very small example)?
Comment 10 Laurent Montel 2014-04-11 12:52:30 UTC
I will investigate it this WE.
Comment 11 Gunter Ohrner 2014-05-19 15:35:34 UTC
Also pasting LibreOffice tables into kMails raw-text editor (non-html-mails) does not work.

Pasting to kate works fine (produces tab-delimited text), copy-pasting from kate to kMail composer afterwards also works fine.

I also upgraded LibreOffice and kMail in parallel (upgrade to Kubuntu 14.04), so I'm not sure which application is responsible.
Comment 12 Laurent Montel 2014-06-10 06:04:15 UTC
*** Bug 336010 has been marked as a duplicate of this bug. ***
Comment 13 Denis Kurz 2016-09-24 18:22:23 UTC
This bug has only been reported for versions before 4.14, which have been unsupported for at least two years now. Can anyone tell if this bug still present?

If noone confirms this bug for a Framework-based version of kmail2 (version 5.0 or later, as part of KDE Applications 15.12 or later), it gets closed in about three months.
Comment 14 Gunter Ohrner 2016-09-24 23:17:13 UTC
Mh... Copy-pasting from LibreOffice Calc 5.1.4.2 to kMail 5.3.0's plain text editor will insert a PNG as an attachment by default which I consider to be surprising.

At least the PNG actually shows a screenshot / rendering of the tabular data.

Inserting plain text using Ctrl-Shift-V will insert tab-delimited tabular text, which is fair enough.
Comment 15 Yuriy Vidineev 2016-09-25 04:30:10 UTC
I can confirm what Gunter said for the same versions of Calc and KMail.
What I expect: instead of PNG insert HTML
Comment 16 Gunter Ohrner 2016-09-25 08:21:50 UTC
(In reply to Yuriy Vidineev from comment #15)
> I can confirm what Gunter said for the same versions of Calc and KMail.
> What I expect: instead of PNG insert HTML

In case the plain text composer, I'd expect plain text / tab-delimited values to be inserted, not HTML.

HTML / a formatted table should be inserted in case of the rich text composer, though.
Comment 17 Denis Kurz 2016-09-25 19:15:57 UTC
Gunter, Yuriy: Ok, there still seems to be *some* problem here, but it's not the original bug. Since mixing multiple up bugs in one report makes it harder to work on the bug, I close this one. Please consider filing your suggestions ("should be attached as HTML" and the like) as a fresh, new feature request. Thanks a lot for your feedback.
Comment 18 Yuriy Vidineev 2016-09-26 17:53:14 UTC
It worked with old version of libreoffice and kmail. So for me it looks like regression. Ok let it be new feature :)
Comment 19 Yuriy Vidineev 2016-09-26 18:15:41 UTC
https://bugs.kde.org/show_bug.cgi?id=369387
Please correct me if I'm not clear enough. Thanks
Comment 20 Denis Kurz 2016-09-26 18:24:09 UTC
At first glance, it contains the essential info. When a dev wants to implement it, they'll ask for info that might be missing.