Bug 161186 - Unable to use the paste special dialog under KDE Wayland
Summary: Unable to use the paste special dialog under KDE Wayland
Status: VERIFIED DUPLICATE of bug 156562
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.2.2.2 release
Hardware: All Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-20 12:59 UTC by Bojidar Marinov [:bojidar-bg]
Modified: 2024-05-21 10:23 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bojidar Marinov [:bojidar-bg] 2024-05-20 12:59:24 UTC
Description:
When I try pasting from a web-browser (or anywhere else for that matter) using Shift-Ctrl-V into Writer (or Impress), I get the Paste Special dialog. However, no matter which option I select, I end up with the same "Requested clipboard format is not available." info-box. 
Normal Ctrl-V pastes work perfectly.
Pasting in Calc does not result in that error.

Steps to Reproduce:
1. Open LibreOffice Writer
2. Copy some text in any other application (in my example, Firefox, but I can reproduce with Kate and with apps running under XWayland)
3. Trigger the Paste Special dialog, either through Shift-Ctrl-V or through the menu.
4. Select one of the options that show up (shouldn't matter which one)

Actual Results:
5. A window saying "Requested clipboard format is not available." pops up (though it just showed that format being available). 

Expected Results:
5. The text or image is pasted using the format specified.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.2.2 (X86_64) / LibreOffice Community
Build ID: 420(Build:2)
CPU threads: 8; OS: Linux 6.8; UI render: default; VCL: kf6 (cairo+wayland)
Locale: en-US (en_US.UTF-8); UI: en-US
24.2.2-2
Calc: threaded

Running on Arch Linux (the libreoffice-fresh package) under KDE / Wayland, with no language packs installed. Willing to help with extra debugging, including compiling from source if necessary.

Might be a bug in KDE's Wayland implementation. However, wl-paste seems to be able to paste correctly given the right MIME type, and e.g. `wl-paste --type text/html` produces the clipboard contents just fine.

WORKAROUND:

If I set SAL_USE_VCLPLUGIN=gtk3, I get the "Unformatted Text" option working again. However, any other paste options still result in the same error.

I can also get unformatted text to work by either using the Shift-Ctrl-Alt-V / Paste Unformatted option, or by pasting into and recopying from a text editor.
Comment 1 Stéphane Guillou (stragu) 2024-05-20 13:08:35 UTC
Thank you for the report.
This should be resolved in the upcoming version 24.2.4, please see bug 156562.
You can also test a daily build (it installs in parallel) and let us know if it is indeed resolved: https://dev-builds.libreoffice.org/daily/master/current.html

*** This bug has been marked as a duplicate of bug 156562 ***
Comment 2 Bojidar Marinov [:bojidar-bg] 2024-05-20 21:43:46 UTC
Oh, oops! I actually found that one earlier, but I assumed (wrongly, it would seem) that it was for a different issue.

Anyway, sorry for the accidental spam, and keep up the good work! Next release sounds exciting already!
Comment 3 Stéphane Guillou (stragu) 2024-05-21 06:16:02 UTC
(In reply to Bojidar Marinov [:bojidar-bg] from comment #2)
> Oh, oops! I actually found that one earlier, but I assumed (wrongly, it
> would seem) that it was for a different issue.
> 
> Anyway, sorry for the accidental spam, and keep up the good work! Next
> release sounds exciting already!
No problem at all, and thank you for your help! :)
If you can, do test a daily build to confirm that it is indeed the same issue.
Thanks!
Comment 4 Bojidar Marinov [:bojidar-bg] 2024-05-21 09:09:29 UTC
Tested it and it works! Thanks!
Comment 5 Stéphane Guillou (stragu) 2024-05-21 10:23:05 UTC
(In reply to Bojidar Marinov [:bojidar-bg] from comment #4)
> Tested it and it works! Thanks!
Thanks for checking! :)