Issue 102668 - Sorting causes cell references in formulas to be miscalculated
Summary: Sorting causes cell references in formulas to be miscalculated
Status: CLOSED DUPLICATE of issue 101690
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: DEV300m49
Hardware: Unknown All
: P4 Trivial (vote)
Target Milestone: ---
Assignee: spreadsheet
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-06-11 11:31 UTC by pasco
Modified: 2009-06-11 13:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Real-world data shows bug as well (10.81 KB, application/vnd.oasis.opendocument.spreadsheet)
2009-06-11 11:32 UTC, pasco
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description pasco 2009-06-11 11:31:36 UTC
When sorting a selection of data which contains a formula, the cell references
contained in the formula are not correctly re-calculated to account for the
change in row number.

To reproduce:
Cell A1: 2
Cell A2: 1
Cell B1: Test
Cell B2: =IF(A2=2;"Cell is two";"")

Select all four cells and sort by column A ascending. Cell B2 contains "Test"
which is correct. The cell references in B1 are miscalculated and now refer to
A2 instead of A1, causing the cell to display "Cell is two" which is incorrect.

I have attached the real-world data which I found this bug while using OOO310m11
- which you can see causes quite serious data corruption as this is my
accounting data which would have been damaged had I not realised the effects due
to the colouring.
Comment 1 pasco 2009-06-11 11:32:12 UTC
Created attachment 62915 [details]
Real-world data shows bug as well
Comment 2 niklas.nebel 2009-06-11 13:10:39 UTC
Same as 101690.

*** This issue has been marked as a duplicate of 101690 ***
Comment 3 niklas.nebel 2009-06-11 13:11:05 UTC
closing duplicate