Bug 121203 - Date forms are not showing dat
Summary: Date forms are not showing dat
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.2.0 target:6.1.4
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-11-06 12:48 UTC by mkrajnak
Modified: 2018-12-05 12:13 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
document (22.01 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-11-06 12:48 UTC, mkrajnak
Details
Comparison LibreOffice 6.2 Master and MSO 2010 (33.79 KB, image/png)
2018-11-07 11:46 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mkrajnak 2018-11-06 12:48:18 UTC
Created attachment 146356 [details]
document

I have a docx document which has tree date forms inside, all of them are having their values filled but the form only shows it's value after I re-select it manually.

I can see the value stored in document if I hover my mouse on button which triggers calendar menu. Once I re-select the value and save the document, the value is shown even after document is reopened.

Steps to reproduce:
1.Open the document

Result:
date fields don't show their values

Expected result:
date fields should show their values as they are showing the in MS Word 


Version: 6.1.3.2
Comment 1 Xisco Faulí 2018-11-07 11:45:59 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=3ec2d26dc2017ac4a27483febfc63328632f352d

author	Miklos Vajna <vmiklos@suse.cz>	2013-04-30 17:26:36 +0200
committer	Miklos Vajna <vmiklos@suse.cz>	2013-05-02 12:14:47 +0200
commit 3ec2d26dc2017ac4a27483febfc63328632f352d (patch)
tree 653c65037c067e4a356c0b98333d76d6877334b6
parent 3af051aa4a554c33e146a2329d8d504cf8908022 (diff)
bnc#779630 initial DOCX import of w:sdt's w:date

Bisected with: bibisect-41max

Adding Cc: to Miklos Vajna
Comment 2 Xisco Faulí 2018-11-07 11:46:19 UTC
Created attachment 146387 [details]
Comparison LibreOffice 6.2 Master and MSO 2010
Comment 3 Miklos Vajna 2018-11-08 13:22:10 UTC
I plan to take a look at this. The core of the problem seems to be that our date control is strict: you give it a date format and then the text value of the control has to conform to the specified date format. While in DOCX, the date control is flexible: it can have a random string value, and optionally it has an ISO date value, and there is a date format, which can also be random string if wanted.

I guess the best way to show the dates from the document is to not create the date control (go back to the old behavior) if we know we can't handle the date's value.
Comment 4 Commit Notification 2018-11-13 08:04:11 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/3583f7a1256c901199574c8373443038e28813f0%5E%21

tdf#121203 DOCX import: fix loss of free-form text in date control

It will be available in 6.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.
Comment 5 Xisco Faulí 2018-11-14 10:45:31 UTC
Verified in

Version: 6.2.0.0.alpha1+
Build ID: db01b26d2e7d6626b7504fc7ee6ba6aac50e6098
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Miklos Vajna, thanks for fixing this!!
Comment 6 Commit Notification 2018-11-17 16:52:40 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

https://git.libreoffice.org/core/+/3478c3d40b06163816e15f63cf71892cfae9f868%5E%21

tdf#121203 DOCX import: fix loss of free-form text in date control

It will be available in 6.1.4.

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 7 mkrajnak 2018-12-04 12:33:19 UTC
Hello, thanks for the fix, I tried to test on:

libreofficedev6.2-writer-6.2.0.0.beta1-1.x86_64

and in my opinion it is fixed only partially, there are three forms in the document, before the fix, I was able to edit all of them, now I can edit only one.
Comment 8 Miklos Vajna 2018-12-04 14:30:03 UTC
Could you please file a follow-up (non-regression) bug for the editing problem? I agree the editing needs fixing, but date picker never worked with free-form date strings, and this bug tracks a DOCX import regression, which are separate things.

Thanks!
Comment 9 mkrajnak 2018-12-04 14:52:30 UTC
OK, no ptoblem, I filled that here:
https://bugs.documentfoundation.org/show_bug.cgi?id=121902

Thanks