diff options
author | Mert Tümer <merttumer7@gmail.com> | 2018-03-14 19:19:56 +0300 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-03-15 00:28:31 +0100 |
commit | e5bc7fa4e83b33fc3eee343e560a4f8cb91eacd6 (patch) | |
tree | b58bf53390777dfd79ab36c62cd2d437625ad114 /desktop | |
parent | b951cd126d0bcc950c71c069c7d2f4c210c4bcaf (diff) |
tdf#96796 - Added clipboard actions for the Android Viewer
Change-Id: I52e134532ab70e765b6ccd929f189be84f9c9a90
Signed-off-by: Mert Tümer <merttumer7@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/51286
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/lib/lokandroid.cxx | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/desktop/source/lib/lokandroid.cxx b/desktop/source/lib/lokandroid.cxx index b85619d3dad8..974366d845fc 100644 --- a/desktop/source/lib/lokandroid.cxx +++ b/desktop/source/lib/lokandroid.cxx @@ -370,6 +370,23 @@ extern "C" SAL_JNI_EXPORT jstring JNICALL Java_org_libreoffice_kit_Document_getT return pEnv->NewStringUTF(pSelection); } +extern "C" SAL_JNI_EXPORT jboolean JNICALL Java_org_libreoffice_kit_Document_paste + (JNIEnv* pEnv, jobject aObject, jstring mimeType, jstring data) +{ + LibreOfficeKitDocument* pDocument = getHandle<LibreOfficeKitDocument>(pEnv, aObject); + + const char* pMimeType = pEnv->GetStringUTFChars(mimeType, NULL); + const char* pData = pEnv->GetStringUTFChars(data, NULL); + const size_t nSize = pEnv->GetStringLength(data); + + LibreOfficeKitDocumentClass* pcls = pDocument->pClass; + bool result = pcls->paste(pDocument, pMimeType, pData, nSize); + pEnv->ReleaseStringUTFChars(mimeType, pMimeType); + pEnv->ReleaseStringUTFChars(data, pData); + + return result; +} + extern "C" SAL_JNI_EXPORT void JNICALL Java_org_libreoffice_kit_Document_setGraphicSelection (JNIEnv* pEnv, jobject aObject, jint type, jint x, jint y) { |