From 6bcf00763402fc0969486e852634b5559fa044ba Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Tue, 4 Jan 2022 16:33:16 +0200 Subject: We don't want or need any LOKClipboard on iOS Try to make the code more like in the co-2021 branch, where copy/paste between Collabora Office and other iOS apps currently works again, in both directions, both for text and images. Sadly something is broken or missing either here in core or in online as it doesn't fully work in a Collabora Office based on the master branch of core, even after this commit, though. We use only the system clipboard on iOS. (It is actually called the "pasteboard" in Apple's operating systems.) The code to interface with the system clipboard is in vcl. It has worked fine to copy and paste between the Collabora Office iOS app and other iOS apps without any LOKClipboard being involved. If LOKClipboard is used it doesn't work at all. Change-Id: I0d3b4e3eabe17b633390e071701225e1d356a75a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128037 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist --- vcl/source/components/dtranscomp.cxx | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'vcl') diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx index 645e50625ba3..acd03cc01912 100644 --- a/vcl/source/components/dtranscomp.cxx +++ b/vcl/source/components/dtranscomp.cxx @@ -416,6 +416,9 @@ Reference< XInterface > SalInstance::CreateClipboard( const Sequence< Any >& arg throw css::lang::IllegalArgumentException( "non-empty SalInstance::CreateClipboard arguments", {}, -1); } +#ifdef IOS + return Reference< XInterface >( static_cast(new vcl::GenericClipboard()) ); +#else if (comphelper::LibreOfficeKit::isActive()) { // In LOK, each document view shall have its own clipboard instance, and the way that // (happens to?) work is that apparently this function is called at most once for each such @@ -425,6 +428,7 @@ Reference< XInterface > SalInstance::CreateClipboard( const Sequence< Any >& arg // SAL_USE_VCLPLUGIN=svp and the clipboard"): return Reference< XInterface >( static_cast(new vcl::GenericClipboard()) ); } +#endif DBG_TESTSOLARMUTEX(); if (!m_clipboard.is()) { m_clipboard = static_cast(new vcl::GenericClipboard()); -- cgit