summaryrefslogtreecommitdiffstats
path: root/include/sal
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2021-01-14 16:03:33 +0200
committerTor Lillqvist <tml@collabora.com>2021-01-15 08:48:54 +0100
commit84a6cfd9bb6532602ca811b0d5daf016bb9b4578 (patch)
tree432be631fd47b374912e92b3312abfa01c523611 /include/sal
parentOUString::matchAsciiL() can be used instead of the fresh startsWithAsciiL() (diff)
downloadcore-84a6cfd9bb6532602ca811b0d5daf016bb9b4578.tar.gz
core-84a6cfd9bb6532602ca811b0d5daf016bb9b4578.zip
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>
Diffstat (limited to 'include/sal')
-rw-r--r--include/sal/log-areas.dox1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index e6463117d1b8..4bdd3fb19a23 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -484,6 +484,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