diff options
author | Winfried Donkers <winfrieddonkers@libreoffice.org> | 2015-02-26 17:09:10 +0100 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-03-24 22:04:50 +0000 |
commit | f1f4167bac271f4b7f4ed766db4b077f94fd4daa (patch) | |
tree | 422f81c4b7c89e12b1953f8a0de8684482e4be87 | |
parent | tdf#81475 Fix missing space in standard toolbar and rearranged other toolbars (diff) | |
download | core-f1f4167bac271f4b7f4ed766db4b077f94fd4daa.tar.gz core-f1f4167bac271f4b7f4ed766db4b077f94fd4daa.zip |
tdf#40835 add ODFF function FDIST
and clean up F-Distribution function names.
Change-Id: I8666659269121b3ea32e8179b42e3497aa86754f
Reviewed-on: https://gerrit.libreoffice.org/14657
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
-rw-r--r-- | formula/source/core/api/token.cxx | 2 | ||||
-rw-r--r-- | formula/source/core/resource/core_resource.src | 2 | ||||
-rw-r--r-- | sc/source/core/tool/compiler.cxx | 3 | ||||
-rw-r--r-- | sc/source/core/tool/interpr3.cxx | 14 | ||||
-rw-r--r-- | sc/source/filter/oox/formulabase.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/src/scfuncs.src | 2 |
6 files changed, 19 insertions, 6 deletions
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 117f276fb6c4..39067e262e92 100644 --- a/formula/source/core/api/token.cxx +++ b/formula/source/core/api/token.cxx @@ -1055,6 +1055,7 @@ inline bool MissingConventionOOXML::isRewriteNeeded( OpCode eOp ) const case ocIndex: case ocGammaDist: + case ocFDist_LT: case ocPoissonDist: case ocNormDist: case ocLogNormDist: @@ -1166,6 +1167,7 @@ void FormulaMissingContext::AddMoreArgs( FormulaTokenArray *pNewArr, const Missi break; case ocGammaDist: + case ocFDist_LT: case ocNormDist: if (mnCurArg == 2) { diff --git a/formula/source/core/resource/core_resource.src b/formula/source/core/resource/core_resource.src index b6e6f7e25f77..31d5d9446add 100644 --- a/formula/source/core/resource/core_resource.src +++ b/formula/source/core/resource/core_resource.src @@ -299,7 +299,7 @@ Resource RID_STRLIST_FUNCTION_NAMES_ENGLISH_ODFF String SC_OPCODE_T_DIST_MS { Text = "COM.MICROSOFT.T.DIST" ; }; String SC_OPCODE_T_DIST_RT { Text = "COM.MICROSOFT.T.DIST.RT" ; }; String SC_OPCODE_F_DIST { Text = "LEGACY.FDIST" ; }; - String SC_OPCODE_F_DIST_LT { Text = "COM.MICROSOFT.F.DIST" ; }; + String SC_OPCODE_F_DIST_LT { Text = "FDIST" ; }; String SC_OPCODE_F_DIST_RT { Text = "COM.MICROSOFT.F.DIST.RT" ; }; String SC_OPCODE_CHI_DIST { Text = "LEGACY.CHIDIST" ; }; String SC_OPCODE_CHI_DIST_MS { Text = "COM.MICROSOFT.CHISQ.DIST.RT" ; }; diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index ca677699a6d6..551f6900aebf 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -2499,7 +2499,8 @@ bool ScCompiler::IsOpCode( const OUString& rName, bool bInArray ) { "EASTERSUNDAY", ocEasterSunday }, // EASTERSUNDAY -> ORG.OPENOFFICE.EASTERSUNDAY { "ZGZ", ocRRI }, // ZGZ -> RRI { "COLOR", ocColor }, // COLOR -> ORG.LIBREOFFICE.COLOR - { "GOALSEEK", ocBackSolver } // GOALSEEK -> ORG.OPENOFFICE.GOALSEEK + { "GOALSEEK", ocBackSolver }, // GOALSEEK -> ORG.OPENOFFICE.GOALSEEK + { "COM.MICROSOFT.F.DIST", ocFDist_LT }, // fdo#40835, -> FDIST -> COM.MICROSOFT.F.DIST // Renamed new names, prepare to read future names: //{ "ORG.OPENOFFICE.XXX", ocXXX } // XXX -> ORG.OPENOFFICE.XXX }; diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 051bb6679e32..2def402c5314 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -1702,9 +1702,19 @@ void ScInterpreter::ScFDist() void ScInterpreter::ScFDist_LT() { - if ( !MustHaveParamCount( GetByte(), 4 ) ) + int nParamCount = GetByte(); + if ( !MustHaveParamCount( nParamCount, 3, 4 ) ) return; - bool bCum = GetBool(); + bool bCum; + if ( nParamCount == 3 ) + bCum = true; + else if ( IsMissing() ) + { + bCum = true; + Pop(); + } + else + bCum = GetBool(); double fF2 = ::rtl::math::approxFloor( GetDouble() ); double fF1 = ::rtl::math::approxFloor( GetDouble() ); double fF = GetDouble(); diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx index 40d282f941fb..e1237b7c6100 100644 --- a/sc/source/filter/oox/formulabase.cxx +++ b/sc/source/filter/oox/formulabase.cxx @@ -773,7 +773,7 @@ static const FunctionData saFuncTable2010[] = { "COM.MICROSOFT.CHISQ.TEST", "CHISQ.TEST", NOID, NOID, 2, 2, V, { VA }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.CONFIDENCE.NORM", "CONFIDENCE.NORM", NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.CONFIDENCE.T", "CONFIDENCE.T", NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW }, - { "COM.MICROSOFT.F.DIST", "F.DIST", NOID, NOID, 4, 4, V, { VR }, FUNCFLAG_MACROCALL_NEW }, + { "FDIST", "F.DIST", NOID, NOID, 4, 4, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.F.DIST.RT", "F.DIST.RT", NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.F.INV", "F.INV", NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW }, { "COM.MICROSOFT.F.INV.RT", "F.INV.RT", NOID, NOID, 3, 3, V, { VR }, FUNCFLAG_MACROCALL_NEW }, diff --git a/sc/source/ui/src/scfuncs.src b/sc/source/ui/src/scfuncs.src index 1bb371ef64d2..eed70bce13ff 100644 --- a/sc/source/ui/src/scfuncs.src +++ b/sc/source/ui/src/scfuncs.src @@ -8485,7 +8485,7 @@ Resource RID_SC_FUNCTION_DESCRIPTIONS2 0; ID_FUNCTION_GRP_STATISTIC; U2S( HID_FUNC_F_DIST_LT ); - 4; 0; 0; 0; 0; + 4; 0; 0; 0; 1; 0; }; String 2 // Name of Parameter 1 |