Bug 109343 - Cannot paste formatted text (.rtf) from clipboard on Mac. It comes always unformatted. Still broken in 5.3.6 and 5.4.1
Summary: Cannot paste formatted text (.rtf) from clipboard on Mac. It comes always unf...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.1.2 release
Hardware: x86-64 (AMD64) macOS (All)
: high major
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0 target:5.4.3
Keywords: bibisected, bisected, regression
: 113324 (view as bug list)
Depends on:
Blocks: Clipboard RTF-Paste
  Show dependency treegraph
 
Reported: 2017-07-25 16:47 UTC by Sarvasri
Modified: 2017-11-03 09:36 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sarvasri 2017-07-25 16:47:12 UTC
Description:
When I copy text from TextEdit or Notes on the Mac, which is formatted as RTF, I lose all formatting when pasting. This makes LibreOffice unusable for me because I have lots of text from these two sources to paste into documents.
This used to work on 4.x.x versions of LibreOffice, but I have never had it work on 5.x.x versions so I quit using the program.

Steps to Reproduce:
1. Coply text from TextEdit or Apple Notes to the clipboard
2. Try to paste into LibreOffice Writer
3. All formatting, bold, italic, and font usage is lost

Actual Results:  
Same as above

Expected Results:
I expect the text to paste as formatted text using bold, italic, and all font and paragraph formatting.


Reproducible: Always

User Profile Reset: No, but I have tried on many versions of Writer 5.x.x

Additional Info:
It works on old versions of LibreOffice. Versions 4.x.x but I don't know where I can download those versions. I would like to be able to use the latest version.

Since I lose all formatting data, the program is not usable for me.


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8
Comment 1 Alex Thurgood 2017-07-26 08:13:43 UTC
Confirming with

Version: 5.4.0.3
Build ID: 92c2794a7c181ba4c1c5053618179937228ed1fb
Threads CPU : 4; OS : Mac OS X 10.12.6; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group
Comment 2 Alex Thurgood 2017-07-26 08:16:10 UTC
The formatted data does indeed get copied into Writer on
Version 4.0.5.2 (Build ID: 5464147a081647a250913f19c0715bca595af2f)

Setting as regression
Comment 3 Alex Thurgood 2017-07-26 08:18:30 UTC
Bug also present in LO5251 - setting version to earliest tested where bug reproducible so far.
Comment 4 Alex Thurgood 2017-07-26 08:22:33 UTC
Works in 

Version: 4.4.7.2
Build ID: f3153a8b245191196a4b6b9abd1d0da16eead600
Locale: fr_FR.UTF-8
Comment 5 Alex Thurgood 2017-07-26 08:25:53 UTC
Works in 

Version: 5.0.0.5
Build ID: 1b1a90865e348b492231e1c451437d7a15bb262b
Locale: fr-FR (fr_FR.UTF-8)
Comment 6 Alex Thurgood 2017-07-26 08:29:34 UTC
Also works in 

Version: 5.1.4.2
Build ID: f99d75f39f1c57ebdd7ffc5f42867c12031db97a
CPU Threads: 4; OS Version: Mac OS X 10.12.6; UI Render: default; 
Locale: fr-FR (fr_FR.UTF-8)
Comment 7 Alex Thurgood 2017-07-26 08:33:05 UTC
Fails in

Version: 5.2.1.2
Build ID: 31dd62db80d4e60af04904455ec9c9219178d620
CPU Threads: 4; OS Version: Mac OS X 10.12.6; UI Render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 8 Alex Thurgood 2017-07-26 08:36:55 UTC
Also works in 

Version: 5.1.6.2
Build ID: 07ac168c60a517dba0f0d7bc7540f5afa45f0909
CPU Threads: 4; OS Version: Mac OS X 10.12.6; UI Render: default; 
Locale: fr-FR (fr_FR.UTF-8); Calc: group
Comment 9 Alex Thurgood 2017-07-26 08:37:44 UTC
Bibisect range lies somewhere around 5.2 branch-off
Comment 10 Alex Thurgood 2017-07-26 08:50:01 UTC
Hmmm, trawling through the git log brings up 

https://cgit.freedesktop.org/libreoffice/core/commit/?id=36bf13247b01075b533b127c7e5ffc760f9642f8

which might be the culprit as it was introduced into 5.2 and removed the RichText type

@Oliver : care to take a look ?
Comment 11 Sarvasri 2017-09-12 23:59:33 UTC
Also, the dictation program Dragon Dictate will not work with LibreOffice. This makes the software essentially useless for a writer who needs to paste formatted .rtf text or who dictates.

Pasting .rtf text is still broken in 5.3.6 and 5.4.1.
Comment 12 Oliver Specht (CIB) 2017-09-20 09:54:22 UTC
It should have been fixed with 101828 which has been merged into 5.3 already.
Comment 13 Alex Thurgood 2017-09-20 15:26:45 UTC
(In reply to Oliver Specht (CIB) from comment #12)
> It should have been fixed with 101828 which has been merged into 5.3 already.

Well unfortunately, it still isn't working in :

Version: 5.4.1.2
Build ID: ea7cb86e6eeb2bf3a5af73a8f7777ac570321527
Threads CPU : 8; OS : Mac OS X 10.12.6; UI Render : par défaut; 
Locale : fr-FR (fr_FR.UTF-8); Calc: group
Comment 14 Alex Thurgood 2017-09-20 15:31:46 UTC
Note that a Cmd-C/Cmd-V does not call up the Paste Special dialog in this case.

Even if one forces the issue via Shift-Cmd-V, the only option available in the list of paste formats is "unformatted text".
Comment 15 Telesto 2017-09-29 13:45:25 UTC
 5eaae6b02d47c6033ccb732444d5518e5a72a0c4 is the first bad commit
commit 5eaae6b02d47c6033ccb732444d5518e5a72a0c4
Author: TDF builder <tdf@tb66.local>
Date:   Sun Mar 13 23:03:16 2016 -0500

    source 36bf13247b01075b533b127c7e5ffc760f9642f8
    
    source 36bf13247b01075b533b127c7e5ffc760f9642f8

:040000 040000 f2ebda6670634d444523759cbe64405dea606966 07278f14c488bc49aeb9f875a34c5a071ae693e0 M	LibreOffice.app
demos-MacBook-Air:bibisect-macosx-64-5.2 demo2$ git bisect log
# bad: [b14167be18c74d354242a2c50078e34fe13a42ac] source 3f373500282c926031eed4f995ca8d51402ed187
# good: [dedde5e6cc068309593a282bd04519d0b9f87a6d] source 49c2b9808df8a6b197dec666dfc0cda6321a4306
git bisect start 'origin/master' 'oldest'
# good: [e76fbd00ef965a916a962908bec6901a89ac6f75] source b184b4249d114bafba7d2afd00093747db556d33
git bisect good e76fbd00ef965a916a962908bec6901a89ac6f75
# bad: [e092bb1f1a58a4e335e557ecc249dc66bfdc7480] source e2baeba6e263d3fbc474ed7e5640a8cbc2936768
git bisect bad e092bb1f1a58a4e335e557ecc249dc66bfdc7480
# bad: [09c1596c347d2478fdd821bb320c741657c81257] source 402572e25c0c9eb1f01c928f2ae422ab62a55ba1
git bisect bad 09c1596c347d2478fdd821bb320c741657c81257
# bad: [8ae2449507ea29cc653e763c13ce3320a0533940] source 0417cdceb91160e3e9eb6ada561649a1b15858b2
git bisect bad 8ae2449507ea29cc653e763c13ce3320a0533940
# good: [c6c1b2250b3f320a22b33d7a4e83e3c801f366c2] source c26b4bbcdb0e63579bff4ffe9ada235572c6ff0e
git bisect good c6c1b2250b3f320a22b33d7a4e83e3c801f366c2
# good: [2b3eee36f5b43e13e1c1323af7d964b169d1f33a] source 1f7af133d9bade2cf226b65fab501d68113f8cc6
git bisect good 2b3eee36f5b43e13e1c1323af7d964b169d1f33a
# bad: [3dc43e346d9c747cb64a299eaefa4fc6429adf18] source 85ecc7d1dd54c20cbfc191ef4f4cf945bb59d267
git bisect bad 3dc43e346d9c747cb64a299eaefa4fc6429adf18
# good: [1051c0eecf6d4cf8ebbc63c38290a92529412bee] source f803aae0f318f99eb435c8fe7fc095fcd966d5ce
git bisect good 1051c0eecf6d4cf8ebbc63c38290a92529412bee
# good: [27ec880cc0cc4ee8c3812d7a713950ce3a8348bc] source 3d82b08bcea45408b1998934558e2e28721125df
git bisect good 27ec880cc0cc4ee8c3812d7a713950ce3a8348bc
# bad: [5dd4b822d7f928f1e5244f459d7264794af103f2] source 22d6c786ef60f2db7d9f255b2ee1c35a0590e6a5
git bisect bad 5dd4b822d7f928f1e5244f459d7264794af103f2
# bad: [d4ba7344e2363ed61900a8856a3b4a8d0254ddf6] source 0cc4e711d3d4dd9cf512ef490fabf8395eb46d3f
git bisect bad d4ba7344e2363ed61900a8856a3b4a8d0254ddf6
# bad: [5eaae6b02d47c6033ccb732444d5518e5a72a0c4] source 36bf13247b01075b533b127c7e5ffc760f9642f8
git bisect bad 5eaae6b02d47c6033ccb732444d5518e5a72a0c4
# good: [34f6c6b99734addc0335c10a3d45774f60b2c778] source 416526cfa382d3482042f3c917bcb2bfa178402a
git bisect good 34f6c6b99734addc0335c10a3d45774f60b2c778
# first bad commit: [5eaae6b02d47c6033ccb732444d5518e5a72a0c4] source 36bf13247b01075b533b127c7e5ffc760f9642f8
demos-MacBook-Air:bibisect-macosx-64-5.2 demo2$
Comment 16 Xisco Faulí 2017-10-18 09:55:52 UTC
@Olivier Specht,
What about changing text/rtf to text/rtf https://opengrok.libreoffice.org/xref/core/vcl/osx/DataFlavorMapping.cxx#114??

Could someone check that in a local build on mac ?
Comment 17 Xisco Faulí 2017-10-18 10:01:57 UTC
*text/richtext to text/rtf
Comment 18 Telesto 2017-10-18 14:42:54 UTC
(In reply to Xisco Faulí from comment #17)
What about changing text/rtf to text/rtf https://opengrok.libreoffice.org/xref/core/vcl/osx/DataFlavorMapping.cxx#114??

Done; working! Thanks for the tip Xisco :-)
Comment 19 Xisco Faulí 2017-10-18 14:51:44 UTC
(In reply to Telesto from comment #18)
> (In reply to Xisco Faulí from comment #17)
> What about changing text/rtf to text/rtf
> https://opengrok.libreoffice.org/xref/core/vcl/osx/DataFlavorMapping.
> cxx#114??
> 
> Done; working! Thanks for the tip Xisco :-)

Great, let me crate a patch for it then
Comment 20 Xisco Faulí 2017-10-18 22:10:43 UTC
Gerrit patch: https://gerrit.libreoffice.org/#/c/43513/
Comment 21 Xisco Faulí 2017-10-25 10:58:55 UTC
*** Bug 113324 has been marked as a duplicate of this bug. ***
Comment 22 Commit Notification 2017-10-25 22:55:07 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=dd0bc7323014c528fefb516cacae0591f270862a

tdf#109343 Fix paste as .RTF on Mac

It will be available in 6.0.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2017-10-28 02:13:50 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=671182b8f59e8e390b79b7f3b35535b8c3ec1408&h=libreoffice-5-4

tdf#109343 Fix paste as .RTF on Mac

It will be available in 5.4.4.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Commit Notification 2017-11-02 20:46:11 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "libreoffice-5-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7deb50c028143500b25a6b22d2b4a1483fbec270&h=libreoffice-5-4-3

tdf#109343 Fix paste as .RTF on Mac

It will be available in 5.4.3.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.