Bug 76912 - Other: Bad reference adjustment when inserting multiple lines at once
Summary: Other: Bad reference adjustment when inserting multiple lines at once
Status: RESOLVED DUPLICATE of bug 77647
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.0.6.2 release
Hardware: Other All
: highest major
Assignee: Kohei Yoshida
URL:
Whiteboard: BSA target:4.3.0
Keywords: regression
Depends on:
Blocks: mab4.2
  Show dependency treegraph
 
Reported: 2014-04-01 17:23 UTC by andre.piotrowski
Modified: 2014-04-29 17:33 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A short sample with erroneous references ("Tabelle 2") after inserting multiple lines at once. (27.90 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-04-01 17:23 UTC, andre.piotrowski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description andre.piotrowski 2014-04-01 17:23:42 UTC
Created attachment 96740 [details]
A short sample with erroneous references ("Tabelle 2") after inserting multiple lines at once.

Problem description: 
Reference adjustment is erroneous when multiple lines are inserted at once. See attached document.

Steps to reproduce:
1. "Tabelle 1" contains the starting point.
2. "Tabelle 2" is a copy of "Tabelle 1"; then I inserted lines 2 to 6 at once.
3. "Tabelle 3" is the same, but lines 2 to 6 inserted individually.

Current behavior:
"Tabelle 2" is erroneous, since the references aren't adjusted the right way.

Expected behavior:
"Tabelle 2" should look exactly as "Tabelle 3".

SYSTEM:
Linux Mint 16 64-bit (Ubuntu)
Oracle Java 8

Operating System: Linux (Other)
Version: 4.2.2.1 release
Comment 1 m_a_riosv 2014-04-01 20:02:32 UTC
Hi andre, thanks for reporting.

Reproducible with:
Win7x64Ultimate.
Version 4.0.6.2 (Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24)
Version: 4.2.2.1 Build ID: 3be8cda0bddd8e430d8cda1ebfd581265cca5a0f
Version: 4.2.4.0.0+ Build ID: d6bc8ed3356d88231cca0306790f300517b7fae2
   TinderBox: Win-x86@42, Branch:libreoffice-4-2, Time: 2014-03-28_16:43:41
Version: 4.3.0.0.alpha0+ Build ID: b6a43bcbbf9e9a5655fd36fd4c8ef72d585f67b0
   TinderBox: Win-x86@39, Branch:master, Time: 2014-03-30_06:16:21

Last working:
Versión 3.6.7.2 (ID de compilación: e183d5b)

The issue seems to be, that when there is a multi cell range the first address is not updated, while inserting more than one row a time, no different if it's a relative or absolute address, but when the group of rows to insert begin above or in the same row and ends beyond the cell where the range is.

Added to MAB 4.2
Comment 2 Andras Timar 2014-04-18 19:38:43 UTC
*** Bug 77647 has been marked as a duplicate of this bug. ***
Comment 3 VLB 2014-04-18 20:49:32 UTC
bug 77647 is only from 4.2.0 the issue and was in 4.1.5 correct!!
Comment 4 Kohei Yoshida 2014-04-29 15:59:12 UTC
I just tested it with the latests of 4.0 and 4.1 and it seems to work fine with those versions.
Comment 5 Kohei Yoshida 2014-04-29 17:30:16 UTC
Actually this *is* a duplicate of Bug 77647.  After fixing that one this bug no longer is reproducible.

*** This bug has been marked as a duplicate of bug 77647 ***
Comment 6 Commit Notification 2014-04-29 17:33:14 UTC
Kohei Yoshida committed a patch related to this issue.
It has been pushed to "master":

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

fdo#76912: Write a test for this.



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 7 Kohei Yoshida 2014-04-29 17:33:39 UTC
I just wrote a test for this, but no separate fix is necessary.