Bug 149827 - It's possible to add text in write-protected sections immediately before (but outside) of input fields
Summary: It's possible to add text in write-protected sections immediately before (but...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Section
  Show dependency treegraph
 
Reported: 2022-07-03 11:30 UTC by Mike Kaganski
Modified: 2023-09-11 11:21 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 Mike Kaganski 2022-07-03 11:30:07 UTC
1. In a new Writer document, add a section (Insert->Section)
2. Put some text in the section
3. Insert an Input field in the section (Insert->Field->More Fields; Functions tab; Input Field), setting some initial text in its "Review Fields" dialog
4. Write=protect the section (Format->Sections; Write protection -> [x] Protect)

Trying to type anything in the section (outside of the field) now gives an expected "Write-protected content cannot be changed" warning - except when the cursor is immediately *before* the input field; when the cursor is in this special spot, typing will add text to the section (not to the field content).

Tested with Version: 7.3.4.2 (x64) / LibreOffice Community
Build ID: 728fec16bd5f605073805c3c9e7c4212a0120dc5
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL
Comment 1 Mike Kaganski 2022-07-03 12:50:16 UTC
No repro using Version: 7.0.0.3 (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: default; VCL: win
Locale: en-US (ru_RU); UI: en-US
Calc: CL

Repro using Version: 7.1.0.3 (x64) / LibreOffice Community
Build ID: f6099ecf3d29644b5008cc8f48f42f4a40986e4c
CPU threads: 12; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: ru-RU (ru_RU); UI: en-US
Calc: CL

Regression after commit 2c7bf3543ab798d1c117d9f3258467e4aef9a8db
  Author Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
  Date   Thu Aug 20 15:33:49 2020 +0200
    Related tdf#100492 Detect click into empty field

(As explained in the bug mentioned in the commit message, it was a typo, and the correct reference bug was tdf#101830)
Comment 2 Faisal 2022-07-03 18:28:17 UTC
Can repro with Version: 7.3.4.2 / LibreOffice Community
Build ID: 30(Build:2)
CPU threads: 4; OS: Linux 5.10; UI render: default; VCL: kf5 (cairo+xcb)
Locale: en-GB (en_US.UTF-8); UI: en-US
7.3.4-2
Calc: threaded

I can also type in the protected section *immediately after* the input field.
Comment 3 Wolf Icefang 2023-01-26 16:27:22 UTC
Can repro with Version: 7.4.4.2 (x64) / LibreOffice Community
Build ID: 85569322deea74ec9134968a29af2df5663baa21
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded
I can type in the protected segment directly before the input field but I can't find a way to type immediately after the protected section. Tested with a .docx file both before and after it was transformed into a .odt file through a "Save As" operation. I downloaded the file off the internet. (I can't figure out how to make a protected document with input fields myself.)