[Libreoffice-commits] core.git: Branch 'libreoffice-6-4-3' - sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Apr 1 08:43:40 UTC 2020
sc/source/core/tool/interpr8.cxx | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 69cd327c65bd0af169c9330bbc1f4a47c975c0d3
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Thu Mar 26 15:46:07 2020 +0000
Commit: Michael Stahl <michael.stahl at cib.de>
CommitDate: Wed Apr 1 10:43:09 2020 +0200
tdf#131380 crash on loading specific xlsx document
mpPerIdx is null, because bEDS is true, assume 0 in this case
Change-Id: I44c2433b0de57a28cece6b9b01ba543bdc3cb8d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91145
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 0f5e930fffbe2151ffadc8461449e55015617f65)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91166
(cherry picked from commit 9ad9c9b869d8ead906283ed363ce0067d5570e06)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91173
Reviewed-by: Xisco Faulí <xiscofauli at libreoffice.org>
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
Tested-by: Michael Stahl <michael.stahl at cib.de>
diff --git a/sc/source/core/tool/interpr8.cxx b/sc/source/core/tool/interpr8.cxx
index 9738c2ce7421..ce4234d0853e 100644
--- a/sc/source/core/tool/interpr8.cxx
+++ b/sc/source/core/tool/interpr8.cxx
@@ -993,17 +993,18 @@ void ScETSForecastCalculation::GetETSPredictionIntervals( const ScMatrixRef& rTM
// fill array with forecasts, with RandDev() added to xScenRange
if ( bAdditive )
{
+ double nPIdx = !bEDS ? mpPerIdx[mnCount - mnSmplInPrd] : 0.0;
// calculation based on additive model
xScenRange[ 0 ] = mpBase[ mnCount - 1 ] + mpTrend[ mnCount - 1 ] +
- mpPerIdx[ mnCount - mnSmplInPrd ] +
+ nPIdx +
RandDev();
aPredictions[ 0 ][ k ] = xScenRange[ 0 ];
- xScenBase[ 0 ] = mfAlpha * ( xScenRange[ 0 ] - mpPerIdx[ mnCount - mnSmplInPrd ] ) +
+ xScenBase[ 0 ] = mfAlpha * ( xScenRange[ 0 ] - nPIdx ) +
( 1 - mfAlpha ) * ( mpBase[ mnCount - 1 ] + mpTrend[ mnCount - 1 ] );
xScenTrend[ 0 ] = mfGamma * ( xScenBase[ 0 ] - mpBase[ mnCount - 1 ] ) +
( 1 - mfGamma ) * mpTrend[ mnCount - 1 ];
xScenPerIdx[ 0 ] = mfBeta * ( xScenRange[ 0 ] - xScenBase[ 0 ] ) +
- ( 1 - mfBeta ) * mpPerIdx[ mnCount - mnSmplInPrd ];
+ ( 1 - mfBeta ) * nPIdx;
for ( SCSIZE i = 1; i < nSize; i++ )
{
double fPerIdx;
More information about the Libreoffice-commits
mailing list