| commit | 1ed6f4ba6fcae232705d005de6fcbdcc8769585f | [log] |
|---|---|---|
| author | Eike Rathke <erack@redhat.com> | Mon Oct 16 20:35:13 2023 +0200 |
| committer | Caolán McNamara <caolan.mcnamara@collabora.com> | Sat Oct 21 17:31:48 2023 +0200 |
| tree | b13e8512b274c557464d8d0d5a2e357ba0eb1029 | |
| parent | 249751d2bc4c6c6704c00c83a807a3a0c0a31288 [diff] |
Resolves: tdf#157797 Let GetCellValue() propagate previous error, if any Change-Id: I27ee8d19e4f45bef81e133c82ac17b825790208f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158064 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Jenkins (cherry picked from commit aa2632885d8b169016ce8f888cc04796544213b0) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158040 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx index 45ae430..2907218 100644 --- a/sc/source/core/tool/interpr4.cxx +++ b/sc/source/core/tool/interpr4.cxx
@@ -180,7 +180,9 @@ double ScInterpreter::GetCellValue( const ScAddress& rPos, ScRefCellValue& rCell FormulaError nErr = nGlobalError; nGlobalError = FormulaError::NONE; double nVal = GetCellValueOrZero(rPos, rCell); if ( nGlobalError == FormulaError::NONE || nGlobalError == FormulaError::CellNoValue ) // Propagate previous error, if any; nGlobalError==CellNoValue is not an // error here, preserve previous error or non-error. if (nErr != FormulaError::NONE || nGlobalError == FormulaError::CellNoValue) nGlobalError = nErr; return nVal; }