A DocInfo.CreateDateTime field is not exported as a field in DOCX, but just as a plain text variable name. This has been true at least since LO 3.5. (Since 7.2/7.1.1 the field is always imported as FIXED.) There are many of these field issues I expect, but each is handled with separate code, so they might as well be handled in separate bug reports as needed. This is a follow-up of FILEOPEN bug 134592's writerfilter/qa/cppunittests/dmapper/data/create-date-preserve.docx This is also seen in the header.xml in ooxmlexport14's tdf83309.docx.
The problem with these documents is that they don't specify any date formatting. CREATEDATE \* MERGEFORMAT <w:instrText xml:space="preserve"> CREATEDATE </w:instrText> instead of CREATEDATE \@"MM/dd/yy" MERGEFORMAT <w:instrText xml:space="preserve"> CREATEDATE \@"HH:mm:ss\ AM/PM" </w:instrText> Thus it was not treated as a Number Format (empty string), and gets set to bWriteExpand, which just dumps the field name. I guess the best solution is to make an exception for an empty string. If the formatting causes a string that is not a known number format, then we can continue to dump the field name as an indicator that we are missing support for that.
These patches depend on one from bug 147861. https://gerrit.libreoffice.org/c/core/+/132661 tdf#148380 writerfilter: Import AUTHOR as FIXEDFLD https://gerrit.libreoffice.org/c/core/+/132662 tdf#148380 docx export: support CREATEDATE without format https://gerrit.libreoffice.org/c/core/+/132663 tdf#148380 doc: Import AUTHOR/CREATEDATE as FIXEDFLD related followup https://gerrit.libreoffice.org/c/core/+/132664 tdf#148380 docx export: support CHANGEDATE/PRINTDATE without format related followup https://gerrit.libreoffice.org/c/core/+/132665 tdf#148380 sw ms export: DI_EDIT is simply EDITTIME https://gerrit.libreoffice.org/c/core/+/132666 tdf#148380 docx export: use content of unknown fields, not name
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/431a0399bb050e65dedb2e9280e744699a724227 tdf#148380 writerfilter: Import AUTHOR as FIXEDFLD It will be available in 7.4.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/5453721050f1cad2951410cc8d5ebca19ea38294 tdf#148380 docx export: support CREATEDATE without format It will be available in 7.4.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/55c7691fadfb9b3a4869cc14432ec57c858f693f tdf#148380 doc: Import AUTHOR/CREATEDATE as FIXEDFLD It will be available in 7.4.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/206efef78ea367de76f000a1760dbd8bc7785b0c tdf#148380 sw ms export: DI_EDIT is simply EDITTIME It will be available in 7.4.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/d9b33ed6644203141fdb0776c291425c2bc9f5ac tdf#148380 docx export: support CHANGEDATE/PRINTDATE without format It will be available in 7.4.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c136249982345b205da83d1907e21da0c7bab7dd tdf#148380 docx export: use content of unknown fields, not name It will be available in 7.4.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/8e9a963d20edcf5751705bb64126f51a2ace6b18 tdf#148380 sw fieldui: always allow turning off "Fixed Content" It will be available in 7.4.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.
Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/4a8ea3d086e03098fcff2a744ccb632f50f173dd tdf#148380 sw ms: import select fldLock'd fields as FIXED It will be available in 7.4.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's patch is the generic fix for the big problem of LO exporting the NAME of the field instead of the CONTENT of the field. The other patches here were for wiring up the field and variables together in a way that emulates what MS Word does. Several other bug fixes depend on some of these fixes.