Bug 159525

Summary: Make Simple HTML paste format the preferred instead of RTF
Product: LibreOffice Reporter: Gabor Kelemen (allotropia) <kelemeng>
Component: LibreOfficeAssignee: Not Assigned <libreoffice-bugs>
Status: UNCONFIRMED ---    
Severity: enhancement    
Priority: medium    
Version: 24.8.0.0 alpha0+   
Hardware: All   
OS: All   
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=157363
Whiteboard: QA:needsComment
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 103411    
Attachments: HTML paste from Word in Free Clipboard Viewer
Result of RTF paste from Word to PP
Result of HTML paste from Word to PP

Description Gabor Kelemen (allotropia) 2024-02-02 15:58:34 UTC
Created attachment 192347 [details]
HTML paste from Word in Free Clipboard Viewer

This is a followup to bug 157363

In cases when an external app (in our cases: MSO apps) puts copied content in HTML and RTF format to the clipboard, it could be useful to have an option to prefer the HTML format as default paste format over RTF, as some apps (such as MSO) may put more content into HTML compared to RTF.

1. Open attachment 192289 [details] from bug 159478 (but really any complicated document should do) in Word
2. Copy everything
3. In PowerPoint go to Paste - Paste Special
4.a Insert the content as HTML
-> There is a table pasted. The font formatting is however lost (e.g. FAX is not in large bold font)
4.b Insert the content as RTF
-> No table, only text is pasted. Font formatting is retained.

So both source formats have pros and cons, it may make sense to:
(1) make it configurable via a config key that can be tweaked per deployment.

(2) Another option may be to actually look inside the clipboard content and check for something like this:
<meta name=Generator content="Microsoft Word 15">
<meta name=Generator content="Microsoft PowerPoint 15">
and if this is found in the HTML clipboard content, prefer this automatically.
Comment 1 Gabor Kelemen (allotropia) 2024-02-02 15:59:44 UTC
Created attachment 192348 [details]
Result of RTF paste from Word to PP

Just to demonstrate how it looks elsewhere. In LO, interpretation of the content may be different.
Comment 2 Gabor Kelemen (allotropia) 2024-02-02 16:00:16 UTC
Created attachment 192349 [details]
Result of HTML paste from Word to PP