desktop/Library_sofficeapp.mk | 3 ++- desktop/source/lib/init.cxx | 22 +++++++++++++++++++++- 2 files changed, 23 insertions(+), 2 deletions(-)
New commits: commit 2136646872a6954098af6c82b93f440cb8eb7b67 Author: Tor Lillqvist <[email protected]> AuthorDate: Wed Nov 20 18:14:07 2019 +0200 Commit: Tor Lillqvist <[email protected]> CommitDate: Wed Nov 20 17:38:23 2019 +0100 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 5c7de54c4ed0..5f6686b5ab64 100644 --- a/desktop/Library_sofficeapp.mk +++ b/desktop/Library_sofficeapp.mk @@ -158,7 +158,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 2211c1124891..d48bcf2490a0 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -932,6 +932,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 @@ -948,6 +950,9 @@ rtl::Reference<LOKClipboard> forceSetClipboardForCurrentView(LibreOfficeKitDocum return xClip; } + +#endif + } // anonymous namespace LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XComponent> &xComponent) @@ -1033,7 +1038,9 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone } pClass = m_pDocumentClass.get(); +#ifndef IOS forceSetClipboardForCurrentView(this); +#endif } LibLODocument_Impl::~LibLODocument_Impl() @@ -1616,10 +1623,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") { @@ -3912,6 +3921,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_paste"); SolarMutexGuard aGuard; @@ -3936,7 +3952,7 @@ static int doc_setClipboard(LibreOfficeKitDocument* pThis, SetLastExceptionMsg("Document doesn't support this mime type"); return false; } - +#endif return true; } @@ -4603,7 +4619,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
