Bug 146547 - UI Editing Editable section in read-only document does not mark document modified
Summary: UI Editing Editable section in read-only document does not mark document modi...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Section ModifiedStatus
  Show dependency treegraph
 
Reported: 2022-01-03 14:41 UTC by Gabor Kelemen (allotropia)
Modified: 2022-01-13 06:40 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example document with sections editable in read-only documents too (9.37 KB, application/vnd.oasis.opendocument.text)
2022-01-03 14:41 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the example document in current master after editing (263.88 KB, image/png)
2022-01-03 14:42 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2022-01-03 14:41:04 UTC
Created attachment 177284 [details]
Example document with sections editable in read-only documents too

Attached example document has two sections that have the "Editable in read-only document" section property set (see at the Format - Sections dialog).
When they are opened they can be edited, but this does not mark the document as changed.
Closing the document loses the text entered in the sections without a query about saving.

1, Download the attached document
2, Make sure to have Read-only set on it on the file system level.
3, Open the attached document, the "This document is open in read-only mode" infobar should appear.
4, Enter a few words in the yellow sections.
5, Close the document.

The document is closed without asking whether you want to save your changes.

Writer should be asking if you want to save your document.

Happens in:
Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: c13db6e792cc347ffff4585f23866f195651f21f
CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF-8); UI: en-US
Calc: threaded

and older versions as well back to
LibreOffice 3.5.0rc3 
Build ID: 7e68ba2-a744ebf-1f241b7-c506db1-7d5373
Comment 1 Gabor Kelemen (allotropia) 2022-01-03 14:42:35 UTC
Created attachment 177285 [details]
Screenshot of the example document in current master after editing
Comment 2 Aron Budea 2022-01-03 15:27:42 UTC
That's an unusual concept... why would you want to allow editing in an actual read-only file? I can understand the idea of editing parts of a document that's mostly locked for editing, but this is different.

Anyway, confirmed using LO 7.4.0.0.alpha0+ (c13db6e792cc347ffff4585f23866f195651f21f) / Ubuntu.