Bug 92346 - Copy functionality in the viewer
Summary: Copy functionality in the viewer
Status: RESOLVED DUPLICATE of bug 96796
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Android Viewer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: target:5.3.0
Keywords: difficultyInteresting, easyHack, skillJava, topicUI
Depends on:
Blocks:
 
Reported: 2015-06-26 08:55 UTC by Miklos Vajna
Modified: 2018-04-05 11:55 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Miklos Vajna 2015-06-26 08:55:32 UTC
It would be nice to be able to copy text from the viewed document, just like on the desktop. It's not too hard to implement this today, either.

The Android app uses the LibreOfficeKit API to talk to core. gtktiledviewer is a test program to show all the LOK API features implemented in core, and it already can do searching.

The gtk app already supports exposting formatted text as HTML, with falling back to plain text if necessary. If it helps, the API also exposes RTF.

Code pointers:

- desktop/source/lib/lokandroid.cxx, Java_org_libreoffice_kit_Document_getTextSelection() currently that JNI wrapper is missing, has to be implemented.

- libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx, doCopy() shows how to get the selection in HTML or plain text from core

- android/source/ is the source code for the Java part of the Android app

See https://wiki.documentfoundation.org/Development/Android in general on how to get an Android build.
Comment 1 Miklos Vajna 2015-06-26 08:57:05 UTC
> and it already can do searching.

searching -> copying
Comment 2 tommy27 2015-06-27 05:29:09 UTC
valid enhancement request. status NEW
Comment 3 Robinson Tryon (qubit) 2015-12-13 10:17:13 UTC Comment hidden (obsolete)
Comment 4 Robinson Tryon (qubit) 2016-02-18 14:51:33 UTC Comment hidden (obsolete)
Comment 5 Commit Notification 2016-11-16 06:17:34 UTC
Chamal committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=121a202076f0ada98e5e3697e4e15a48b477523e

tdf#92346 - Copy functionality in the viewer

It will be available in 5.3.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 6 Tor Lillqvist 2016-11-16 09:28:19 UTC
Note that the change above does not really do anything, and the commit message doesn't say anything useful about what the poin is.
Comment 7 Miklos Vajna 2016-11-16 09:33:25 UTC
I think the above commit is pointless, it misses the point. The task is to use getTextSelection() in android/ code.
Comment 8 Amadou 2017-02-14 12:11:25 UTC
Hello 
I'm working on this feature. 
Thanks!
Comment 9 Gautam Prajapati 2017-03-27 20:16:35 UTC
Since there is no update on this, I would like to take this up.
Comment 10 Gautam Prajapati 2017-08-24 13:05:32 UTC
I have submitted a WIP patch for this bug, progress can be tracked there: https://gerrit.libreoffice.org/#/c/35853/
Comment 11 Mert Tumer 2018-04-05 11:55:11 UTC

*** This bug has been marked as a duplicate of bug 96796 ***