https://bugs.kde.org/show_bug.cgi?id=505209
[email protected] changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #14 from [email protected] --- I created an MR solving the titular bug. For the secondary bug, where selecting an older entry coming from Libreoffice results in pasting an image, I am a bit stuck. Klipper now only basically allows storing images and text in history, because of this MR: https://invent.kde.org/plasma/plasma-workspace/-/merge_requests/5315 Libreoffice sends a bunch (like 20) different formats - lots of internal ones, a PNG image and some text. The internal ones are dropped when saving to history so we get the image. When we select the entry in history, it offers the image to libre office in addition to plain text. LO than prefers the image. BTW pasting into a browser (Vivaldi on my end, based on Chromium) also pastes an image. constexpr std::array<QStringView, 3> s_acceptableTextFormatPrefixes{ u"text/", u"application/json", u"application/xml", }; I tried adding u"application/x-openoffice-", u"application/x-libreoffice-", to these to see if it would be a quick and dirty trick to fix this, but that did not result in the LO-native types being added. Not sure yet where it gets blocked in the code. Anyway, a proper architecture would probably be to always store the first offered format (as per https://doc.qt.io/qt-6/qmimedata.html#formats it is the priority one) and then text. It is unclear to me whether image data should be stored in such a case too - in case of Libreoffice, probably not, but in case of let's say GIMP, we would want to store a png or something in addition to xcf, which nothing else understands. Because this bug needs to be kept in mind: https://bugs.kde.org/show_bug.cgi?id=504469 A possible solution might be to not store images when there is text, but I kind of think that might break a bunch of graphical apps that maybe also send text alongside image data? -- You are receiving this mail because: You are watching all bug changes.
