diff options
author | Tor Lillqvist <tml@collabora.com> | 2021-01-14 16:03:33 +0200 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2021-01-20 14:05:49 +0100 |
commit | 716af8206af673fee53d4315aa6ca6494e8d610c (patch) | |
tree | 943bdb2652adf79386c83d8f9bc1f70af25196f7 /include | |
parent | 1a7d3dff5ee7383a71fe1c9e73d85514ea60d7d7 (diff) |
Fix handling of the OBJECTDESCRIPTOR clipboard (pasteboard) type on macOS
This fixes a demonstrable problem, and affects only macOS.
This is also on the path towards fixing
https://github.com/CollaboraOnline/online/issues/849 , even if the
code touched here is for macOS only. The iOS pasteboard handling code
is based on the macOS one.
We need the pasteboard to have the OBJECTDESCRIPTOR type as a MIME
type that includes the typename attribute, because the code in sc
checks for that when it decides whether it is a proper
OBJECTDESCRIPTOR.
Simplify the data in the flavorMap array. No need to duplicate the
same MIME type string as both the pasteboard type and MIME type, for
those cases where the MIME type is used diretly as pasteboard type. We
also know that for those types, the MIME type might have additional
parameters, so be more lenient in checking.
With this change, and my recent change to sot, this now works:
Start LibreOffice. Open a spreadsheet. Select a cell range. (It can
include formulas.) Edit > Copy. Quit LibreOffice.
Start LibreOffice again. Open a spreadsheet. Edit > Paste. You get the
very same cells that you pasted as such (with relative cell addresses
in formulas properly adjusted, as expected).
Previously, it would paste an image of the copied cell range, which is
fairly pointless.
There is still lots of opportunity for cleanup in the clipboard code
for macOS and iOS. It is presumably rather pointless to put images on
the pasteboard in Windows bitmap format, for instance. Just PNG should
be enough. No idea why the code provides the TIFF pasteboard type for
images. Ditto for Windows metafiles (WMF and EMF). It is also unclear
how useful the EMBED_SOURCE or LINK_SOURCE types are on macOS, for
instance.
Change-Id: I573648480b03972b506203b4f470d513bcb81212
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109297
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109357
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/sal/log-areas.dox | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox index 0e514d2896cf..94733ff414ad 100644 --- a/include/sal/log-areas.dox +++ b/include/sal/log-areas.dox @@ -487,6 +487,7 @@ certain functionality. @li @c vcl.opengl @li @c vcl.opengl.qt5 - QT5 OpenGL @li @c vcl.osx +@li @c vcl.osx.clipboard @li @c vcl.osx.print @li @c vcl.pdfwriter @li @c vcl.plugadapt - the Unix/X11 backend plugin mechanism |