Bug 500903 - In LibreOffice Writer, DdeLink bookmarks are created in the document when copying text to the clipboard
Summary: In LibreOffice Writer, DdeLink bookmarks are created in the document when cop...
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Clipboard widget & pop-up (show other bugs)
Version: 6.3.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-03-01 13:48 UTC by tuefue
Modified: 2025-03-07 21:43 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.3.3
Sentry Crash Report:


Attachments
Document with __DdeLink__74_2326481461 bookmark (5.00 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-03-01 13:48 UTC, tuefue
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tuefue 2025-03-01 13:48:50 UTC
Created attachment 179001 [details]
Document with __DdeLink__74_2326481461 bookmark

SUMMARY
In LibreOffice Writer, bookmarks like __DdeLink__XXXX_XXXXXXXXXX appear when copying text to the clipboard. The document is marked as modified (i.e. simply copying to the clipboard changes the documents).

This started happening after updating KDE from 6.2.5 to 6.3.0 in openSUSE Tumbleweed. I suspect this is a KDE bug.

Reproducible on a completely clean installation of the openSUSE Tumbleweed in VirtualBox. Also reproduces on a clean install of Fedora 41 with KDE 6.3 (but not with KDE 6.2.5) and Neon with KDE 6.2.90. The same under X11 and Wayland.

STEPS TO REPRODUCE
1. Start LibreOffice Writer
2. Type any text
3. Select a part of text
4. Press Ctrl+C or click copy to clipboard in context menu

OBSERVED RESULT
__DdeLink__XXXX_XXXXXXXXXX bookmark appears, the document is marked as modified.

EXPECTED RESULT
No document modification. Just copy to clipboard, as it was before KDE 6.3.0 (6.2.90).

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20250227
KDE Plasma Version: 6.3.2
KDE Frameworks Version: 6.11.0
Qt Version: 6.8.2
Kernel Version: 6.13.4-1-default (64-bit)

Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: 480(Build:2)
CPU threads: 12; OS: Linux 6.13; UI render: default; VCL: kf6 (cairo+xcb)
Locale: ru-RU (ru_RU.UTF-8); UI: ru-RU
Calc: threaded
Comment 1 tux 2025-03-03 01:12:40 UTC
I've been affected with this too on KDE 6.3.2 
A fresh/new LibreOffice profile doesn't help.

A way to make it less annoying is to disable "Field Shadings" in the "View" menu, so you at least don't see the marks.
And before saving or sharing a file, you can go to "Insert" -> "Bookmark..." and delete everything.
Comment 2 Nate Graham 2025-03-05 18:41:51 UTC
Oh, so that's what's going on here. I've been seeing the same thing in LibreOffice Writer myself for months, but never managed to figure out what was going on.

My first impression is that this is an app bug, but if you say it started happening upon upgrading to 6.3 (which also matches my timeline, since I run git master and effectively got the early version of Plasma 6.3 months ago) then maybe something we changed has triggered this.
Comment 3 Fushan Wen 2025-03-06 12:06:28 UTC
Can reproduce on X11, investigating...
Comment 4 Bug Janitor Service 2025-03-06 16:14:09 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5296
Comment 6 tux 2025-03-06 17:19:52 UTC
(In reply to Fushan Wen from comment #5)
> I am not sure if this is a bug:
> https://ask.libreoffice.org/t/libreoffice-writer-automatic-bookmark-creation-
> while-keyboard-maestro-engine-is-running/97599/2

That's on MacOS when running the MacOS program "Keyboard Maestro", so not relevant here on Linux.
Comment 7 Fushan Wen 2025-03-07 00:56:00 UTC
(In reply to tux from comment #6)
> That's on MacOS when running the MacOS program "Keyboard Maestro", so not
> relevant here on Linux.

It's actually the same "bug" (expected behavior) because both have the clipboard manager feature.
Comment 8 Nate Graham 2025-03-07 19:09:26 UTC
From discussion in the merge request, it's now clear what's going on.

LibreOffice follows an ancient spec for cross-document linking, and as a result, when copying text, a special MIME type is added. When using a clipboard manager like Klipper, this MIME type triggers a link to be created back to the copied text in the document. This was always happening, but went mostly un-noticed because the links were invisible outside of LibreOffice's Navigator view. A recent change in LibreOffice made them visible by default, exposing the problem.

The correct solution here is to ignore the special MIME type in Klipper, which signals to the app that we don't care about creating those links, so they don't get created.
Comment 9 Nate Graham 2025-03-07 19:59:48 UTC
Git commit 7037a696a043f0aa7dba1fd51d4879cf43b5961d by Nate Graham, on behalf of Fushan Wen.
Committed on 07/03/2025 at 19:59.
Pushed by ngraham into branch 'master'.

klipper: ignore `application/x-openoffice-link`

When accessing data of this MIME type, LibreOffice will create a DdeLink
bookmark that the user did not ask for. The correct way to disable this
behavior is for the clipboard manager ignore the MIME type data for it.
FIXED-IN: 6.3.3

M  +4    -0    klipper/updateclipboardjob.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/7037a696a043f0aa7dba1fd51d4879cf43b5961d
Comment 10 Nate Graham 2025-03-07 21:43:23 UTC
Git commit 36db49b639ef4ea131684b7880313b3c2d57c1bc by Nate Graham.
Committed on 07/03/2025 at 20:00.
Pushed by ngraham into branch 'Plasma/6.3'.

klipper: ignore `application/x-openoffice-link`

When accessing data of this MIME type, LibreOffice will create a DdeLink
bookmark that the user did not ask for. The correct way to disable this
behavior is for the clipboard manager ignore the MIME type data for it.
FIXED-IN: 6.3.3


(cherry picked from commit 7037a696a043f0aa7dba1fd51d4879cf43b5961d)

6089ac10 klipper: ignore `application/x-openoffice-link`
3b26c4b0 Add comment

Co-authored-by: Fushan Wen <qydwhotmail@gmail.com>

M  +4    -0    klipper/updateclipboardjob.cpp

https://invent.kde.org/plasma/plasma-workspace/-/commit/36db49b639ef4ea131684b7880313b3c2d57c1bc