Bug 145751 - Inserting rows or columns
Summary: Inserting rows or columns
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-18 09:42 UTC by gmarco
Modified: 2021-11-18 16:09 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
calc sample test (12.87 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-11-18 09:43 UTC, gmarco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description gmarco 2021-11-18 09:42:20 UTC
By inserting rows or columns above the row/column of the total, the formula =SUM is not modified correspondingly giving an incorrect result.
(see attached test, noting that the decimal separator is comma (IT))
Comment 1 gmarco 2021-11-18 09:43:38 UTC
Created attachment 176331 [details]
calc sample test
Comment 2 Mike Kaganski 2021-11-18 10:08:43 UTC
Options->Calc->General; [x] Expand references when new columns/rows are inserted
Comment 3 gmarco 2021-11-18 15:24:11 UTC
Well, ok, but the problem did not occur inserting a line for example above the previous line 5 or 6 (referring to the attached test).
What is the reason?
That option generically says "Expand references when new columns / rows are inserted" and not "... when are inserted above a total line".
Comment 4 Mike Kaganski 2021-11-18 15:32:13 UTC
(In reply to gmarco from comment #3)

When you insert a row in the middle of a range, your range is technically not expanded - in the sense that the specific rows/columns (not their numbers! the rows/columns as entities), that formulas refer to, are unchanged.

OTOH, when you insert above the SUM, the range should change: its last row now should become different entity. And that needs changing the internal references, unlike the first case.

People will never need the former case to behave differently; but people may want the latter case to behave differently. Hence the preference.
Comment 5 gmarco 2021-11-18 16:09:06 UTC
(In reply to Mike Kaganski from comment #4)
> (In reply to gmarco from comment #3)
> 
> When you insert a row in the middle of a range, your range is technically
> not expanded - in the sense that the specific rows/columns (not their
> numbers! the rows/columns as entities), 
> 

I adapt to the answer, but to say "that formulas refer to, are unchanged" is hardly understandable (my deficit) because the formula =SUM(x:y) is always adapted to the new range except in the case initially represented.