Bug 63094 - EDITING: Pasting text copied from MS Word (Mac) inserts text plus multiple comments containing XML
Summary: EDITING: Pasting text copied from MS Word (Mac) inserts text plus multiple co...
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: x86-64 (AMD64) macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: macOS-UI-polish
  Show dependency treegraph
 
Reported: 2013-04-04 01:38 UTC by cejpersonal
Modified: 2018-06-14 20:54 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
An .odt file created by Writer, containing extraneous comments created during a textual paste operation (10.44 KB, application/vnd.oasis.opendocument.text)
2013-04-04 01:38 UTC, cejpersonal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description cejpersonal 2013-04-04 01:38:18 UTC
Created attachment 77397 [details]
An .odt file created by Writer, containing extraneous comments created during a textual paste operation

I'm using a Mac running OS X 10.8.3 and Microsoft Word 2011 version 14.2.3, in which I have a document open for editing. I'm copying selections of text and pasting them into LibreOffice Writer (version 4.0.1.2, Build ID: 84102822e3d61eb989ddd325abf1ac077904985, TinderBox: MacOSX TDF Release, Branch:libreoffice-4-0, Time: 2013-02-27_17:15:43)

Each time I paste, the desired text is pasted along with six comments, each of which contains a fragment of XML from the clipboard.

The source document in MS Word is a .doc file; the destination in Writer is an .odt file. I will create and attach a new sample .odt so you may examine the phantom comments.
Comment 1 cejpersonal 2013-04-04 01:41:49 UTC
I'm correcting the Writer version number in the Bugzilla dropdown. Either it didn't appear or I didn't notice that dropdown a few moments ago when I originally submitted the bug report.
Comment 2 Jorendc 2013-04-08 18:32:48 UTC
I can reproduce this behavior using Mac OSX 10.8.3 with LibreOffice Version 4.0.2.2 (Build ID: 4c82dcdd6efcd48b1d8bba66bfe1989deee49c3)
TinderBox: MacOSX TDF Release, Branch:libreoffice-4-0, Time: 2013-03-26_15:52:16 and Word for Mac 2011 version 14.3.1.

Kind regards,
Joren
Comment 3 V Stuart Foote 2013-04-08 19:45:53 UTC
Looks to be a bit incomplete on the steps to reproduce.

Please clarify if you are using command-C and command-V accelerators, or if you are using the Edit menus, or some mix of both to add to and paste from the clipboard when moving between the documents.

Also, are both documents open in LibreOffice? Or one in Word 2011 and the target in LibreOffice 4.0.x? Any improvement when doing one or the other?
Comment 4 Jorendc 2013-04-08 19:55:04 UTC
(In reply to comment #3)

> Please clarify if you are using command-C and command-V accelerators, or if
> you are using the Edit menus, or some mix of both to add to and paste from
> the clipboard when moving between the documents.

In any way. Use only cmd+C and Cmd+V, use menu entries to copy and cmd+V to paste, use cmd+C to copy and menu entries to paste... Also cmd+x (cut) is affected.
 
> Also, are both documents open in LibreOffice? Or one in Word 2011 and the
> target in LibreOffice 4.0.x? Any improvement when doing one or the other?

Open one empty text document in LibreOffice, open a random document in Word 2011. Cut/copy text from Word 2011 to LibreOffice.

Reproducible in all mentioned ways.

I hope it's a bit more clear :)?

Kind regards,
Joren
Comment 5 V Stuart Foote 2013-04-08 21:37:32 UTC
(In reply to comment #4)
Sure, but is there a clean paste when using menu Edit -> Paste Special -> "Unformatted text"? I.e. showing the extraneous XML could be corrupted MS XMLS or ODF mis-formatting.

Will the Word 2011 documents open directly for editing in LibreOffice Writer? Do they show any misconfiguration there?

What about a copy & paste function between two documents opened only in LibreOffice writer? Or only between two Word 2011 instances (although we don't care too much about that).
Comment 6 Jorendc 2013-04-08 21:44:54 UTC
Good questions deserve good answers. My try to provide good answers ;-) :

(In reply to comment #5)
> (In reply to comment #4)
> Sure, but is there a clean paste when using menu Edit -> Paste Special ->
> "Unformatted text"? I.e. showing the extraneous XML could be corrupted MS
> XMLS or ODF mis-formatting.

Paste with "unformatted text" doesn't result in this behavior.
 
> Will the Word 2011 documents open directly for editing in LibreOffice
> Writer? Do they show any misconfiguration there?

They open correctly yes. This is reproducible with 4 documents (both doc as well as docx), so it isn't just a specific file that causes the behavior.
 
> What about a copy & paste function between two documents opened only in
> LibreOffice writer? 

No problem with that, this is only a Word (for Mac 2011) to LibreOffice problem.

>Or only between two Word 2011 instances (although we
> don't care too much about that).

Also not reproducible when copying text from Word to Word.

Kind regards,
Joren
Comment 7 QA Administrators 2015-03-04 02:18:13 UTC Comment hidden (obsolete)
Comment 8 Alex Thurgood 2015-03-25 17:11:53 UTC
Confirming that problem still present with LO 4412.

I even tried with the lates beta release of Word for Mac, and the results are the same. Copying a selected text from a Word document (doc or docx) using Cmd-C/V or via the menu inserts comments into the Writer document. These comments contain the following XML strings :
<!--StartFragment--> and <!--EndFragment-->
Comment 9 tommy27 2016-04-16 07:24:16 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2017-05-22 13:25:11 UTC Comment hidden (obsolete)
Comment 11 eisa01 2017-08-26 16:30:12 UTC
Still present

Copying text from latest Word 2016 (15.36) to latest release of LibreOffice results in lots of comments with xml, as in the test file

This was also present in 3.3, so inherited from OpenOffice
Comment 12 eisa01 2018-06-14 20:54:50 UTC
This works for me now

Version: 6.2.0.0.alpha0+
Build ID: b292a27698e85fd9d60c03613c3b0c67835c4dc1
CPU threads: 2; OS: Mac OS X 10.12.6; UI render: default; 
TinderBox: MacOSX-x86_64@49-TDF, Branch:master, Time: 2018-06-06_23:25:55
Locale: en-US (en_US.UTF-8); Calc: group threaded