summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2022-01-04 16:33:16 +0200
committerAron Budea <aron.budea@collabora.com>2022-01-05 22:54:22 +0100
commitcde6577dcb9c94aca7605790d34c83a5ff62edad (patch)
tree7df1cf6ed8335fd5d4e9e9d3b1155fde3190bed8 /vcl
parent5f25ea47a7c98956189d4239d617094f0a34ccca (diff)
We don't want or need any LOKClipboard on iOS
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/+/127968 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Aron Budea <aron.budea@collabora.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/components/dtranscomp.cxx4
-rw-r--r--vcl/source/treelist/transfer2.cxx5
2 files changed, 9 insertions, 0 deletions
diff --git a/vcl/source/components/dtranscomp.cxx b/vcl/source/components/dtranscomp.cxx
index ee3e0d027105..c451e9568b57 100644
--- a/vcl/source/components/dtranscomp.cxx
+++ b/vcl/source/components/dtranscomp.cxx
@@ -423,6 +423,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 (whereas
// in non-LOK below we keep handing out one single instance; see also
@@ -433,6 +436,7 @@ Reference< XInterface > SalInstance::CreateClipboard( const Sequence< Any >& arg
comphelper::getProcessComponentContext());
return xClipboard;
}
+#endif
DBG_TESTSOLARMUTEX();
if (!m_clipboard.is()) {
m_clipboard = static_cast<cppu::OWeakObject *>(new vcl::GenericClipboard());
diff --git a/vcl/source/treelist/transfer2.cxx b/vcl/source/treelist/transfer2.cxx
index c06abcde72c3..ef392a08e6c5 100644
--- a/vcl/source/treelist/transfer2.cxx
+++ b/vcl/source/treelist/transfer2.cxx
@@ -486,11 +486,16 @@ Reference<XClipboard> GetSystemClipboard()
Reference<XClipboard> xClipboard;
try
{
+#ifdef IOS
+ if (false)
+ ;
+#else
if (comphelper::LibreOfficeKit::isActive())
{
xClipboard = css::datatransfer::clipboard::LokClipboard::create(
comphelper::getProcessComponentContext());
}
+#endif
else
{
xClipboard = css::datatransfer::clipboard::SystemClipboard::create(