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
Created attachment 177285 [details] Screenshot of the example document in current master after editing
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.
(In reply to Aron Budea from comment #2) > That's an unusual concept... why would you want to allow editing in an > actual read-only file? Sections have this checkbox in the Edit Sections dialog: "Editable in read-only document" and apparently a customer started to utilize this feature. I can understand the idea of editing parts of a > document that's mostly locked for editing, but this is different. Another option to reach this UX would be File - Properties - Security -> Open file read-only. But if I tick that box, save & reload, then the same isssue happens - file opens RO, only the yellow sections are editable (until Edit - Edit Mode is used) BUT: typing into them does not put the document into modified state and Writer lets you close it without any question.
Samuel Mehrbrodt committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/e7e9991fd06ba2e0484ae5e6b6acc323ab8bf66b tdf#146547 Mark read-only docs as modified It will be available in 7.6.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.
Verified in Version: 7.6.0.0.alpha1+ (X86_64) / LibreOffice Community Build ID: e7e9991fd06ba2e0484ae5e6b6acc323ab8bf66b CPU threads: 8; OS: Linux 5.4; UI render: default; VCL: gtk3 Locale: hu-HU (hu_HU.UTF-8); UI: hu-HU Calc: threaded Typing into the editable sections marks the document as modified.
Julien Nabet committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4d5fe05d3926d8106f47cac2cfdefac8ec7b36d7 Revert "tdf#146547 Mark read-only docs as modified" It will be available in 7.6.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.
Removing target since the patch has been reverted. Indeed, it caused tdf#155638 "Form couldn't be closed after it has been opened"
Samuel: I reassign you by default but there's no obligation of course! :-)
Michael Stahl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/aca32a55456aa4e907b216fb490b3c15d26c3d55 tdf#146547 sfx2: allow read-only documents to be modified It will be available in 24.2.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.
i've tweaked the fix a bit.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/bde746141f9b382156a5ce79ebf82c5e32fc455b tdf#146547 sfx2: allow read-only documents to be modified It will be available in 7.6.0.0.beta2. 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.
Michael Stahl committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/79241a1fd32ab03cd2bb34fb303ce7f2fa93e57e tdf#146547 sfx2: preserve modified state from read-only to editable It will be available in 24.2.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.
Michael Stahl committed a patch related to this issue. It has been pushed to "libreoffice-7-6": https://git.libreoffice.org/core/commit/5aa1fee57e362a08d65dd814f5a29e680d3ea24b tdf#146547 sfx2: preserve modified state from read-only to editable It will be available in 7.6.0.0.beta2. 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.