fdo#75538 R^2 calculation of trendline similar to LINEST function

Modify for forced intercept of trendline, calculation of R^2 in the same
way as LINEST function does calculation
Update fo 4.2

Change-Id: I06ba4e7f5e07f7db150e1bf1070870bf64ad6f61
Reviewed-on: https://gerrit.libreoffice.org/8462
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>