Bug 117895 - "Edit document properties before saving" option leaves just-saved document modified; changes are not saved
Summary: "Edit document properties before saving" option leaves just-saved document mo...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Henry Castro
URL:
Whiteboard: target:6.2.0 target:6.1.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-05-30 07:27 UTC by Mike Kaganski
Modified: 2018-10-05 12:50 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 Mike Kaganski 2018-05-30 07:27:08 UTC
Using Options->Load/Save->General->Edit document properties before saving, modifying the settings and confirming the changes using OK leaves the just-saved document in modified state, and the changes made in the dialog are not saved in the file.

0. Enable the mentioned setting.
1. Create a new document (e.g., a Writer document).
2. Save (Ctrl+S) and choose a file name.
3. In the automatically opened `Properties of "Untitled 1"` dialog, go to Security tab, and check `Open file read-only` checkbox; click OK to close the dialog.
4. See that the document is in modified state: e.g., in status bar.
5. Close the document (see that "Your changes will be lost" warning shown; click Cancel to not save).
6. Reopen the document; see that it is opened in read-write mode.

This is regression from https://cgit.freedesktop.org/libreoffice/core/commit/?id=0950917b9514069e8dbf92b9c0fbd44b492a7cd1

and the problem is in ModelData_Impl::ShowDocumentInfoDialog() which now returns without waiting for the dialog finished.
Comment 1 Xisco Faulí 2018-06-05 19:09:39 UTC
Adding Cc: to Henry Castro
Comment 2 Commit Notification 2018-07-12 04:03:58 UTC
Henry Castro committed a patch related to this issue.
It has been pushed to "master":

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

tdf#117895: "Edit document properties before saving"...

It will be available in 6.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 3 Xisco Faulí 2018-08-15 14:38:51 UTC
A polite ping to Henry Castro:
Is this bug fixed? if so, could you please close it as RESOLVED FIXED ?
Otherwise, Could you please explain what's missing?

Finally, should it be backported to 6-1 ? Please note bug 119206 as well...

Thanks
Comment 4 Commit Notification 2018-09-06 14:51:50 UTC
Henry Castro committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d322bab9ab453f5012d9760b245bf1be624f324a&h=libreoffice-6-1

tdf#117895: "Edit document properties before saving"...

It will be available in 6.1.2.

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.