Bug 104554 - Pasting columns between tables have unexpected behaviours
Summary: Pasting columns between tables have unexpected behaviours
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.0.0.beta1
Hardware: All All
: medium normal
Assignee: Julien Nabet
URL:
Whiteboard: target:5.4.0 target:5.3.0.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2016-12-10 13:05 UTC by madmalkav
Modified: 2016-12-15 06:18 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Weird paste (156.49 KB, image/png)
2016-12-10 13:06 UTC, madmalkav
Details
Writer table copy-paste bug (9.90 KB, application/vnd.oasis.opendocument.text)
2016-12-11 23:41 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description madmalkav 2016-12-10 13:05:59 UTC
Description:
Pasting columns from tables to tables works OK if you preselect the destination cells, if not if fails in what seems to be different manners for reasons I was unable to figure out.

Steps to Reproduce:
1. Copy a column
2. Paste it inside the same table or another one without preselecting destination cells

Actual Results:  
Column is pasted disordered, missing cells, or other looking random behaviours.

Expected Results:
Column paste as a column.


Reproducible: Always

User Profile Reset: No

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2840.99 Safari/537.36
Comment 1 madmalkav 2016-12-10 13:06:58 UTC
Created attachment 129459 [details]
Weird paste

Pasting a column from the first rows to the last ones.
Comment 2 Aron Budea 2016-12-11 23:41:03 UTC
Created attachment 129507 [details]
Writer table copy-paste bug

Confirmed with 5.3beta1 / Windows 7. Works fine with 5.2.3.3.
=> regression.

To reproduce, open the attached document, and copy the "1"s from 1st column [1, 1, 1, 1, 1] to the 6th row of 3rd, 4th or 5th column:
starting with 7th row the entries are shifted to the right, or not visible at all.

Bibisected to the commit below.
Adding Cc: to Noel Grandin, please take a look.

https://cgit.freedesktop.org/libreoffice/core/commit/?id=9e9e7bd3c9dc9a3149436916e747c7f7ee040621
author	Noel Grandin <noel@peralex.com>	2016-09-01 07:35:43 (GMT)
committer	Noel Grandin <noel@peralex.com>	2016-09-01 09:05:21 (GMT)

"std::list<sal_uLong> to deque"
Comment 3 Aron Budea 2016-12-11 23:41:26 UTC Comment hidden (bibisection)
Comment 4 Noel Grandin 2016-12-12 07:57:16 UTC
That commit was reverted in 
   1a583283d6b58c8951cb52faac82ecb24fdbf1b3
and then re-applied (in a fixed form) in 
   f0fa43ea99ac7564f2cc7ca1d997831808056b68

So this should be fixed already? Unless we have more than one cause.
Comment 5 madmalkav 2016-12-12 08:01:42 UTC
I tested it with the build recommended on the IRC's chat for this last bughunting sessions, IIRC it was the December 8th daily.

If the commit you talk about is more recent, I can download a newer daily and retest tonight.
Comment 6 Aron Budea 2016-12-12 22:01:54 UTC
(In reply to Noel Grandin from comment #4)
> That commit was reverted in 
>    1a583283d6b58c8951cb52faac82ecb24fdbf1b3
> and then re-applied (in a fixed form) in 
>    f0fa43ea99ac7564f2cc7ca1d997831808056b68
> 
> So this should be fixed already? Unless we have more than one cause.

I'd assume the bibisect jumped through that commit range. I just checked with the commit in the repo corresponding to f0fa43ea99ac7564f2cc7ca1d997831808056b68 and the preceding one, and the observation is:
-f0fa43ea99ac7564f2cc7ca1d997831808056b68: exhibits the bug,
-4c62de279a6783236a5e0811d0733e107c127fe3 (preceding commit): doesn't exhibit the bug.

So the fix must've been for a different issue.
Julien, are you interested in this one?
Comment 7 Julien Nabet 2016-12-14 20:46:44 UTC
I submitted a patch to gerrit review, see https://gerrit.libreoffice.org/#/c/32020/
Comment 8 Commit Notification 2016-12-15 06:15:57 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

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

tdf#104554: fix iterator calculus

It will be available in 5.4.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 9 Commit Notification 2016-12-15 06:18:13 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "libreoffice-5-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=39e6f271d1b0e91456d2dc5f14fad7191ce6bb13&h=libreoffice-5-3

tdf#104554: fix iterator calculus

It will be available in 5.3.0.1.

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.