Bug 160301 - FILEOPEN: DOC: DOCVARIABLE fields with missing content
Summary: FILEOPEN: DOC: DOCVARIABLE fields with missing content
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:24.8.0 target:24.2.3 target:25...
Keywords:
Depends on:
Blocks: DOC-Fields
  Show dependency treegraph
 
Reported: 2024-03-21 11:09 UTC by Oliver Specht (CIB)
Modified: 2024-08-14 21:51 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Bugdoc in doc format (30.00 KB, application/msword)
2024-03-21 11:09 UTC, Oliver Specht (CIB)
Details
Bugdoc in docx format (15.23 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-03-21 11:09 UTC, Oliver Specht (CIB)
Details
Another example in doc format (34.50 KB, application/msword)
2024-04-04 17:08 UTC, Gabor Kelemen (allotropia)
Details
One more with localized characters (35.50 KB, application/msword)
2024-04-04 17:09 UTC, Gabor Kelemen (allotropia)
Details
Another example in doc format (34.50 KB, application/msword)
2024-04-09 21:12 UTC, Gabor Kelemen (allotropia)
Details
One more with localized characters (35.50 KB, application/msword)
2024-04-09 21:13 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Specht (CIB) 2024-03-21 11:09:30 UTC
Created attachment 193225 [details]
Bugdoc in doc format

Fields in the attached document are imported as DocumentInformation fields and the content is set to the name of the variable.

LO imports the docx-version of the same document as user fields.
The doc file should be imported the same way.
Comment 1 Oliver Specht (CIB) 2024-03-21 11:09:56 UTC
Created attachment 193226 [details]
Bugdoc in docx format
Comment 2 Gabor Kelemen (allotropia) 2024-04-04 17:08:15 UTC
Created attachment 193494 [details]
Another example in doc format

attachment 181587 [details] from bug 150267 saved with Word as doc
Comment 3 Gabor Kelemen (allotropia) 2024-04-04 17:09:15 UTC
Created attachment 193495 [details]
One more with localized characters

attachment 182853 [details] from bug 151370 saved as doc with Word
Comment 4 Commit Notification 2024-04-04 17:48:13 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ad4b72a0eacf6bb6887236ea3a3807b1264de822

tdf#160301 import DOCVARIABLE fields as user fields

It will be available in 24.8.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 Commit Notification 2024-04-04 19:46:36 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-24-2":

https://git.libreoffice.org/core/commit/2ae662ed5e2a92ae8c1a2e6b61dcc9b67f94419f

tdf#160301 import DOCVARIABLE fields as user fields

It will be available in 24.2.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 6 Gabor Kelemen (allotropia) 2024-04-09 21:12:59 UTC
Created attachment 193588 [details]
Another example in doc format

This time the correct doc format file.
Comment 7 Gabor Kelemen (allotropia) 2024-04-09 21:13:26 UTC
Created attachment 193589 [details]
One more with localized characters

This time the correct file
Comment 8 Gabor Kelemen (allotropia) 2024-04-09 21:15:50 UTC
Verified with:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 432c866072aa62cf90168d569dc56cbc7269bcda
CPU threads: 15; OS: Windows 10.0 Build 19045; UI render: default; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: default

All example files show their docvars in the Insert Field dialog - Variables tab under User fields.
Comment 9 Commit Notification 2024-08-14 21:51:36 UTC
Adam Seskunas committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/fe7b39884ccb5e540e10f3294d8f7b35bf3e6ebb

tdf#160301 - Add Unit test

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