Bug 154305 - LibreOffice Writer adds empty lines between paragraph and sdt blocks
Summary: LibreOffice Writer adds empty lines between paragraph and sdt blocks
Status: RESOLVED DUPLICATE of bug 152741
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
7.3.7.2 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-03-21 10:36 UTC by Majd Azzam
Modified: 2024-10-30 12:26 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test File (24.90 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2023-03-21 10:52 UTC, Majd Azzam
Details
This is the test file: (20.77 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-10-28 12:22 UTC, Majd Azzam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Majd Azzam 2023-03-21 10:36:03 UTC
Description:
In my document, I have a normal paragraph (with one line), followed by an sdt block (with multiple lines).
When I open the document with LibreOffice Writer, I find always few empty lines between the paragraph block and the sdt block.

Steps to Reproduce:
1. create document with one paragraph.
2. create sdt with four lines, directly after the paragraph.
3. save the document, and open it again.

Actual Results:
The paragraph should be followed directly by the sdt block.

Expected Results:
There is three empty lines between the paragraph and the sdt.


Reproducible: Always


User Profile Reset: No

Additional Info:
The software should show the paragraph followed by the sdt, without any empty lines between them.

Please note the problem is not reproducible when I open the document with Microsoft Word.
Comment 1 Majd Azzam 2023-03-21 10:52:51 UTC
Created attachment 186113 [details]
Test File
Comment 2 BogdanB 2023-10-01 13:08:34 UTC
Majd, please let the bug in Unconfirmed status, until someone else can reproduce it, and confirm it.
Comment 3 Buovjaga 2023-10-24 11:48:04 UTC
This is now implemented since 5082d50d24c3fec4487c724a15eb0d54a82ecd0d, I bibisected the implementation in linux-64-24.2 bibisect repo.

Commit subject:
writerfilter: use content controls for text in block SDTs
Comment 4 Majd Azzam 2024-10-28 09:53:13 UTC
Hi,
unfortunately, the problem is still reproducible in our case.
Please check the attached file.
As you can see, the following SDT is included in the document:

    <w:sdt>
      <w:sdtPr>
        <w:alias w:val="Mehrzeilig" />
        <w:tag w:val="LASC_1_1002063RELEASEFORMS_1_506_form_1_4291UF1" />
        <w:id w:val="-205797089" />
        <w:placeholder>
          <w:docPart w:val="2E83F7A299414E848FD3CC96549BFBFD" />
        </w:placeholder>
        <w:dataBinding w:prefixMappings="xmlns:f='http://schemas.fabasoft.com/folio/2007/fields'"
          w:xpath="/*[name()='f:fields']/*[name()='f:record']/*[name()='f:field' and @ref='LASC_1_1002063RELEASEFORMS_1_506_form_1_4291UF1']/@text"
          w:storeItemID="{48C8A4C5-5B26-4D7B-BFF7-85960D8D8E1F}" />
        <w15:color w:val="007AB9" />
        <w:text w:multiLine="1" />
      </w:sdtPr>
      <w:sdtContent>
        <w:p w:rsidR="00D06043" w:rsidRDefault="00D06043">
          <w:r>
            <w:t>Dies ist ein Test</w:t>
          </w:r>
          <w:r>
            <w:br />
            <w:t>Dies ist ein Test</w:t>
          </w:r>
          <w:r>
            <w:br />
            <w:t>Test!!!</w:t>
          </w:r>
        </w:p>
      </w:sdtContent>
    </w:sdt>

When I open the file in Microsoft Office, the field preview appears as follows:
Dies ist ein Test
Dies ist ein Test
Test!!!

but in LibreOffice, it appears as follows:
Dies ist ein Test

Dies ist ein Test

Test!!!

I do not understand why there is an additional empty line between the runs!

Steps to Reproduce:
Opening the attached Word Document


Actual Results:
Each run of the SDT content will be on a separate line, with an additional empty line between every two runs.



Expected Results:
Each run of the SDT content will be on a separate line, without any additional empty lines


Thank you and best regards,
Majd
Comment 5 Buovjaga 2024-10-28 11:14:22 UTC
(In reply to Majd Azzam from comment #1)
> Created attachment 186113 [details]
> Test File

The "This the main document.." paragraph has Spacing - Below paragraph: 0,28 cm. I opened it in office.com and the result was the same.

Please check it again or attach another file that actually shows the problem.
Comment 6 Majd Azzam 2024-10-28 12:22:43 UTC
Created attachment 197272 [details]
This is the test file:
Comment 7 QA Administrators 2024-10-29 03:13:04 UTC Comment hidden (obsolete)
Comment 8 Buovjaga 2024-10-30 12:26:48 UTC
(In reply to Majd Azzam from comment #6)
> Created attachment 197272 [details]
> This is the test file:

Ok, I think I found the reason: bug 152741.

*** This bug has been marked as a duplicate of bug 152741 ***