desktop/Library_sofficeapp.mk | 3 ++- desktop/source/lib/init.cxx | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-)
New commits: commit 8ce79f1a9188ae389dc8be1f53de0000b3ca0951 Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Nov 20 18:14:07 2019 +0200 Commit: Tor Lillqvist <[email protected]> CommitDate: Tue Nov 26 12:45:55 2019 +0200 We use the system clipboard on iOS and not the "LOK clipboard" The use of the system clipboard was implemented for iOS in vcl already in cp-6.0. This "LOK clipboard" thing is for different situations in web-based Online and not applicable for the iOS app. Change-Id: I679b5c27d308a563eadaf1e543ce8c45d763f3c6 Reviewed-on: https://gerrit.libreoffice.org/83339 Reviewed-by: Tor Lillqvist <[email protected]> Tested-by: Tor Lillqvist <[email protected]> diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk index e7c56f4ee0b7..9dd91971a825 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -155,7 +155,8 @@ ifneq ($(filter $(OS),ANDROID iOS MACOSX WNT),) $(eval $(call gb_Library_add_exception_objects,sofficeapp,\ desktop/source/lib/init \ desktop/source/lib/lokinteractionhandler \ - desktop/source/lib/lokclipboard \ + $(if $(filter-out $(OS),IOS), \ + desktop/source/lib/lokclipboard) \ $(if $(filter $(OS),ANDROID), \ desktop/source/lib/lokandroid) \ )) diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index a5100da75627..db7ca361ba88 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -936,6 +936,8 @@ ITiledRenderable* getTiledRenderable(LibreOfficeKitDocument* pThis) return dynamic_cast<ITiledRenderable*>(pDocument->mxComponent.get()); } +#ifndef IOS + /* * Unfortunately clipboard creation using UNO is insanely baroque. * we also need to ensure that this works for the first view which @@ -952,6 +954,9 @@ rtl::Reference<LOKClipboard> forceSetClipboardForCurrentView(LibreOfficeKitDocum return xClip; } + +#endif + } // anonymous namespace LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent) @@ -1037,7 +1042,9 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone } pClass = m_pDocumentClass.get(); +#ifndef IOS forceSetClipboardForCurrentView(this); +#endif } LibLODocument_Impl::~LibLODocument_Impl() @@ -1620,10 +1627,12 @@ bool CallbackFlushHandler::processWindowEvent(CallbackData& aCallbackData) return false; } +#ifndef IOS auto xClip = forceSetClipboardForCurrentView(m_pDocument); uno::Reference<datatransfer::clipboard::XClipboard> xClipboard(xClip.get()); pWindow->SetClipboard(xClipboard); +#endif } else if (aAction == "size_changed") { @@ -3929,6 +3938,13 @@ static int doc_setClipboard(LibreOfficeKitDocument* pThis, const size_t *pInSizes, const char **pInStreams) { +#ifdef IOS + (void) pThis; + (void) nInCount; + (void) pInMimeTypes; + (void) pInSizes; + (void) pInStreams; +#else comphelper::ProfileZone aZone("doc_setClipboard"); SolarMutexGuard aGuard; @@ -3953,7 +3969,7 @@ static int doc_setClipboard(LibreOfficeKitDocument* pThis, SetLastExceptionMsg("Document doesn't support this mime type"); return false; } - +#endif return true; } @@ -4629,7 +4645,11 @@ static int doc_createViewWithOptions(LibreOfficeKitDocument* pThis, int nId = SfxLokHelper::createView(); +#ifdef IOS + (void) pThis; +#else forceSetClipboardForCurrentView(pThis); +#endif return nId; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
