Description: Selecting and copying text in LO Writer BEFORE trying to copy text into LO Writer from somewhere else, results in the original LO selected text being copied into the clipboard, deletion of the selected text from LO Writer, and an error saying the clipboard format is not available. This is reproducible in Safe Mode. Steps to Reproduce: Using KDE Plasma (5.27.9) with Wayland i.e. KWin on Debian (Trixie) 1. Open LO Writer (7.6.4~rc1-1+b2) 2. Open (for example) Firefox (115.6.0esr-1) 3. Select and copy text in LO, leaving the text selected 4. Alt+Tab away into Firefox 5. Copy some text in Firefox 6. Alt+Tab back into LO, where the original text is still selected 7a. Try to paste, OR 7b. Click in LO Writer to deselect text, select some text again, then try to paste Actual Results: The selected text gets deleted (perhaps due to pasting nothing over the selected text, rather than pasting the text in clipboard?) and the original text that was selected in LO is copied into clipboard. An error message shows saying the clipboard format is not available. Expected Results: The text in the clipboard should be pasted over (replace) the selected text in LO Writer. Reproducible: Always User Profile Reset: No Additional Info: This is reproducible in Safe Mode. The problem occurs when pasting from places other than Firefox (Konsole, Mousepad, Kate etc). In these cases the behaviour is the same. I don't have this problem in LO Calc. Deselecting the text in LO Writer before pasting works fine and pastes the clipboard. Copying between LO Writer and Calc always works fine. Using Ctrl+Shift+V and selecting paste unformatted, doesn't work REGARDLESS of whether text is selected and copied in LO Writer. This seems similar / same behaviour as here https://bugs.documentfoundation.org/show_bug.cgi?id=156562 and here https://bugs.documentfoundation.org/show_bug.cgi?id=157373 Discussion of related problem in KDE bug tracker: https://bugs.kde.org/show_bug.cgi?id=470334 These problems existed in LO version 7.5.2.2 installed from the website download, I have updated to LO 7.6.4.1 from the repo and the problem persists. Help → About LibreOffice: Version: 7.6.4.1 (X86_64) / LibreOffice Community Build ID: 60(Build:1) CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: kf5 (cairo+wayland) Locale: cy-GB (en_GB.UTF-8); UI: en-US Debian package version: 4:7.6.4~rc1-1+b2 Calc: threaded
Reproduced in: Version: 7.6.4.1 (X86_64) / LibreOffice Community Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: kf5 (cairo+wayland) Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded Not reproduced with kf5 (cairo+xcb). nor gtk3.
Thanks a lot for the excellent bug description that allows to reproduce this reliably. Pending Gerrit change: https://gerrit.libreoffice.org/c/core/+/163202
No worries, and thanks for fixing! This has been frustrating me for a while now.
Michael Weghorn committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/cb9513c74502144a480494e0c6a32ac6173ae0a3 tdf#158947 sw: Don't unrelatedly overwrite system clipboard on paste It will be available in 24.8.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Michael Weghorn committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/0750cacbb165b733ab76bb54a6c0116e8266a01f tdf#158947 sw: Don't unrelatedly overwrite system clipboard on paste It will be available in 24.2.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
I can confirm this bug has been fixed! I just tried the dev version of LibreOffice. Thanks again.
(In reply to fin-w from comment #6) > I can confirm this bug has been fixed! I just tried the dev version of > LibreOffice. Thanks again. Thanks for testing!
Michael Weghorn committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/7f8f7f36ebc2c43f209b49ff093c4eb65948bd86 tdf#158947 sw: Don't unrelatedly overwrite system clipboard on paste It will be available in 7.6.6. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.