Bug 165192 - Multiline Sdt content is displayed incorrectly
Summary: Multiline Sdt content is displayed incorrectly
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
25.2.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected
Depends on:
Blocks: DOCX-Content_Control
  Show dependency treegraph
 
Reported: 2025-02-11 11:06 UTC by Majd Azzam
Modified: 2025-03-20 10:19 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file that contains an sdt with multiple lines. (19.93 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-02-11 11:07 UTC, Majd Azzam
Details
Current Result (6.84 KB, image/png)
2025-02-11 11:07 UTC, Majd Azzam
Details
Expected Result (8.13 KB, image/png)
2025-02-11 11:07 UTC, Majd Azzam
Details
Screenhots MS before after (15.09 KB, image/jpeg)
2025-03-20 09:31 UTC, Timur
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Majd Azzam 2025-02-11 11:06:23 UTC
Description:
I have a document that contains an Sdt.
The content of this Sdt is a multiline text, as shown below:
      <w:sdtContent>
        <w:p w14:paraId="236EC849" w14:textId="1EF692F9" w:rsidR="002806CE" w:rsidRPr="00B206A5"
          w:rsidRDefault="00B206A5">
          <w:pPr>
            <w:rPr>
              <w:lang w:val="en-US" />
            </w:rPr>
          </w:pPr>
          <w:r>
            <w:t>This ist my text</w:t>
          </w:r>
          <w:r>
            <w:br />
            <w:t>This ist my text</w:t>
          </w:r>
          <w:r>
            <w:br />
            <w:t>This ist my text</w:t>
          </w:r>
        </w:p>
      </w:sdtContent>

LibeOffice shows an empty line between every two lines instead of line breaks in the text (see screenshot1)!
in LibreOffice version 7.2.7, the sdtcontent was displayed correctly (see screenshot2)

Steps to Reproduce:
Open the attached file.

Actual Results:
There is an empty line between every two lines (see Screenshot 1)



Expected Results:
There is no empty line between every two lines, just a line break (see Screenshot 2)


Reproducible: Always


User Profile Reset: No

Additional Info:
Display the attached docx file as shown in the expected results (there is no empty line between every two lines, just a line break; see Screenshot 2)
Comment 1 Majd Azzam 2025-02-11 11:07:18 UTC
Created attachment 199133 [details]
Test file that contains an sdt with multiple lines.
Comment 2 Majd Azzam 2025-02-11 11:07:44 UTC
Created attachment 199134 [details]
Current Result
Comment 3 Majd Azzam 2025-02-11 11:07:58 UTC
Created attachment 199135 [details]
Expected Result
Comment 4 m_a_riosv 2025-02-11 16:36:54 UTC
Reproducible
Version: 24.2.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: 06946980c858649160c634007e5fac9a5aa81f38
CPU threads: 16; OS: Windows 10.0 Build 26100; UI render: Skia/Vulkan; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded
and
Version: 25.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6042e60d69c40d1f307710e60a278cb286d68603
CPU threads: 16; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

Latest version that works on the ones I have installed.
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: en-US
Calc: CL threaded
Comment 5 raal 2025-02-11 20:00:33 UTC
This seems to have begun at the below commit in bibisect repository/OS linux-64-24.2.
Adding Cc: to Jaume Pujantell ; Could you possibly take a look at this one?
Thanks
 45991d3b445b9e80932e8b9e220bccaf88883290 is the first bad commit
commit 45991d3b445b9e80932e8b9e220bccaf88883290
Author: Jenkins Build User <tdf@maggie.tdf>
Date:   Wed Oct 11 22:42:20 2023 +0200

    source 5082d50d24c3fec4487c724a15eb0d54a82ecd0d

156867: writerfilter: use content controls for text in block SDTs | https://gerrit.libreoffice.org/c/core/+/156867
Comment 6 Timur 2025-03-20 09:31:05 UTC
Created attachment 199915 [details]
Screenhots MS before after

Screenshot attached with MSO showing single content (left), LO before showing wrong content as reference (middle), LO after showing multiple content controls (right).
So this is not a regression, but incomplete fix.