Bug 111079 - Pasted content from text editor is misplaced
Summary: Pasted content from text editor is misplaced
Status: RESOLVED DUPLICATE of bug 115088
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Paste
  Show dependency treegraph
 
Reported: 2017-08-02 10:27 UTC by Gavin Flower
Modified: 2018-01-19 14:16 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
document after inserting contents of lo-540-git-delta.odt (13.34 KB, application/vnd.oasis.opendocument.text)
2017-08-02 10:27 UTC, Gavin Flower
Details
starting document (13.39 KB, application/vnd.oasis.opendocument.text)
2017-08-02 10:27 UTC, Gavin Flower
Details
insertion text in odt format (11.01 KB, application/vnd.oasis.opendocument.text)
2017-08-02 10:29 UTC, Gavin Flower
Details
inersition text in simple ASCII format (854 bytes, text/plain)
2017-08-02 10:29 UTC, Gavin Flower
Details
result of inserting text in simple ASCII format (deleted)
2017-08-02 10:31 UTC, Gavin Flower
Details
result of inserting text in simple ASCII format (13.26 KB, application/vnd.oasis.opendocument.text)
2017-08-02 10:36 UTC, Gavin Flower
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gavin Flower 2017-08-02 10:27:19 UTC
Created attachment 135064 [details]
document after inserting contents of lo-540-git-delta.odt

When I select all the text in lo-540-git-delta.odt,
do a CTRL-C,
place the cursor just before the first character in lo-540-git-a.odt,
then do a CTRL-V,
I get what is in lo-540-git-b.odt.

However, if I past what's in lo-540-git-delta.txt, I get lo-540-git-c.odt!
Comment 1 Gavin Flower 2017-08-02 10:27:59 UTC
Created attachment 135065 [details]
starting document
Comment 2 Gavin Flower 2017-08-02 10:29:03 UTC
Created attachment 135066 [details]
insertion text in odt format
Comment 3 Gavin Flower 2017-08-02 10:29:59 UTC
Created attachment 135067 [details]
inersition text in simple ASCII format
Comment 4 Gavin Flower 2017-08-02 10:31:40 UTC
Created attachment 135068 [details]
result of inserting text in simple ASCII format
Comment 5 Gavin Flower 2017-08-02 10:36:27 UTC
Created attachment 135069 [details]
result of inserting text in simple ASCII format
Comment 6 Gavin Flower 2017-08-02 10:42:58 UTC Comment hidden (obsolete)
Comment 7 Xisco Faulí 2017-08-02 21:48:39 UTC Comment hidden (obsolete)
Comment 8 Buovjaga 2017-08-03 11:28:08 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2017-08-03 11:52:47 UTC
Steps to reproduce:

1. Download attachment 135065 [details] and attachment 135067 [details]
2. Open lo-540-git-a.odt in LibreOffice and lo-540-git-delta.txt in your favourite text editor
3. Select all contents of lo-540-git-delta.txt and copy
4. In lo-540-git-a.odt, move the text cursor just before the W in Wed in the second paragraph
5. Paste

Result is that the clipboard contents is pasted after the paragraph instead of before it!!

Further, if you now undo, it will remove the "Wed" paragraph completely, but leave this intact: " real floating windows better"

Reporter said in private conversation that this is not reproduced in 5.3.4 and I confirmed it does not exist in 3.6.

From the contents.xml of lo-540-git-a.odt:

<text:p text:style-name="P70" />
<text:p text:style-name="P70">Wed Aug <text:s />2 11:37:12 NZST 2017</text:p>
<text:p text:style-name="P148">8b85fd64 Typo: usnig-&gt;using</text:p>

Arch Linux 64-bit, KDE Plasma 5
Version: 6.0.0.0.alpha0+
Build ID: 166f13ef65b4a0eb9927eff2ffe5bac319785ee7
CPU threads: 8; OS: Linux 4.12; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on August 3rd 2017

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 10 raal 2017-08-05 09:10:19 UTC
This seems to have begun at the below commit.
Adding Cc: to Michael Meeks ; Could you possibly take a look at this one?
Thanks
 f8257f889e536b197f64c6789205a1a80e050653 is the first bad commit
commit f8257f889e536b197f64c6789205a1a80e050653
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Wed Apr 26 06:40:25 2017 +0200

    source e68b6e349c31ac1376e90218013e1e7612f2b522

author	Michael Meeks <michael.meeks@collabora.com>	2017-04-24 13:58:54 (GMT)
committer	Michael Meeks <michael.meeks@collabora.com>	2017-04-25 14:49:41 (GMT)
commit e68b6e349c31ac1376e90218013e1e7612f2b522 (patch)
tree b1c19255d11dc1e99c08b71b4ae12e31412bef7b
parent dec025d4cb51f252ecd7e981fe36800cf2bedff5 (diff)
Optimize plain-text import.
Cost of managing rsids is very significant >50% of import time, new
Rsids will be generated for changes anyway.
Also avoid un-necessary splitting of paragraphs on new-line.
Comment 11 Tamás Zolnai 2018-01-19 14:16:58 UTC

*** This bug has been marked as a duplicate of bug 115088 ***