summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--formula/source/core/api/token.cxx2
-rw-r--r--formula/source/core/resource/core_resource.src2
-rw-r--r--sc/source/core/tool/compiler.cxx3
-rw-r--r--sc/source/core/tool/interpr3.cxx14
-rw-r--r--sc/source/filter/oox/formulabase.cxx2
-rw-r--r--sc/source/ui/src/scfuncs.src2
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