Bug 164176 - FILEOPEN: DOCX: Multiline Docvariable field broken
Summary: FILEOPEN: DOCX: Multiline Docvariable field broken
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Oliver Specht (CIB)
URL:
Whiteboard: target:25.8.0 target:25.2.2
Keywords:
Depends on:
Blocks: Fields-Dialog Word-Line-Break
  Show dependency treegraph
 
Reported: 2024-12-05 06:47 UTC by Oliver Specht (CIB)
Modified: 2025-02-12 16:26 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Docvariable field containing _x000d_ (13.46 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-12-05 06:47 UTC, Oliver Specht (CIB)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Specht (CIB) 2024-12-05 06:47:10 UTC
Created attachment 197944 [details]
Docvariable field containing _x000d_

Load the attached file.
The variable field is imported as 
"first line_x000d_second line"
instead of 
"first line
second line"
Comment 1 m_a_riosv 2024-12-05 12:25:35 UTC
Reproducible with
Version: 7.6.7.2 (X86_64) / LibreOffice Community
Build ID: dd47e4b30cb7dab30588d6c79c651f218165e3c5
CPU threads: 16; OS: Windows 10.0 Build 26100; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: es-ES
Calc: CL threaded

Editing with Writer inserts a line break instead of a paragraph break, it saves and reopen with Writer and Word.
But replacing the paragraph break with a line break in Word, doesn't solve the issue opening with Writer.
Comment 2 Aryeh 2024-12-05 16:27:17 UTC
I was able to reproduce the bug as well.

Version: 24.8.3.2 (AARCH64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded
Comment 3 Commit Notification 2025-02-11 15:34:06 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9647aded124c17e97db1bf7bb071136c7f91cb90

tdf#164176 Import multiline document variable with break

It will be available in 25.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 4 Commit Notification 2025-02-12 16:26:52 UTC
Oliver Specht committed a patch related to this issue.
It has been pushed to "libreoffice-25-2":

https://git.libreoffice.org/core/commit/472a503d283d96309525078a7933f4d5ec8a1d65

tdf#164176 Import multiline document variable with break

It will be available in 25.2.2.

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.