Regression Statistics: use cell reference, not fix row to calculate offset
commit02c99f2721d074abc98a0ad28ed2207a77600c79
authorEike Rathke <erack@redhat.com>
Fri, 26 Nov 2021 17:11:31 +0000 (26 18:11 +0100)
committerEike Rathke <erack@redhat.com>
Fri, 26 Nov 2021 21:32:47 +0000 (26 22:32 +0100)
tree71c0494cb3e3492a7c8401583e262866026dac30
parent241733d1d91233b2f3bb996fc55302fb55b6c036
Regression Statistics: use cell reference, not fix row to calculate offset

The INDEX() offset was calculated with a fix row number derived
from the initial output position, like 35-ROW(). That fails if the
range later is moved or rows inserted/deleted.

Instead, use a cell reference of the cell's current column and
end row, like ROW($A$34)+1-ROW(). 34+1 to not have things shifted
if a row is inserted before 35.

Change-Id: I11276c4acb35505576daa1a20ad49a4fcdbaba49
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125914
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit 324e5c3942870749fae0e62c1c11a1400b772584)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125897
sc/source/ui/StatisticsDialogs/RegressionDialog.cxx