Bug 159525 - Make Simple HTML paste format the preferred instead of RTF
Summary: Make Simple HTML paste format the preferred instead of RTF
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
24.8.0.0 alpha0+ Master
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard: QA:needsComment
Keywords:
Depends on:
Blocks: Paste-From-MSO
  Show dependency treegraph
 
Reported: 2024-02-02 15:58 UTC by Gabor Kelemen (allotropia)
Modified: 2024-02-17 03:13 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
HTML paste from Word in Free Clipboard Viewer (55.34 KB, image/png)
2024-02-02 15:58 UTC, Gabor Kelemen (allotropia)
Details
Result of RTF paste from Word to PP (73.74 KB, image/png)
2024-02-02 15:59 UTC, Gabor Kelemen (allotropia)
Details
Result of HTML paste from Word to PP (76.44 KB, image/png)
2024-02-02 16:00 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
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