Bug 113719 - Pasting text from Microsoft Word into Calc results in OLE object being inserted
Summary: Pasting text from Microsoft Word into Calc results in OLE object being inserted
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.4.2.2 release
Hardware: All Windows (All)
: low trivial
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2017-11-08 15:40 UTC by Michael Bauer
Modified: 2019-11-07 13:22 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 Michael Bauer 2017-11-08 15:40:09 UTC
Description:
Pasting selected text from a word processor (Writer or Word) results in the text being pasted as an image rather than text.

I cannot envisage a user scenario where this is desirable behaviour. If a users selects text, the assumption is that text will be pasted. At best, the insertion of text as image should be an Insert Special but not default behaviour.

Steps to Reproduce:
1.Select text in Word or Writer
2.Ctrl + v in Calc

Actual Results:  
Instead of text, an image is paste

Expected Results:
Text is pasted


Reproducible: Always


User Profile Reset: No



Additional Info:
This is unlikely to be a user profile issue, I tried this on 2 systems (both Windows 10) and the result is the same.


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:56.0) Gecko/20100101 Firefox/56.0
Comment 1 Eike Rathke 2017-11-08 16:00:04 UTC
Sure it's an image and not an *object*? Try double click to see the difference.
Comment 2 Michael Bauer 2017-11-08 16:01:22 UTC
Ok amend wording from "image" to "object" (well spotted) but it's still bonkers default behaviour.
Comment 3 Aschalew 2017-11-09 09:10:54 UTC
can Reproduce
 
Description:
I have tried to reproduce and in my case it seems a bit different. when i copied a text from writer to Calc it works fine but when copy from Calc and paste it in writer it pasted in image format.

Steps to reproduce:
Case 1:
1. select a text 
2. copy and paste it in writer
*in this case it pastes in image format

case 2:
1. select a text in Calc
2. shade it
3. paste it in writer
*in this case paste text 

Windows 10

Version: 5.4.2.2 (x64)
Build ID: 22b09f6418e8c2d508a9eaf86b2399209b0990f4
CPU threads: 8; OS: Windows 6.19; UI render: default; 
Locale: en-US (en_US); Calc: group
Comment 4 Eike Rathke 2017-11-10 20:28:06 UTC
Comment 3 describes something different than comment 0. When copy-pasting (not paste-special) an entire cell or multiple cells from Calc to Writer, the target is an embedded spreadsheet object that you can double click and edit. This is not a bug. If you want only text then paste special and choose Unformatted Text, or to preserve the cell structure and paste as Writer table choose Formatted Text [RTF].

I can not reproduce the original description's Writer to Calc behavior, I get text instead of object (Linux, 5.4.2 and 5.4.3), unless I paste special selecting LibreOffice 5.4 Text Document.
Comment 5 Michael Bauer 2017-11-10 22:02:04 UTC
I believe I was involved in a similar bug where the behaviour on Linux and Windows was markedly different. But I can't put my finger on the bug.
Comment 6 Buovjaga 2017-11-14 19:33:18 UTC
Michael: does this happen with any, freshly created Writer document?
Comment 7 Michael Bauer 2017-11-14 23:33:50 UTC
Writer? Did you mean Calc? Anyway, I opened a new Writer document and a new Calc document, wrote some words, copied them, pasted them into the new Calc document with ctrl v and I get an object, not text in Calc.
Comment 8 Buovjaga 2017-11-15 14:05:44 UTC
(In reply to Michael Bauer from comment #7)
> Writer? Did you mean Calc? Anyway, I opened a new Writer document and a new
> Calc document, wrote some words, copied them, pasted them into the new Calc
> document with ctrl v and I get an object, not text in Calc.

So is the result identical, if you right-click, Paste special and select LibreOffice Text document?
Comment 9 Michael Bauer 2017-11-15 14:37:38 UTC
Paste Special works as expected. This was never about whether Paste Special works or not, this is about the default paste action when using Ctrl C and Ctrl V, pasting text into Calc that ends up being not text.

I cannot see the use case for the default paste action inserting text as an object being bigger than that for pasting text as text. Same for same, both logically and in (my) practical experience dominates.
Comment 10 Buovjaga 2017-11-15 14:49:38 UTC
(In reply to Michael Bauer from comment #9)
> Paste Special works as expected. This was never about whether Paste Special
> works or not, this is about the default paste action when using Ctrl C and
> Ctrl V, pasting text into Calc that ends up being not text.
> 
> I cannot see the use case for the default paste action inserting text as an
> object being bigger than that for pasting text as text. Same for same, both
> logically and in (my) practical experience dominates.

I meant: do you get the same unwanted result, when you Paste Special - Text document? Ie. is your erroneous default action the same as pasting as Text document?
Comment 11 Michael Bauer 2017-11-15 14:53:21 UTC
No, as I said Paste Special works i.e. if I tell it to Paste Special Text Only, I get text.
Comment 12 Buovjaga 2017-11-15 14:56:38 UTC
(In reply to Michael Bauer from comment #11)
> No, as I said Paste Special works i.e. if I tell it to Paste Special Text
> Only, I get text.

No, I did not mean unformatted text, I meant LibreOffice Text document.
That is the only case where I get an object inserted. Please try it.
Comment 13 Michael Bauer 2017-11-15 15:03:41 UTC
So when I open Paste Special, there are 6 options:
*
[RTF]
[Richtext]
HTML
Unformatted
DDE link

* > text inserted as object
RTF > text inserted as text
Richtext > Error, says cannot paste from clipboard
HTML > text inserted as text but smaller pt size, not sure how I'd see if it's HTML
Unformatted > text inserted as text
DDE link > inserts link to the Writer document
Comment 14 raal 2017-11-15 16:49:11 UTC
No repro, Version: 6.0.0.0.alpha0+; win7, but I can repro with 5.4.2. Pasted object is OLE object - editable with double click. In version 6 is default back to paste text.

Please check with dev version.
http://dev-builds.libreoffice.org/daily/master/
Comment 15 Michael Bauer 2017-11-15 17:17:27 UTC
There seems to be a pattern of this coming and going, I am sure I've come across the problem before and then it went away for a while and now it's back. Doing a big of digging, someone reported an OO Calc to LO Calc problem just like that in 2010 (Bug 31077) and Bug 109011 from earlier this year (watch the .gif, it has the same problem except he's pasting from Excel).
Comment 16 Buovjaga 2017-11-16 14:11:36 UTC
(In reply to Michael Bauer from comment #15)
> There seems to be a pattern of this coming and going, I am sure I've come
> across the problem before and then it went away for a while and now it's
> back. Doing a big of digging, someone reported an OO Calc to LO Calc problem
> just like that in 2010 (Bug 31077) and Bug 109011 from earlier this year
> (watch the .gif, it has the same problem except he's pasting from Excel).

Ok, let us know what result you get with https://dev-builds.libreoffice.org/daily/master/Win-x86_64@42/current/
Comment 17 Michael Bauer 2017-11-16 14:29:56 UTC
I will give it a go but if this is a problem that comes and goes, should we not try and identify why it comes and goes? Just because 6.0.0.0 does not seem to have it does not sound like a guarantee it's not going to come back in 6.0.0.1?
Comment 18 Michael Bauer 2017-12-07 15:19:56 UTC
Sorry this too a while. I downloaded that dev version you linked:

1 When pasting from Word, the outcomes is the same, it still results in an OLE object
2 When pasting from Writer, text only is inserted
Comment 19 Buovjaga 2017-12-17 10:18:52 UTC
(In reply to Michael Bauer from comment #18)
> Sorry this too a while. I downloaded that dev version you linked:
> 
> 1 When pasting from Word, the outcomes is the same, it still results in an
> OLE object
> 2 When pasting from Writer, text only is inserted

Ok, so the original problem is corrected so we can close this.
Comment 20 Michael Bauer 2017-12-17 11:39:07 UTC
Errrmm... no? Read the original description? This was always about Word AND Writer:

>1.Select text in Word or Writer

So just because by a fluke Writer seems to be working, this does not resolve the original bug in full.
Comment 21 Buovjaga 2017-12-17 12:56:44 UTC
Ok, let's clarify the summary. I confirmed the default behaviour with MSO 2013 and LibO 6.1 master build.
Comment 22 QA Administrators 2018-12-18 03:42:52 UTC Comment hidden (obsolete)
Comment 23 Michael Bauer 2018-12-18 15:17:21 UTC
Default CTRL-V actions of a text string:

Word > Writer : pastes as text
Word > Calc : pastes as OLE object
Writer & Calc > Writer & Calc : pastes as text
Writer & Calc > Writer & Calc : pastes as text

So yes, still Word > Calc is the only facepalm default action.
Comment 24 Michael Bauer 2018-12-18 15:19:09 UTC
The last line was meant to read:
Writer & Calc > Word & Excel: pastes as text