Bug 169298 - FILEOPEN RTF Document variable with line break imported without line break
Summary: FILEOPEN RTF Document variable with line break imported without line break
Status: NEW
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:
Keywords: filter:rtf
Depends on:
Blocks: RTF-Fields
  Show dependency treegraph
 
Reported: 2025-11-06 17:04 UTC by Gabor Kelemen (Collabora)
Modified: 2025-11-20 17:39 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Example file from Word with line break (34.07 KB, application/msword)
2025-11-06 17:04 UTC, Gabor Kelemen (Collabora)
Details
The example file in Word 2016 and Writer side by side (72.59 KB, image/png)
2025-11-06 17:04 UTC, Gabor Kelemen (Collabora)
Details
The example file in DOCM format, used to create the RTF from (19.31 KB, application/vnd.ms-word.document.macroenabled.12)
2025-11-06 17:05 UTC, Gabor Kelemen (Collabora)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (Collabora) 2025-11-06 17:04:00 UTC
Created attachment 203775 [details]
Example file from Word with line break

This is similar to bug 151370

When a document variable in RTF contains a line break in its value, it is imported in Writer without the line break.
When the docm file I used to make the example document is opened, then it is imported with the line break.

1. Open attached RTF document
-> the document variable value "árvízturotükörfúrógép" is not broken in two lines

2. Open attached DOCM document (adapted from the example file of bug 151370)
-> the document variable value
"árvízturo
tükörfúrógép" 
is broken in two lines like above.

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 16; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Raster; VCL: win
Locale: de-DE (hu_HU); UI: en-US
Calc: threaded
Comment 1 Gabor Kelemen (Collabora) 2025-11-06 17:04:25 UTC
Created attachment 203776 [details]
The example file in Word 2016 and Writer side by side
Comment 2 Gabor Kelemen (Collabora) 2025-11-06 17:05:38 UTC
Created attachment 203777 [details]
The example file in DOCM format, used to create the RTF from
Comment 3 Gabor Kelemen (Collabora) 2025-11-06 17:18:33 UTC
The docm version is good since bug 164176

although there the bad display contained an extra
_x000d__x000a_
instead of eating the line break.
Comment 4 jcline 2025-11-14 04:39:53 UTC
I can reproduce in 
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 32; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded