Download it now!
Bug 91204 - Some Items of Properties Dialogue are not Current if Option “Edit document properties before saving” is Chosen
Summary: Some Items of Properties Dialogue are not Current if Option “Edit document pr...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: File-Properties
  Show dependency treegraph
 
Reported: 2015-05-10 14:07 UTC by Harald Koester
Modified: 2019-06-13 14:47 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 Harald Koester 2015-05-10 14:07:55 UTC
Steps to reproduce:

(1) Open new text document. 
(2) Set Option „Load/Save > General > Save > Edit document properties before saving”
(3) Insert some text.
(4) Save document: File > Save. The “Save as ...” dialogue is displayed. Type in file name, choose file type and choose folder, then ”Save“. The dialogue “Properties of Untitled1” is displayed. Expected: “Properties of [just chosen file name] should be displayed.
(5) Click tab “General” 
Displayed file name: “Untitled”. Expected: File name typed in at step (4).
Type: Text document. Expected: File type chosen in step (4).
Location: A folder is not displayed. Expected: Folder chosen in step (4)

This bug also appears if you like to save an existing document under a different name, type and/or folder with “Save as...”. In this case the previous name, folder and type are displayed.

This bug also appears with Calc, hence I suppose all LibreOffice components (Draw, Impress,..) are effected.

Comment: You can argue, that the displayed information of file name, file type and location are correct, hence the document has not been saved yet. But from my point of view it's quite irritating, when I have just determined name, type and folder and one second later these data are not displayed. Possibly for a better understanding a message could be displayed in the properties dialogue, e.g. “Document has not been saved yet. It will be saved with OK.”

There is also another solution for this bug: Change the order of both dialogues, first display the “Properties...” dialogue and then the “Save as...” dialogue. To my opinion this solution is also more logical, hence the option says “...before...”. For this possibility I would also replace some words of the “Properties…” dialogue: 
(a) Content of field File Name: Not: “Untitled”, better “(untitled)” or “(File name not determined yet)”, with brackets in order to avoid a mix-up with a file name.
(b) Not “Type”, better “File type”.
(c) In field “Type” or "File type”: Not “Text document”, better “Undetermined text document format”
(d) Not “Location”, better “Folder”.
(e) In field “Location” or “Folder”: “(Folder not determined yet)”

Hint: I already described this bug in Bug 53034 together with another problem which has been solved meanwhile.
Comment 1 Timur 2015-05-11 11:50:24 UTC
I confirm, but I'll let someone else to confirm. I set as inherited from OO.

(In reply to Harald Koester from comment #0)
> Comment: You can argue, that the displayed information of file name, file
> type and location are correct, hence the document has not been saved yet.
Actually, the document is saved BEFORE document properties dialog appears.
Also, if we save the document (new or save as), and cancel the (empty or existing) properties dialog, and then close and reopen the document, it will have the correct (new or saved as) properties. 
 
Solution should be either:
- Rename "Edit document properties BEFORE saving" to "Edit document properties AFTER saving" and display saved properties in the  properties dialog OR
- Change the order of both dialogues, first display the “Properties...” dialogue and then the “Save as...” dialogue (as proposed by submitter).
Comment 2 Buovjaga 2015-05-15 15:42:14 UTC
Reproduced.

Win 7 Pro 64-bit Version: 5.0.0.0.alpha1+
Build ID: 9de1d53a2ce3ee7036b4688b373db7b2235af4d9
TinderBox: Win-x86@39, Branch:master, Time: 2015-05-14_00:07:12
Locale: fi-FI (fi_FI)
Comment 3 QA Administrators 2016-09-20 09:41:40 UTC Comment hidden (obsolete)
Comment 4 Harald Koester 2016-09-23 22:03:10 UTC Comment hidden (obsolete)
Comment 5 Xisco Faulí 2017-09-29 08:51:32 UTC Comment hidden (obsolete)
Comment 6 Harald Koester 2017-11-01 11:06:28 UTC
Bug still exists with version 5.4.2 (64 Bit, Win 10).
Comment 7 Timur 2017-11-09 08:06:03 UTC
Need UX eval to decide on opted solution.
Comment 8 Heiko Tietze 2018-05-29 11:04:34 UTC
The option "Tools > Options > Load/Save > Edit document properties before saving" shows the document properties dialog on saving with the issue that the entered filename is not taken into it. The proposed solution to show properties first and save subsequently makes sense from UX POV (Timur points out comment 1 that the file is saved after the first dialog, so the alternative solution is not ideal).

This change is likely an easy hack.
Comment 9 Mihir 2018-05-29 11:42:32 UTC
I would like to work on this bug if it is open. Can I get an idea, where I can start?
Thanks.
Comment 10 Heiko Tietze 2018-05-29 14:09:26 UTC
(In reply to Mihir from comment #9)
> I would like to work on this bug if it is open. Can I get an idea, where I
> can start?

Searching for "Edit document properties before saving" [1] I get EditProperty, which in turn brings "EOption::DocInfSave" that would be the internal variable for this option. Maybe you can make your way through the code with this info. Otherwise dev wisdom is needed.

[1] https://opengrok.libreoffice.org/search?project=core&q=%22Edit+document+properties+before+saving%22&defs=&refs=&path=&hist=&type=
[2] https://opengrok.libreoffice.org/search?project=core&q=EditProperty&defs=&refs=&path=&hist=&type=
Comment 11 Mike Kaganski 2018-05-30 05:54:00 UTC
(In reply to Timur from comment #1)
> Actually, the document is saved BEFORE document properties dialog appears.

This is incorrect. And one can easily check that: while the properties dialog still open, use a file manager to check if the file has been updated (check file modification time); even better it's seen when a file is created/saved as: the new file is simply absent yet.

> Solution should be either:
> - Rename "Edit document properties BEFORE saving" to "Edit document
> properties AFTER saving" and display saved properties in the  properties
> dialog OR

So - this is a wrong option (wrt that "AFTER").
Comment 12 Mike Kaganski 2018-05-30 06:25:38 UTC
A code pointer: SfxStoringHelper::GUIStoreModel in sfx2/source/doc/guisaveas.cxx (see the "if ( aOptions.IsDocInfoSave() ..." condition).

In my opinion, more easy and safe would be to keep the order, but just augment the aModelData.ShowDocumentInfoDialog() with required arguments to override some displayed properties (which otherwise are taken from current media, which is not the new file at the moment of the dialog execution).

The other option (to show the dialog prior to file picker) possibly needs more work, e.g. careful cleanup after user has canceled the save operation in file picker (I am not sure if there is such code currently in case of failed save operation). Or may not, depending on if you consider setting the properties as part of save or not (a separate editing operation).
Comment 13 Heiko Tietze 2018-05-30 09:22:07 UTC
(In reply to Mike Kaganski from comment #11)
> (In reply to Timur from comment #1)
> > Actually, the document is saved BEFORE document properties dialog appears.
> 
> This is incorrect. And one can easily check that: while the properties
> dialog still open, use a file manager to check if the file has been updated
> ...

If you cancel the properties dialog the file shows up anyway. Of course it might be two independent procedures but OTOH the file saving could also not have been finalized.

Anyway, the best solution is to show properties before save. The cancel thing is relevant for both solutions.
Comment 14 Mike Kaganski 2018-05-30 09:26:01 UTC
(In reply to Heiko Tietze from comment #13)

Cancelling the dialog is a valid way to tell "this time no need to edit properties" - this does not (and should not) cancel the save.
Comment 15 Heiko Tietze 2018-05-30 09:32:47 UTC
(In reply to Mike Kaganski from comment #14)
> Cancelling the dialog is a valid way to tell "this time no need to edit
> properties" - this does not (and should not) cancel the save.

True. Actually the whole option is nonsense - for what purpose a user wants to edit properties with every save? If empty, yes, but not always.
Comment 16 Harald Koester 2018-05-30 11:01:27 UTC
(In reply to Heiko Tietze from comment #15)
> (In reply to Mike Kaganski from comment #14)
> > Cancelling the dialog is a valid way to tell "this time no need to edit
> > properties" - this does not (and should not) cancel the save.
> 
> True. Actually the whole option is nonsense - for what purpose a user wants
> to edit properties with every save? If empty, yes, but not always.

The dialogue "Properties..." is only displayed if the document is saved the first time or it is saved with a different name. Hence it is not correct that the dialogue is displayed with every save.