A lok_doc_view_copy_selection() function was added, but there is no way to know when the selection is non-null (eg. when there's something to copy).
Pranav Kant committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=ea5c99428f56e1d3a3e782505aa2f56f905038a4 tdf#96384: Add a new signal 'text-selection' to lokdocview It will be available in 5.2.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.
Pranav Kant committed a patch related to this issue. It has been pushed to "libreoffice-5-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3f13961c45ea9a6f90c0bc268a2274634d9b8033&h=libreoffice-5-1 tdf#96384: Add a new signal 'text-selection' to lokdocview It will be available in 5.1.0.1. 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.