228e4d
From d8dea30b52fc6c787443e09f2872b24ef0d4f159 Mon Sep 17 00:00:00 2001
228e4d
From: Eike Rathke <erack@redhat.com>
228e4d
Date: Mon, 27 Feb 2023 16:10:06 +0100
228e4d
Subject: [PATCH] Always push a result, even if it's only an error
228e4d
228e4d
PERCENTILE() and QUARTILE() if an error was passed as argument (or
228e4d
an error encountered during obtaining arguments) omitted to push
228e4d
an error result, only setting the error.
228e4d
228e4d
Fallout from
228e4d
228e4d
    commit f336f63da900d76c2bf6e5690f1c8a7bd15a0aa2
228e4d
    CommitDate: Thu Mar 3 16:28:59 2016 +0000
228e4d
228e4d
        tdf#94635 Add FORECAST.ETS functions to Calc
228e4d
228e4d
Change-Id: I23e276fb0ce735cfd6383cc963446499dcf819f4
228e4d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147922
228e4d
Reviewed-by: Eike Rathke <erack@redhat.com>
228e4d
Tested-by: Jenkins
228e4d
(cherry picked from commit 64914560e279c71ff1233f4bab851e2a292797e6)
228e4d
228e4d
erAck: backported to 5.3.6.1
228e4d
---
228e4d
 sc/source/core/tool/interpr3.cxx | 4 ++--
228e4d
 1 file changed, 2 insertions(+), 2 deletions(-)
228e4d
228e4d
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
228e4d
index 77767f8..cdac1f6 100644
228e4d
--- a/sc/source/core/tool/interpr3.cxx
228e4d
+++ b/sc/source/core/tool/interpr3.cxx
228e4d
@@ -3392,7 +3392,7 @@ void ScInterpreter::ScPercentile( bool bInclusive )
228e4d
     GetNumberSequenceArray( 1, aArray, false );
228e4d
     if ( aArray.empty() || aArray.size() == 0 || nGlobalError != FormulaError::NONE )
228e4d
     {
228e4d
-        SetError( FormulaError::NoValue );
228e4d
+        PushNoValue();
228e4d
         return;
228e4d
     }
228e4d
     if ( bInclusive )
228e4d
@@ -3415,7 +3415,7 @@ void ScInterpreter::ScQuartile( bool bInclusive )
228e4d
     GetNumberSequenceArray( 1, aArray, false );
228e4d
     if ( aArray.empty() || aArray.size() == 0 || nGlobalError != FormulaError::NONE )
228e4d
     {
228e4d
-        SetError( FormulaError::NoValue );
228e4d
+        PushNoValue();
228e4d
         return;
228e4d
     }
228e4d
     if ( bInclusive )
228e4d
-- 
228e4d
2.44.0
228e4d