Bug 160989

Summary: Exported Word documents do not enforce original formatting of cross-references to differently-formatted text
Product: LibreOffice Reporter: Matthew Kogan <matthew.bugzilla>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: normal CC: dgp-mail, kelemeng, stephane.guillou
Priority: medium    
Version: 7.6.5.2 release   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: TDF160989.docx

Description Matthew Kogan 2024-05-08 14:00:37 UTC
Description:
If you print (or print preview) in Word a docx file exported by LibreOffice that has a cross-reference to some differently-formatted text, the formatting of the cross-reference is updated with the formatting of the bookmarked text.

Steps to Reproduce:
1.Create a heading formatted in 16pt and bold.
2.Select the heading and insert a bookmark.
3.Create a paragraph formatted in 12pt and not bold.
4.Insert a cross-reference to the bookmark into the paragraph.
5.Print preview and note that the formatting of the cross-reference does not change.
6.Save as a docx file.
7.Open the docx file in Word.
8.Print preview.

Actual Results:
The formatting of the cross-reference changes to match the formatting of the bookmarked heading.

Expected Results:
The formatting of the cross-reference should not change.


Reproducible: Always


User Profile Reset: No

Additional Info:
It is possible in Word to manually apply formatting to the cross-reference to keep it from being updated. I think LibreOffice should do this on export (unless there's a better way to achieve it).
Comment 1 Dieter 2024-05-24 10:22:03 UTC
Matthew, thank you for reporting the bug. Could you please
a) Add information from help -> About LibreOffice
b) Attach a sample file created with step 1-4
Thank You

=> NEEDINFO
Comment 2 Matthew Kogan 2024-05-24 10:31:19 UTC
Version: 7.6.5.2 (x86) / LibreOffice Community
Build ID: 38d5f62f85355c192ef5f1dd47c5c0c0c6d6598b
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-GB (en_GB); UI: en-GB
Calc: threaded
Comment 3 Matthew Kogan 2024-05-24 10:31:59 UTC
Created attachment 194331 [details]
TDF160989.docx
Comment 4 Stéphane Guillou (stragu) 2024-05-27 14:29:59 UTC
I can confirm the difference between LO and MS 365, using the sample document:
- LO: never uses bookmarked text's formatting
- MS 365: does not use the source format while editing, but uses it in the PDF export (which I wouldn't like to have for a WYSIWYG app).

I think this is the same request as in bug 77050. What do you think, Matthew?
Comment 5 Matthew Kogan 2024-05-28 14:10:56 UTC
Thank you. It's related, but different. That one seems to be asking for LibreOffice to (optionally) apply (some of) the formatting of the bookmarked text to the cross-reference, and it has nothing to do with exported Word documents (except for a comment that was added by someone else in 2019).

I honestly see this as a bug, not an enhancement. If you've created your document in LibreOffice and it all looks the way you want it to, then you save it to docx and open it in Word, it should look the same, and it doesn't.
Comment 6 QA Administrators 2024-05-29 03:14:58 UTC Comment hidden (obsolete)
Comment 7 Stéphane Guillou (stragu) 2024-05-29 04:05:29 UTC
Gabor, can we have your opinion on this one?