Bug 96316 - LOKView disabling edit doesn't work as expected
Summary: LOKView disabling edit doesn't work as expected
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.1.0.0.beta1
Hardware: All All
: medium normal
Assignee: Pranav Kant
URL:
Whiteboard: target:5.2.0 target:5.1.0.1
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-07 17:17 UTC by Bastien Nocera
Modified: 2016-10-25 19:12 UTC (History)
3 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 Bastien Nocera 2015-12-07 17:17:14 UTC
libreoffice-5.1.0.0-9.beta2.fc24

I would expect that:
lok_doc_view_set_edit(view, FALSE);

Would:
- hide the non-printable characters from the view
- not allow the view to go into edit mode by itself when clicked

Instead, whether to go into edit mode should be handled by the program embedding the view. You can still start with editing enabled by default, but disabling it should make it stay disabled.
Comment 1 Commit Notification 2015-12-09 09:28:50 UTC
Pranav Kant committed a patch related to this issue.
It has been pushed to "master":

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

tdf#96316: Decouple view-only/editable modes

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.
Comment 2 Bastien Nocera 2015-12-09 10:04:06 UTC
> - Ignore LOK_POST_COMMAND, LOK_SET_GRAPHIC_SELECTION in view-only

Does this mean that it's not possible to select text in the view mode? It would have been useful to be able to copy text from the non-editable view.
Comment 3 Pranav Kant 2015-12-09 10:11:55 UTC
(In reply to Bastien Nocera from comment #2)
> > - Ignore LOK_POST_COMMAND, LOK_SET_GRAPHIC_SELECTION in view-only
> 
> Does this mean that it's not possible to select text in the view mode? It
> would have been useful to be able to copy text from the non-editable view.

No you can still select text in view-only mode.

However, this commit would not allow executing search in view-only mode because this is also a UNO command. But we have a separate fix to make that work in view-only mode : Bug 96318
Comment 4 Commit Notification 2015-12-09 12:19:49 UTC
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=0a28049853ce84aa8ef4f871065970c1220ae855&h=libreoffice-5-1

tdf#96316: Decouple view-only/editable modes

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.