formula/source/core/api/token.cxx | 2 ++ formula/source/core/resource/core_resource.src | 2 +- sc/source/core/tool/compiler.cxx | 3 ++- sc/source/core/tool/interpr3.cxx | 14 ++++++++++++-- sc/source/filter/oox/formulabase.cxx | 2 +- sc/source/ui/src/scfuncs.src | 2 +- 6 files changed, 19 insertions(+), 6 deletions(-)
New commits: commit f1f4167bac271f4b7f4ed766db4b077f94fd4daa Author: Winfried Donkers <winfrieddonk...@libreoffice.org> Date: Thu Feb 26 17:09:10 2015 +0100 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 <c...@libreoffice.org> Reviewed-by: Eike Rathke <er...@redhat.com> Tested-by: Eike Rathke <er...@redhat.com> diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx index 117f276..39067e2 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 b6e6f7e..31d5d94 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 ca67769..551f690 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 051bb66..2def402 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 40d282f..e1237b7 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 1bb371e..eed70bc 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits