diff options
author | Tor Lillqvist <tml@iki.fi> | 2022-01-04 16:33:16 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2022-01-06 13:52:00 +0100 |
commit | 6bcf00763402fc0969486e852634b5559fa044ba (patch) | |
tree | d407b5ac57a25944abb9fca05eddf59fec3e1dd6 /vcl/source/components | |
parent | 69880354d192c34fec1e77f94e55bc5e8e16dcee (diff) |
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 <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
Diffstat (limited to 'vcl/source/components')
-rw-r--r-- | vcl/source/components/dtranscomp.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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<cppu::OWeakObject *>(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<cppu::OWeakObject *>(new vcl::GenericClipboard()) ); } +#endif DBG_TESTSOLARMUTEX(); if (!m_clipboard.is()) { m_clipboard = static_cast<cppu::OWeakObject *>(new vcl::GenericClipboard()); |