Bug 163656 - Incorrect preview of SDT fields when the field has specific Style formatting
Summary: Incorrect preview of SDT fields when the field has specific Style formatting
Status: REOPENED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.8.1.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-28 10:28 UTC by Majd Azzam
Modified: 2025-02-11 10:35 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Test file contains fields, which has specific style (4.36 MB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2024-10-28 10:29 UTC, Majd Azzam
Details
Test file contains fields, which has specific style (without embedded fonts) (29.03 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-01-24 09:57 UTC, Majd Azzam
Details
Test file contains fields, which has specific style (without embedded fonts) (28.25 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2025-01-24 10:05 UTC, Majd Azzam
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Majd Azzam 2024-10-28 10:28:43 UTC
Description:
I created a Docx file that contains a field with a specific formatting style (Formatvorlage4).
When I open the Docx file with LibreOffice, the formatting of the SDT fields appears incorrect.

Please check the file in attachment.
The field should have the Formatvorlage4 style, but it doesn't appear in the preview.
But in Microsoft Word, I can see the correct formatting (Formatvorlage4).

This is the SDT block:

      <w:sdt>
        <w:sdtPr>
          <w:rPr>
            <w:rStyle w:val="Formatvorlage4" />
            <w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial" />
          </w:rPr>
          <w:alias w:val="Author" />
          <w:tag w:val="" />
          <w:id w:val="519431896" />
          <w:placeholder>
            <w:docPart w:val="477E5E5C83E2482C8987F073F30706BF" />
          </w:placeholder>
          <w:dataBinding
            w:prefixMappings="xmlns:ns0='http://purl.org/dc/elements/1.1/' xmlns:ns1='http://schemas.openxmlformats.org/package/2006/metadata/core-properties' "
            w:xpath="/ns1:coreProperties[1]/ns0:creator[1]"
            w:storeItemID="{6C3C8BC8-F283-45AE-878A-BAB7291924A1}" />
          <w15:color w:val="FF00FF" />
          <w:text />
        </w:sdtPr>
        <w:sdtEndPr>
          <w:rPr>
            <w:rStyle w:val="Formatvorlage4" />
          </w:rPr>
        </w:sdtEndPr>
        <w:sdtContent>
          <w:r w:rsidRPr="00545C0B">
            <w:rPr>
              <w:rStyle w:val="Formatvorlage4" />
              <w:rFonts w:ascii="Arial" w:hAnsi="Arial" w:cs="Arial" />
            </w:rPr>
            <w:t>Steinhofer, Melanie</w:t>
          </w:r>
        </w:sdtContent>
      </w:sdt>

Despite having the Formatvorlage4 rStyle in the run properties (rPr), it does not display correctly in the preview!

Steps to Reproduce:
1. Opening the attached Word Document

Actual Results:
"Steinhofer, Melanie" is displayed in normal style

Expected Results:
"Steinhofer, Melanie" is displayed in Formatvorlage4 style


Reproducible: Always


User Profile Reset: No

Additional Info:
The software should display the field with the correct formatting style, which in this example is Formatvorlage4.
Comment 1 Majd Azzam 2024-10-28 10:29:03 UTC
Created attachment 197271 [details]
Test file contains fields, which has specific style
Comment 2 Aron Budea 2025-01-13 06:54:32 UTC
The file contains a few embedded .ODTTF fonts. I'm not sure if they're related to the bug, but I'm fairly sure LO doesn't support those, and they get substituted. Could you try creating a sample without any embedded fonts?
Comment 3 Majd Azzam 2025-01-23 15:49:37 UTC
Thank you for the support.
I will attempt to create a test file without embedded fonts, but I think this is not the main issue, as I have other files without embedded fonts that exhibit the same problem!

On the other hand, how is it possible that the mentioned issue in this bug does not exist in version 7.2 but appears in version 7.6 and 24.8?
In other words, if LibreOffice doesn't support these features, how is it possible that the test file attached to this bug works correctly in version 7.2?

Thank you and best regards
Comment 4 Majd Azzam 2025-01-24 09:57:22 UTC
Created attachment 198730 [details]
Test file contains fields, which has specific style (without embedded fonts)
Comment 5 Majd Azzam 2025-01-24 10:05:12 UTC
Created attachment 198731 [details]
Test file contains fields, which has specific style (without embedded fonts)