sc/source/core/tool/interpr3.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 08b4ff03606540f8366217be8096e147f47dee49 Author: Eike Rathke <er...@redhat.com> AuthorDate: Sat Mar 4 19:36:30 2023 +0100 Commit: Eike Rathke <er...@redhat.com> CommitDate: Sat Mar 4 21:52:14 2023 +0000 Comment that LARGE()/SMALL() rank svDoubleRef can not be hit in array mode Change-Id: I8df18b3164941cbf7f58317c2effec05ac0cb492 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148255 Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Jenkins diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index c20d7e0327e1..25fdf94e7f78 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -3906,6 +3906,12 @@ std::vector<double> ScInterpreter::GetTopNumberArray( SCSIZE& rCol, SCSIZE& rRow aArray.push_back(fCellVal); while (aValIter.GetNext(fCellVal, nErr) && nErr == FormulaError::NONE); } + // Note that SMALL() and LARGE() rank parameters (2nd) have + // ParamClass::Value, so in array mode this is never hit and + // argument was converted to matrix instead, but for normal + // evaluation any non-numeric value including empty cell will + // result in error anyway, so just clear and propagate an existing + // error here already. if (aArray.size() != rCol * rRow) { aArray.clear();