diff options
author | Eike Rathke <erack@redhat.com> | 2015-10-09 16:25:10 +0000 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-10-09 16:25:55 +0000 |
commit | c366c0ff5c9d3511a87ff1004a24a5a70f11ab8e (patch) | |
tree | 071bc5a64ee6aaa1f23a73159815da94c538ebb0 /sc | |
parent | tdf#94679 Writer: fix lost selection with Shift-PageDown (diff) | |
download | core-c366c0ff5c9d3511a87ff1004a24a5a70f11ab8e.tar.gz core-c366c0ff5c9d3511a87ff1004a24a5a70f11ab8e.zip |
Revert "Resolves: tdf#94869 propagate error when obtaining a scalar double value"
This reverts commit bfd51e38599d717a3c1b19acd882b52175dd3d09.
Calculating with NaN cries for even more problems..
Change-Id: Ie1b7cddc4f157859ee3087b0eadb3a082672a1c7
Reviewed-on: https://gerrit.libreoffice.org/19286
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/interpr4.cxx | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index e3517439c3d4..9d4821c2f7f3 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx @@ -1082,7 +1082,7 @@ double ScInterpreter::PopDouble() } else SetError( errUnknownStackVariable); - return CreateDoubleError( nGlobalError); + return 0.0; } svl::SharedString ScInterpreter::PopString() @@ -2186,10 +2186,7 @@ bool ScInterpreter::DoubleRefToPosSingleRef( const ScRange& rRange, ScAddress& r double ScInterpreter::GetDoubleFromMatrix(const ScMatrixRef& pMat) { if (!pMat) - { - SetError( errParameterExpected); - return CreateDoubleError( nGlobalError); - } + return 0.0; if ( !pJumpMatrix ) return pMat->GetDouble( 0 ); @@ -2202,7 +2199,7 @@ double ScInterpreter::GetDoubleFromMatrix(const ScMatrixRef& pMat) return pMat->GetDouble( nC, nR); SetError( errNoValue); - return CreateDoubleError( nGlobalError); + return 0.0; } double ScInterpreter::GetDouble() @@ -2236,6 +2233,8 @@ double ScInterpreter::GetDouble() aCell.assign(*pDok, aAdr); nVal = GetCellValue(aAdr, aCell); } + else + nVal = 0.0; } break; case svExternalSingleRef: @@ -2264,6 +2263,7 @@ double ScInterpreter::GetDouble() break; case svError: PopError(); + nVal = 0.0; break; case svEmptyCell: case svMissing: @@ -2273,16 +2273,8 @@ double ScInterpreter::GetDouble() default: PopError(); SetError( errIllegalParameter); + nVal = 0.0; } - - // Propagate error also as double error, so matrix operations where one - // operand is a scalar get that propagated if there is no specific - // nGlobalError check, and when the matrix is pushed the error is cleared - // because the matrix is assumed to hold double errors at the corresponding - // positions. See PushMatrix(). - if (nGlobalError) - nVal = CreateDoubleError( nGlobalError); - if ( nFuncFmtType == nCurFmtType ) nFuncFmtIndex = nCurFmtIndex; return nVal; |