Bug 122658 - Empty date form field is not exported correctly in DOCX file
Summary: Empty date form field is not exported correctly in DOCX file
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.3.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Tamás Zolnai
URL:
Whiteboard: target:6.3.0
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-11 17:13 UTC by Tamás Zolnai
Modified: 2019-01-14 10:44 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Test file with an empty date field (8.46 KB, application/vnd.oasis.opendocument.text)
2019-01-11 19:12 UTC, Tamás Zolnai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tamás Zolnai 2019-01-11 17:13:18 UTC
Description:
Date form field (Forms -> More Fields -> Date field) is exported as a content control in DOCX file. However when no data is entered into the date field, it's lost during an DOCX RT.

Steps to Reproduce:
1. Open Writer
2. Insert an empty date field (Forms -> More fields -> Date field)
3. Save the document as DOCX file
4. Open the saved DOCX file

Actual Results:
The empty date field is lost after saving and reloading the document.

Expected Results:
The empty date field should be in place after saving and reloading


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Durgapriyanka 2019-01-11 17:33:53 UTC
Thank you for reporting the bug. I can not reproduce this bug in

Version: 6.3.0.0.alpha0+
Build ID: 3c964980da07892a02d5ac721d80558c459532d0
CPU threads: 2; OS: Windows 6.1; UI render: default; VCL: win; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-12-12_02:07:45
Locale: en-US (en_US); UI-Language: en-US
Calc: threaded

The empty date field is not lost and stays
Comment 2 Durgapriyanka 2019-01-11 17:37:48 UTC
If I open the saved document in Writer, the empty date field does open and if I try to open with MS Word, it doesn't open the file stating an error
Comment 3 Tamás Zolnai 2019-01-11 19:12:47 UTC
Created attachment 148242 [details]
Test file with an empty date field

The problem can be reproduced by saving the test document into DOCX file.
Comment 4 Commit Notification 2019-01-12 00:02:48 UTC
Tamás Zolnai committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/24613d7abf820aff639a276a1819ada8d83e9063%5E%21

tdf#122658: Empty date form field is not exported correctly to DOCX file

It will be available in 6.3.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 raal 2019-01-12 07:57:55 UTC
Confirm. Version: 6.3.0.0.alpha0+
Build ID: 892a5cfe557edb405ec0037676f02a1c24dd76ec
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3;