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 /sc | |
parent | ff9fde527ec05a71c27fa3109ef4b57216f785dd (diff) |
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>
Diffstat (limited to 'sc')
-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 |
4 files changed, 16 insertions, 5 deletions
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 |