Bug 136983 - Wrong setting for DOC properties
Summary: Wrong setting for DOC properties
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium minor
Assignee: Justin L
URL:
Whiteboard: target:7.1.0 target:7.0.3 target:6.4.8
Keywords: bibisected, bisected, regression
Depends on:
Blocks: File-Properties
  Show dependency treegraph
 
Reported: 2020-09-23 18:32 UTC by lachend
Modified: 2020-12-02 07:45 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
see the row "Last printed" (49.46 KB, image/png)
2020-09-23 18:37 UTC, lachend
Details
Printing date is shown earlier than date of file creation (48.28 KB, image/png)
2020-10-29 19:54 UTC, lachend
Details
Problematic file (12.50 KB, application/msword)
2020-10-29 20:11 UTC, lachend
Details

Note You need to log in before you can comment on or make changes to this bug.
Description lachend 2020-09-23 18:32:40 UTC
Description:
When I created DOC document in LO 6.4.3 and printed it, the history of printing time saved incorrectly. For now, opening the DOCument in LO 7.0.1.2, I see the date of printing: year 1995.

Steps to Reproduce:
1. Create a document and save it with .doc extension.
2. Print it
3. See the properties at next opening.

Actual Results:
Date of printing: 1995 yr.

Expected Results:
Date of printing: 2020 yr.


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: StartModule
[Information guessed from browser]
OS: Linux (All)
OS is 64bit: yes
Comment 1 lachend 2020-09-23 18:37:34 UTC
Created attachment 165800 [details]
see the row "Last printed"
Comment 2 Dieter 2020-09-24 06:18:45 UTC
Do you get the same result with a document created with LO 7.0.1.2?
Comment 3 lachend 2020-09-27 19:22:58 UTC
Yes, the date of printing remains, while the DOCument hasn't been printed.
Comment 4 Dieter 2020-09-28 05:57:22 UTC
I confirm it with

Version: 7.0.2.1 (x64)
Build ID: ede20268f3f8777cdf69e0281835d320c41213fc
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded

This is reproducible without step two (just save as doc and reopen)

Couldn't found it in

Version: 6.1.6.3 (x64)
Build-ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU-Threads: 4; BS: Windows 10.0; UI-Render: GL; 
Gebietsschema: de-DE (de_DE); Calc: CL
Comment 5 Timur 2020-09-28 14:51:07 UTC
Bibisect 6.2
source 2ec0cf500222aef55d02df80154b47fbb92970c9
previous source 59a55475af8e4f6ce4f0976a73a605b012165d3a

author	Justin Luth <justin.luth@collabora.com>	2018-10-18 21:15:13 +0300
committer	Justin Luth <justin_luth@sil.org>	2018-10-19 11:05:38 +0200
commit 2ec0cf500222aef55d02df80154b47fbb92970c9 (patch)
tree 46c5b47da19c901aff9ba7eab18cc244845e26f0
parent 59a55475af8e4f6ce4f0976a73a605b012165d3a (diff)
NFC ww8 cleanup: remove unused variables, simplify, whitespace
Change-Id: Ib4f100d4019643cde893ef1d8643a5c08b55ff8f
Reviewed-on: https://gerrit.libreoffice.org/61951

Hi Justin, please take a look if bibisect was correct. 

Note: MSO reads similar to LO, so it's filesave issue.
Comment 6 Justin L 2020-09-28 17:34:41 UTC
Yup - I probably should have my commit rights taken away for missing
    xDocProps = xDPS->getDocumentProperties();

Proposed fix at https://gerrit.libreoffice.org/c/core/+/103565
Comment 7 Commit Notification 2020-10-19 10:41:13 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/1086654d6e8cc22f1f99195668db3f305437e570

tdf#136983 partial revert NFC ww8 cleanup: remove unused variables

It will be available in 7.1.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.
Comment 8 Commit Notification 2020-10-19 15:19:58 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/19b8ded3ae18dd4070a3e21d7b980782a27e5547

tdf#136983 partial revert NFC ww8 cleanup: remove unused variables

It will be available in 7.0.3.

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.
Comment 9 Commit Notification 2020-10-20 07:27:38 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/188ddcd482150b5fdeb44d97e57831e3e27b3f5b

tdf#136983 partial revert NFC ww8 cleanup: remove unused variables

It will be available in 6.4.8.

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.
Comment 10 Timur 2020-10-28 09:35:12 UTC
Justin, thanks, I guess you just forgot to close so I did it.
Comment 11 Justin L 2020-10-28 09:52:14 UTC
Oh yes, thanks. I was leaving it open for 6.4.7.3, but that never happened...
Comment 12 lachend 2020-10-29 19:54:47 UTC
Created attachment 166858 [details]
Printing date is shown earlier than date of file creation
Comment 13 lachend 2020-10-29 19:55:48 UTC
LO 7.0.3 for Linux
Comment 14 lachend 2020-10-29 20:11:21 UTC
Created attachment 166859 [details]
Problematic file

Well, I've decided to show you the source of the problem.
Comment 15 Justin L 2020-10-30 06:05:53 UTC
(In reply to lachend from comment #14)
> Well, I've decided to show you the source of the problem.
Important note: This file is different from the one used for printscreen in comment 12.

Up to this point, the bug report has been very clear and targeted at a very wrong change in the code. That part has been fixed. The only updates that should be added to this report are those related to the fix itself.

If there are problems with the printing date, it should be checked with versions before 6.2 to see if the problem already existed before then (and likely it does). If so, then a new report should be created.


However, I cannot confirm your problem. In MS Word 2003, a simple opening of the file shows a last printed date as 1995 for Tr.doc. That's what I see in LO as well. When I print and save Tr.doc, it shows today's date.

(If this is complaining about a document that was already broken sometime between 6.2 and now - nothing can be done about that.)
Comment 16 lachend 2020-10-30 17:30:59 UTC
(In reply to Justin L from comment #15)

> Up to this point, the bug report has been very clear and targeted at a very
> wrong change in the code. That part has been fixed. The only updates that
> should be added to this report are those related to the fix itself.
Note, Justin, the description of this bug showed a problem "after printing". The fact of wrong print date interpretation "without printing" was given by Dieter.
So my problem still actual.
Comment 17 Justin L 2020-10-30 18:14:00 UTC
(In reply to lachend from comment #16)
> The fact of wrong print date interpretation "without printing" was given by
> Dieter.
Well, Dieter was correct because printing was irrelevant up to comment 11 anyway.

I suggest that you create a new bug report with a new example document and clear steps to reproduce the problem you are describing now. I tried to guess and I wasn't able to see anything wrong after printing/saving since it had today's date on it.
Comment 18 lachend 2020-10-30 18:25:11 UTC
(In reply to Justin L from comment #17)

> I tried to
> guess and I wasn't able to see anything wrong after printing/saving since it
> had today's date on it.
Are you doing this in MS Word ?
Anyway, the significant difference between 'printing' and date of creation is not a normal thing.
Comment 19 Justin L 2020-10-30 18:28:22 UTC
(In reply to lachend from comment #18)
> Are you doing this in MS Word ?
No, I'm using LO 7.1 that I compiled.
Comment 20 Timur 2020-11-02 08:59:05 UTC
I tested this. 
As explained by Justin, confirmed bug was fixed, although it was different than reported. 

DOC attachment 166859 [details] is of unknown history. It shows 1995 but we don't know why, maybe it was affected by this bug. 

Important is: 
- when that DOC or other file is printed from MSO, it immediately get "Last Printed" set, so after it's closed and reopened, even there's no dialog to save file, Last Printed stays;
- when any ODT, DOC or DOCX is printed from LO and LO closed, "Last Printed" is  changed (seen in File-Properties) but if document is closed without saving "Last Printed" is not saved and there's no dialog to save, while it is saved if document is saved after printing and before saving.

Should it be a bug, not sure. Seems to me that current behavior is logical, even if different from MSO. 
Only bug where I found related discussion is bug 128458.
I'll open a new bug and See Also it just to draw attention and change Help https://help.libreoffice.org/7.1/en-US/text/shared/01/01100200.htm.

That's obviously a different issue so I close this bug again.
Comment 21 Dieter 2020-12-02 07:45:37 UTC
VERIFIED with

Version: 7.1.0.0.alpha1+ (x64)
Build ID: 10b23330a9655658e6d7ef1d008a3302a15e9629
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded

Justin, thanks for fixing it.

@ lachend: Please open a new bug report, if the problem still happens after printing.