Bug 122217 - Alt+X does not honor protected contents
Summary: Alt+X does not honor protected contents
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:6.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-20 10:10 UTC by Mike Kaganski
Modified: 2020-05-11 18:28 UTC (History)
1 user (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 Mike Kaganski 2018-12-20 10:10:48 UTC
In bug 73691, a "Toggle Unicode Notation" (Alt+X) function was introduced. It does not currently honor if the area it is used in is protected or not.

Steps to reproduce:

Variant 1.
1. In a new Writer document, use "Insert"->"Table of Contents and Index"->"Table of Contents, Index or Bibliography...".
2. Make sure that the created ToC has a title, and "Protected against manual changes" checkbox is checked at "Type" tab. Click OK to confirm creation.
3. Put cursor into the ToC's title, and press Ctrl+X.

Variant 2.
4. In a new Writer document, use "Insert"->"Section...".
5. In the new section, type some characters.
6. Go to "Format"->"Sections...", and change the section to be protected.
7. Put cursor into the section, and press Ctrl+X.

Variant 3.
8. In a new Writer document, type some characters.
9. Go to "Tools"->"Options"->"LibreOffice Writer"->"Compatibility", and select "Protect Form".
10. Put cursor after a character, and press Ctrl+X.

Actual results: at steps 3, 7, 10 the "U+XXXX" is appended (not replacing the character).

Expected: a usual "Write-protected content cannot be changed" warning, and no modification to the document.
Comment 1 Mike Kaganski 2018-12-20 12:16:37 UTC
https://gerrit.libreoffice.org/65490
Comment 2 Commit Notification 2018-12-20 19:46:50 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/daf63683ff7eec73df2ce061720f464c36e08ecb%5E%21

tdf#122217: Don't allow to change readonly content with Alt+X

It will be available in 6.3.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 3 Justin L 2020-05-11 18:28:54 UTC
Thanks Mike. So many angles...