From ccbebd991b6bbce30d10b88f464140338f706c5b Mon Sep 17 00:00:00 2001 From: Winfried Donkers Date: Fri, 4 Oct 2013 17:56:04 +0200 Subject: fdo#70000 add support for COVARIANCE.P and COVARIANCE.S functions These functions have been introduced with Excel 2010, but were not supported yet in calc. COVARIANCE.P (population) replaces the COVAR function, but the COVAR function remains present (in Excel as well as in calc). COVARIANCE.S (sample) is a new function. Change-Id: If5501b4090fb716adfb3d121c7898528fd1b7ad4 Reviewed-on: https://gerrit.libreoffice.org/6135 Reviewed-by: Eike Rathke Tested-by: Eike Rathke --- include/formula/compiler.hrc | 4 +++- include/formula/opcode.hxx | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/formula/compiler.hrc b/include/formula/compiler.hrc index b53b8259ff73..21449b536302 100644 --- a/include/formula/compiler.hrc +++ b/include/formula/compiler.hrc @@ -408,8 +408,10 @@ #define SC_OPCODE_MIDB 410 #define SC_OPCODE_FILTERXML 411 #define SC_OPCODE_WEBSERVICE 412 +#define SC_OPCODE_COVARIANCE_S 413 +#define SC_OPCODE_COVARIANCE_P 414 -#define SC_OPCODE_STOP_2_PAR 413 /* last function with two or more parameters' OpCode + 1 */ +#define SC_OPCODE_STOP_2_PAR 415 /* last function with two or more parameters' OpCode + 1 */ #define SC_OPCODE_STOP_FUNCTION SC_OPCODE_STOP_2_PAR /* last function's OpCode + 1 */ #define SC_OPCODE_LAST_OPCODE_ID (SC_OPCODE_STOP_FUNCTION - 1) /* last OpCode */ diff --git a/include/formula/opcode.hxx b/include/formula/opcode.hxx index 2df6e793942c..ae109c5544d4 100644 --- a/include/formula/opcode.hxx +++ b/include/formula/opcode.hxx @@ -352,6 +352,8 @@ enum OpCodeEnum ocProb = SC_OPCODE_PROB, ocCorrel = SC_OPCODE_CORREL, ocCovar = SC_OPCODE_COVAR, + ocCovarianceP = SC_OPCODE_COVARIANCE_P, + ocCovarianceS = SC_OPCODE_COVARIANCE_S, ocPearson = SC_OPCODE_PEARSON, ocRSQ = SC_OPCODE_RSQ, ocSTEYX = SC_OPCODE_STEYX, -- cgit