fdo#61002 add Excel 2010 functions VAR.P and VAR.S
Change-Id: I23f286eaaef79d196a65e8079b62cf577539e9f1 Reviewed-on: https://gerrit.libreoffice.org/6477 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
This commit is contained in:
parent
83397d0415
commit
781363934a
@ -184,6 +184,8 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF
|
||||
String SC_OPCODE_VAR_A { Text = "VARA" ; };
|
||||
String SC_OPCODE_VAR_P { Text = "VARP" ; };
|
||||
String SC_OPCODE_VAR_P_A { Text = "VARPA" ; };
|
||||
String SC_OPCODE_VAR_P_MS { Text = "COM.MICROSOFT.VAR.P" ; };
|
||||
String SC_OPCODE_VAR_S { Text = "COM.MICROSOFT.VAR.S" ; };
|
||||
String SC_OPCODE_ST_DEV { Text = "STDEV" ; };
|
||||
String SC_OPCODE_ST_DEV_A { Text = "STDEVA" ; };
|
||||
String SC_OPCODE_ST_DEV_P { Text = "STDEVP" ; };
|
||||
@ -536,6 +538,8 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH
|
||||
String SC_OPCODE_VAR_A { Text = "VARA" ; };
|
||||
String SC_OPCODE_VAR_P { Text = "VARP" ; };
|
||||
String SC_OPCODE_VAR_P_A { Text = "VARPA" ; };
|
||||
String SC_OPCODE_VAR_P_MS { Text = "VAR.P" ; };
|
||||
String SC_OPCODE_VAR_S { Text = "VAR.S" ; };
|
||||
String SC_OPCODE_ST_DEV { Text = "STDEV" ; };
|
||||
String SC_OPCODE_ST_DEV_A { Text = "STDEVA" ; };
|
||||
String SC_OPCODE_ST_DEV_P { Text = "STDEVP" ; };
|
||||
@ -1295,6 +1299,14 @@ Resource RID_STRLIST_FUNCTION_NAMES
|
||||
{
|
||||
Text [ en-US ] = "VARPA" ;
|
||||
};
|
||||
String SC_OPCODE_VAR_P_MS
|
||||
{
|
||||
Text [ en-US ] = "VAR.P" ;
|
||||
};
|
||||
String SC_OPCODE_VAR_S
|
||||
{
|
||||
Text [ en-US ] = "VAR.S" ;
|
||||
};
|
||||
String SC_OPCODE_ST_DEV
|
||||
{
|
||||
Text [ en-US ] = "STDEV" ;
|
||||
|
@ -412,8 +412,10 @@
|
||||
#define SC_OPCODE_COVARIANCE_P 414
|
||||
#define SC_OPCODE_ST_DEV_P_MS 415
|
||||
#define SC_OPCODE_ST_DEV_S 416
|
||||
#define SC_OPCODE_VAR_P_MS 417
|
||||
#define SC_OPCODE_VAR_S 418
|
||||
|
||||
#define SC_OPCODE_STOP_2_PAR 417 /* last function with two or more parameters' OpCode + 1 */
|
||||
#define SC_OPCODE_STOP_2_PAR 419 /* 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 */
|
||||
|
||||
|
@ -220,6 +220,8 @@ enum OpCodeEnum
|
||||
ocISPMT = SC_OPCODE_ISPMT,
|
||||
ocVar = SC_OPCODE_VAR,
|
||||
ocVarP = SC_OPCODE_VAR_P,
|
||||
ocVarP_MS = SC_OPCODE_VAR_P_MS,
|
||||
ocVarS = SC_OPCODE_VAR_S,
|
||||
ocStDev = SC_OPCODE_ST_DEV,
|
||||
ocStDevP = SC_OPCODE_ST_DEV_P,
|
||||
ocStDevP_MS = SC_OPCODE_ST_DEV_P_MS,
|
||||
|
@ -682,5 +682,7 @@
|
||||
#define HID_FUNC_COVARIANCE_S "SC_HID_FUNC_COVARIANCE_S"
|
||||
#define HID_FUNC_ST_DEV_P_MS "SC_HID_FUNC_ST_DEV_P_MS"
|
||||
#define HID_FUNC_ST_DEV_S "SC_HID_FUNC_ST_DEV_S"
|
||||
#define HID_FUNC_VAR_P_MS "SC_HID_FUNC_VAR_P_MS"
|
||||
#define HID_FUNC_VAR_S "SC_HID_FUNC_VAR_S"
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@ -2436,6 +2436,8 @@ void Test::testFunctionLists()
|
||||
"TRIMMEAN",
|
||||
"TTEST",
|
||||
"VAR",
|
||||
"VAR.P",
|
||||
"VAR.S",
|
||||
"VARA",
|
||||
"VARP",
|
||||
"VARPA",
|
||||
|
@ -4009,9 +4009,11 @@ StackVar ScInterpreter::Interpret()
|
||||
case ocAverageA : ScAverage( true ); break;
|
||||
case ocCount : ScCount(); break;
|
||||
case ocCount2 : ScCount2(); break;
|
||||
case ocVar : ScVar( false ); break;
|
||||
case ocVar :
|
||||
case ocVarS : ScVar( false ); break;
|
||||
case ocVarA : ScVar( true ); break;
|
||||
case ocVarP : ScVarP( false ); break;
|
||||
case ocVarP :
|
||||
case ocVarP_MS : ScVarP( false ); break;
|
||||
case ocVarPA : ScVarP( true ); break;
|
||||
case ocStDev :
|
||||
case ocStDevS : ScStDev( false ); break;
|
||||
|
@ -189,6 +189,8 @@ const ScParameterClassification::RawData ScParameterClassification::pRawData[] =
|
||||
{ ocVarA, {{ Reference }, 1 }},
|
||||
{ ocVarP, {{ Reference }, 1 }},
|
||||
{ ocVarPA, {{ Reference }, 1 }},
|
||||
{ ocVarP_MS, {{ Reference }, 1 }},
|
||||
{ ocVarS, {{ Reference }, 1 }},
|
||||
{ ocVLookup, {{ Value, Reference, Value, Value }, 0 }},
|
||||
{ ocXor, {{ Reference }, 1 }},
|
||||
{ ocZTest, {{ Reference, Value, Value }, 0 }},
|
||||
|
@ -410,7 +410,9 @@ static const XclFunctionInfo saFuncTable_2010[] =
|
||||
EXC_FUNCENTRY_V_VA( ocCovarianceP, 2, 2, 0, "COVARIANCE.P" ),
|
||||
EXC_FUNCENTRY_V_VA( ocCovarianceS, 2, 2, 0, "COVARIANCE.S" ),
|
||||
EXC_FUNCENTRY_V_RX( ocStDevP_MS, 1, MX, 0, "STDEV.P" ),
|
||||
EXC_FUNCENTRY_V_RX( ocStDevS, 1, MX, 0, "STDEV.S" )
|
||||
EXC_FUNCENTRY_V_RX( ocStDevS, 1, MX, 0, "STDEV.S" ),
|
||||
EXC_FUNCENTRY_V_RX( ocVarP_MS, 1, MX, 0, "VAR.P" ),
|
||||
EXC_FUNCENTRY_V_RX( ocVarS, 1, MX, 0, "VAR.S" )
|
||||
};
|
||||
|
||||
/** Functions new in Excel 2013.
|
||||
|
@ -749,7 +749,9 @@ static const FunctionData saFuncTable2010[] =
|
||||
{ "COM.MICROSOFT.COVARIANCE.P", "COVARIANCE.P", NOID, NOID, 2, 2, V, { VA }, FUNCFLAG_MACROCALL_NEW },
|
||||
{ "COM.MICROSOFT.COVARIANCE.S", "COVARIANCE.S", NOID, NOID, 2, 2, V, { VA }, FUNCFLAG_MACROCALL_NEW },
|
||||
{ "COM.MICROSOFT.STDEV.P", "STDEV.P", NOID, NOID, 1, MX, V, { RX }, FUNCFLAG_MACROCALL_NEW },
|
||||
{ "COM.MICROSOFT.STDEV.S", "STDEV.S", NOID, NOID, 1, MX, V, { RX }, FUNCFLAG_MACROCALL_NEW }
|
||||
{ "COM.MICROSOFT.STDEV.S", "STDEV.S", NOID, NOID, 1, MX, V, { RX }, FUNCFLAG_MACROCALL_NEW },
|
||||
{ "COM.MICROSOFT.VAR.P", "VAR.P" , NOID, NOID, 1, MX, V, { RX }, FUNCFLAG_MACROCALL_NEW },
|
||||
{ "COM.MICROSOFT.VAR.S", "VAR.S", NOID, NOID, 1, MX, V, { RX }, FUNCFLAG_MACROCALL_NEW }
|
||||
};
|
||||
|
||||
/** Functions new in Excel 2013.
|
||||
|
@ -5086,6 +5086,30 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
|
||||
{
|
||||
Text [ en-US ] = "Number 1, number 2, ... are 1 to 30 numerical arguments which portray a sample of a population." ;
|
||||
};
|
||||
};
|
||||
// -=*# Resource for function VAR.S #*=-
|
||||
Resource SC_OPCODE_VAR_S
|
||||
{
|
||||
String 1 // Description
|
||||
{
|
||||
Text [ en-US ] = "Calculates the variance based on a sample." ;
|
||||
};
|
||||
ExtraData =
|
||||
{
|
||||
0;
|
||||
ID_FUNCTION_GRP_STATISTIC;
|
||||
U2S( HID_FUNC_VAR_S );
|
||||
VAR_ARGS; 0;
|
||||
0;
|
||||
};
|
||||
String 2 // Name of Parameter 1
|
||||
{
|
||||
Text [ en-US ] = "number " ;
|
||||
};
|
||||
String 3 // Description of Parameter 1
|
||||
{
|
||||
Text [ en-US ] = "Number 1, number 2, ... are 1 to 30 numerical arguments which portray a sample of a population." ;
|
||||
};
|
||||
};
|
||||
// -=*# Resource for function VARIANZ #*=-
|
||||
Resource SC_OPCODE_VAR_A
|
||||
@ -5134,6 +5158,30 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2
|
||||
{
|
||||
Text [ en-US ] = "Number 1, number 2, ... are 1 to 30 numerical arguments which represent a population." ;
|
||||
};
|
||||
};
|
||||
// -=*# Resource for function VAR.P #*=-
|
||||
Resource SC_OPCODE_VAR_P_MS
|
||||
{
|
||||
String 1 // Description
|
||||
{
|
||||
Text [ en-US ] = "Calculates variance based on the entire population." ;
|
||||
};
|
||||
ExtraData =
|
||||
{
|
||||
0;
|
||||
ID_FUNCTION_GRP_STATISTIC;
|
||||
U2S( HID_FUNC_VAR_P_MS );
|
||||
VAR_ARGS; 0;
|
||||
0;
|
||||
};
|
||||
String 2 // Name of Parameter 1
|
||||
{
|
||||
Text [ en-US ] = "number " ;
|
||||
};
|
||||
String 3 // Description of Parameter 1
|
||||
{
|
||||
Text [ en-US ] = "Number 1, number 2, ... are 1 to 30 numerical arguments which represent a population." ;
|
||||
};
|
||||
};
|
||||
// -=*# Resource for function VARIANZENA #*=-
|
||||
Resource SC_OPCODE_VAR_P_A
|
||||
|
Loading…
x
Reference in New Issue
Block a user