Bug 118948 - Date format in Impress header/footer is lost when saving
Summary: Date format in Impress header/footer is lost when saving
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.0.0.0.beta1
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0 target:6.0.7 target:6.1.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-07-26 10:28 UTC by Norbert
Modified: 2018-07-31 13:31 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file created with LO 5.4.6.2 (11.00 KB, application/vnd.oasis.opendocument.presentation)
2018-07-26 15:26 UTC, Norbert
Details
Example file created with LO 6.1.0.2 (10.57 KB, application/vnd.oasis.opendocument.presentation)
2018-07-26 15:28 UTC, Norbert
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Norbert 2018-07-26 10:28:14 UTC
Description:
In an Impress presentation a non-standard date format (e.g. July 26, 2018) of a date in the footer line is lost when saving the presentation. Opening the saved presentation again shows the standard date format (7/26/18). Opening this newly saved version in an older version of Impress (I tried 5.4.6) also shows the standard date format.

Changing the date format in the document to 'July 26, 2018' with Impress 5.4.6 and saving it fixes the document. Opening it again in 6.1.0.2 shows the correct non-standard date format.

Saving the document another time with 6.1.0.2 breaks it again to the standard date format (7/26/18).

Steps to Reproduce:
1. Create an empty impress presentation using LO 5.4.6
2. Insert -> Header and Footer...
3. Enable 'Date and Time'
4. Enable 'Variable'
5. Chose a non-standard date Format, e.g. July 26, 2018
6. Save the file using LO 5.4.6
7. Open the file using LO 6.1.0.2
8. Save the file using LO 6.1.0.2 (without doing any additional changes)
9. Open the freshly saved file again in LO 6.1.0.2 or LO 5.4.6

Actual Results:
Date presented in the footer is '7/26/18'

Expected Results:
Date presented in the footer is 'July 26, 2018'


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Same effect is observed using LO 6.0 instead of LO 6.1.0.2

Exact version used is:
Version: 6.1.0.2
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3_kde5; 
Locale: de-DE (en_US.UTF-8); Calc: group threaded
Comment 1 Xisco Faulí 2018-07-26 14:39:53 UTC
Thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
(Please note that the attachment will be public, remove any sensitive information before attaching it. 
See https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F for help on how to do so.)

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
Comment 2 Norbert 2018-07-26 15:26:23 UTC
Created attachment 143790 [details]
Example file created with LO 5.4.6.2
Comment 3 Norbert 2018-07-26 15:28:27 UTC
Created attachment 143791 [details]
Example file created with LO 6.1.0.2

File was created by opening test_5462.odp with LO 6.1.0.2 and just saving it.
Comment 4 Norbert 2018-07-26 15:31:56 UTC
As can be seen at test_6102.odp LO 6.1.0.2 changes the formatting of the date in the footer.

In fact in the meantime I found out that LO 6.0 already shows this flaw.
Comment 5 Xisco Faulí 2018-07-27 11:57:29 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=7d14555ef7e867c5b1a0e195e3ef056885697c59

author	Noel Grandin <noel.grandin@collabora.co.uk>	2017-09-15 13:55:39 +0200
committer	Noel Grandin <noel.grandin@collabora.co.uk>	2017-09-18 13:16:23 +0200
commit 7d14555ef7e867c5b1a0e195e3ef056885697c59 (patch)
tree af39963caf1328d41756e4463a2a39019448026d
parent 0083b33650c2f584ceff6eeaf9ef6993bfe0ae9b (diff)
convert SvxDateFormat to scoped enum
And simplify the code in sd/headerfooterdlg, no
need for the complex encoding of date and time when we
can just index into a static array.

Bisected with: bibisect-linux64-6.0

Adding Cc: to Noel Grandin
Comment 6 Commit Notification 2018-07-28 06:41:42 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=93baa280670367ef6246d837080706f2c80eab0b

tdf#118948 - Date format in Impress header/footer is lost when 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 7 Xisco Faulí 2018-07-29 18:26:23 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 72b099d279e7096d41a04fe8c0dd493a5fc18a33
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Noel, thanks for fixing this!!

Cherry-picked to 6-1, 6-1-0 and 6-0
Comment 8 Commit Notification 2018-07-29 21:07:46 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=34f6ad89ed195c45f4cb5e26b4129bb0087d5452&h=libreoffice-6-0

tdf#118948 - Date format in Impress header/footer is lost when saving

It will be available in 6.0.7.

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 9 Commit Notification 2018-07-29 21:07:56 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

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

tdf#118948 - Date format in Impress header/footer is lost when saving

It will be available in 6.1.1.

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 10 Commit Notification 2018-07-31 08:26:22 UTC
Noel Grandin committed a patch related to this issue.
It has been pushed to "libreoffice-6-1-0":

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

tdf#118948 - Date format in Impress header/footer is lost when saving

It will be available in 6.1.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.