Bug 123115 - KDE5: cannot paste table from Firefox into Calc
Summary: KDE5: cannot paste table from Firefox into Calc
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://bugreports.qt.io/browse/QTBUG...
Whiteboard:
Keywords: implementationError, possibleRegression
Depends on:
Blocks: KDE, KF5
  Show dependency treegraph
 
Reported: 2019-02-01 18:00 UTC by Roman Kuznetsov
Modified: 2019-06-16 06:47 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Simplified HTML page with table (372.63 KB, text/html)
2019-03-04 17:13 UTC, Michael Weghorn
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roman Kuznetsov 2019-02-01 18:00:46 UTC
Description:
follow from bug 122679

I tried copy in Firefox (Kubuntu 18.10) table with META on https://wiki.documentfoundation.org/QA/Tracking_Bugs and paste it into Calc (vcl:kde) and it happens nothing


Версия: 6.3.0.0.alpha0+
ID сборки: 51af3179cf972809d6495c7d58033e069f647bbf
Потоков ЦП: 4; ОС:Linux 4.18; Отрисовка ИП: по умолчанию; VCL: kde5; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-02-01_00:15:00
Локаль: ru-RU (ru_RU.UTF-8); UI-Language: ru-RU
Calc: threaded

Steps to Reproduce:
1. Go to site https://wiki.documentfoundation.org/QA/Tracking_Bugs
2. Select Show >>>ALL<<< entries for table
3. Select all data in table and copy it
4. Open Calc
5. Select A1
6. Right click on cell and select Paste
7. It happens nothing

Actual Results:
It happens nothing after Paste

Expected Results:
Table from Firefox pasts into Calc spreadsheet


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Roman Kuznetsov 2019-02-01 18:02:54 UTC
don't repro in

Version: 6.1.4.2
Build ID: 1:6.1.4-0ubuntu0.18.10.1
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: gtk3_kde5; 
Locale: ru-RU (ru_RU.UTF-8); Calc: group threaded

possible regression or implementation error
Comment 2 Michael Weghorn 2019-02-02 01:05:43 UTC
Does this also happen if you paste right after opening Calc, or only if you have copied something from inside Calc before?
This is how it behaves for me, and in this case I think this is a duplicate of bug 122689, s. in particular bug 122689 comment 6.

Does copying something else, like plain text, work for you as opposed to copying the table? (in which case this is probably not a duplicate)
Comment 3 Roman Kuznetsov 2019-02-02 14:18:10 UTC
(In reply to Michael Weghorn from comment #2)
> Does this also happen if you paste right after opening Calc, or only if you
> have copied something from inside Calc before?
> This is how it behaves for me, and in this case I think this is a duplicate
> of bug 122689, s. in particular bug 122689 comment 6.

I made paste in new empty Calc spreadsheet without any action in those document before

> 
> Does copying something else, like plain text, work for you as opposed to
> copying the table? (in which case this is probably not a duplicate)

text from our BZ pasted in one cell as I expected
Comment 4 Ysabeau 2019-02-10 18:27:42 UTC
It is impossible to copy-paste:

- from  LibreOffice to another software
- from another software to LibreOffice.

The only case where it is possible to paste something from another software is when we copy *before* starting LibreOffice, after it is impossible to copy-paste in both directions.

For some strange reason, it is possible to copy-paste this on the version (but nothing else).

Version: 6.2.0.3
Build ID: 98c6a8a1c6c7b144ce3cc729e34964b47ce25d62
Threads CPU : 4; OS : Linux 4.14; UI Render : par défaut; VCL: kde5; 
Locale : fr-FR (fr_FR.UTF-8); Langue IHM : fr-FR
Calc: threaded

And yes, I have this same problem *always* and with a *new* profile (so it is not profile dependant).
Comment 5 Ysabeau 2019-02-10 18:29:25 UTC
Oh and I work with Mageia, Plasma.

PS: it is not normal, but really critical.
Comment 6 Ysabeau 2019-02-11 08:59:01 UTC
I tried with another computer under Mageia but working with LXDE. Copy-paste works. So it seems that it is specific to KDE. I do hope this bug will be fixed.
Comment 7 Roman Kuznetsov 2019-02-11 09:09:51 UTC
(In reply to Ysabeau from comment #6)
> I tried with another computer under Mageia but working with LXDE. Copy-paste
> works. So it seems that it is specific to KDE. I do hope this bug will be
> fixed.

If you confirmed this bug please change status to NEW
Comment 8 Michael Weghorn 2019-02-11 10:03:02 UTC
(In reply to Ysabeau from comment #4)
> It is impossible to copy-paste:
> 
> - from  LibreOffice to another software
> - from another software to LibreOffice.
> 
> The only case where it is possible to paste something from another software
> is when we copy *before* starting LibreOffice, after it is impossible to
> copy-paste in both directions.

This sounds like the more general problem handled in bug 122689 than the specific one described here.
Comment 9 Michael Weghorn 2019-02-11 10:06:15 UTC
As a workaround until this is fixed, one could use another VCL plugin, e.g. by setting the environment variable "SAL_USE_VCLPLUGIN" to "gtk3", or just removing the kde-integration packages.
Comment 10 Max 2019-02-12 08:43:20 UTC
I experienced the copy-paste issue both in Calc and in Writer with vcl=kde5.

No problem was with vcl=gtk3 or qt5. 
But issue came back when I tried to run "SAL_USE_VCLPLUGIN=kde5 SAL_VCL_KDE5_USE_QPAINTER=1 libreoffice"
Comment 11 Max 2019-02-12 08:47:17 UTC
(In reply to Max from comment #10)
> But issue came back when I tried to run "SAL_USE_VCLPLUGIN=kde5
> SAL_VCL_KDE5_USE_QPAINTER=1 libreoffice"
Sorry, issue came back when I tried to run "SAL_USE_VCLPLUGIN=qt5 SAL_VCL_QT5_USE_CAIRO=1 libreoffice"

I think, the bug is linked with cairo
Comment 12 Michael Weghorn 2019-02-27 21:40:39 UTC
@Roman Kuznetsov: Can you please do a retest with a version that includes the commit from bug 122689 comment 10 (e.g. tomorrow's daily build of master)?

I can no longer reproduce the issue with the following version, but it seems my observations differed a bit from yours anyway, so I'd be happy to hear whether it's actually fixed for you, too.

Version: 6.3.0.0.alpha0+
Build ID: 9c5dbbe4b0a62ff1af009beb00f1fc45318dad79
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: kde5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded
Comment 13 Roman Kuznetsov 2019-03-02 06:42:49 UTC
still repro in

Version: 6.3.0.0.alpha0+
Build ID: c2b20809b5d446d8f9d1d35723d67d24f64144dd
CPU threads: 4; OS: Linux 4.18; UI render: default; VCL: kde5; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-03-01_16:32:53
Locale: ru-RU (ru_RU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 14 Michael Weghorn 2019-03-04 17:13:56 UTC
Created attachment 149719 [details]
Simplified HTML page with table
Comment 15 Michael Weghorn 2019-03-04 17:19:52 UTC
While looking at this again, it seems I can actually reproduce now if I actually follow step 6 literally, i.e. using right-click and "Paste". So far, I used Ctrl+V, which DOES work.

@Roman: Is this simplified test scenario the same as the problem that you're experiencing:

1. open attachment 149719 [details] in Firefox
2. press Ctrl+A to select the whole table
3. press Ctrl+C top copy
4. Open Calc
5. Select A1
6. Right click on cell and select Paste
7. It happens nothing

And can you confirm it works as expected when using Ctrl+V instead in step 6?
Comment 16 Roman Kuznetsov 2019-03-04 17:44:15 UTC
(In reply to Michael Weghorn from comment #15)
> And can you confirm it works as expected when using Ctrl+V instead in step 6?

Your example file is good.

Yes, if I use Ctrl+V then a table inserts into Calc

If I use right click -> Paste then happens nothing. But I see action "Insert" in the Undo list also!
Comment 17 Michael Weghorn 2019-03-04 17:56:18 UTC
Thanks for the quick reply!

Confirmed now with

Version: 6.3.0.0.alpha0+
Build ID: 8643f6d64d387ebdb75b79db941d8ea1f8fa2f66
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: kde5; 
Locale: en-GB (en_GB.UTF-8); UI-Language: en-US
Calc: threaded
Comment 18 Michael Weghorn 2019-03-07 10:36:14 UTC
While taking a quick look, I think I encountered a Qt bug, though I'm not completely sure yet. I plan to investigate further (and document here) as I find time, but it's more of a spare time thing, so if anybody else wants to look into this, feel free to take over...
Comment 19 Michael Weghorn 2019-03-11 16:34:30 UTC
As far as I understand it, this is a Qt bug and I created https://bugreports.qt.io/browse/QTBUG-74330 for this; s. there for more details.

Timing seems to be involved, e.g. I experienced that Ctrl+V was also no longer working when setting breakpoints at specific places.
Also, the scenario as described here worked fine for me when using Wayland instead of X11, but the underlying issue seems to be there as well, s. above Qt bug report.

Therefore it seems to me it might make sense to close this LibreOffice bug report as RESOLVED NOTOURBUG.

Any other ideas/objections?
Comment 20 Michael Weghorn 2019-03-11 16:55:24 UTC
(In reply to Michael Weghorn from comment #19)
> Also, the scenario as described here worked fine for me when using Wayland
> instead of X11, but the underlying issue seems to be there as well, s. above
> Qt bug report.

As I just realized, this statement about Wayland might be incorrect and it may be that Wayland is not affected. I hadn't built the qtwayland module when debugging into the qtbase module a bit, where the X11 clipboard handling is implemented.
Comment 21 Xisco Faulí 2019-03-20 18:30:31 UTC
this shouldn't be in NEEDINFO status
Comment 22 Michael Weghorn 2019-03-20 21:57:08 UTC
As mentioned in comment 19, I think that this is a Qt bug, not a LibreOffice one, s. the referenced bug report for more details.

Closing this bug as RESOLVED NOTOURBUG.

If anybody disagrees or has any good ideas what can still reasonably be done on LibreOffice side, please leave a comment here (and potentially reopen the bug).
Comment 23 Michael Weghorn 2019-06-16 06:47:26 UTC
Info: While I still think the underlying issue was a Qt bug, that none is no longer triggered after the clipboard refactoring, so I can no longer reproduce with current master that has the fix for bug 122239.