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

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

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