[Libreoffice-commits] core.git: sc/qa sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 15 11:38:03 UTC 2018
sc/qa/unit/data/functions/statistical/fods/kurt.fods | 8 ++++----
sc/source/core/tool/interpr3.cxx | 4 +++-
2 files changed, 7 insertions(+), 5 deletions(-)
New commits:
commit e785c027af8d26b78211b0caa740bae7c0384d3a
Author: Takeshi Abe <tabe at fixedpoint.jp>
AuthorDate: Wed Oct 3 18:10:49 2018 +0900
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Mon Oct 15 13:37:42 2018 +0200
sc: Make KURT() return #DIV/0! when <4 arguments are given
as Excel does:
<https://support.office.com/en-us/article/kurt-function-bc3a265c-5da4-4dcb-b7fd-c237789095ab>
Change-Id: I1059e6e5dd9f01688219492e76af6dbbe97be41a
Reviewed-on: https://gerrit.libreoffice.org/61286
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/qa/unit/data/functions/statistical/fods/kurt.fods b/sc/qa/unit/data/functions/statistical/fods/kurt.fods
index 2634ee802da4..c808f9b58b84 100644
--- a/sc/qa/unit/data/functions/statistical/fods/kurt.fods
+++ b/sc/qa/unit/data/functions/statistical/fods/kurt.fods
@@ -4118,12 +4118,12 @@
</table:table-row>
<table:table-row table:style-name="ro9">
<table:table-cell table:formula="of:=KURT([.I1];[.J1];[.J2])" office:value-type="string" office:string-value="" calcext:value-type="error">
- <text:p>#NUM!</text:p>
+ <text:p>#DIV/0!</text:p>
</table:table-cell>
- <table:table-cell office:value-type="string" calcext:value-type="string">
- <text:p>#NUM!</text:p>
+ <table:table-cell table:formula="of:#DIV/0!" office:value-type="string" office:string-value="" calcext:value-type="error">
+ <text:p>#DIV/0!</text:p>
</table:table-cell>
- <table:table-cell table:style-name="ce15" table:formula="of:=ISERROR([.A13])" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
+ <table:table-cell table:style-name="ce15" table:formula="of:=ERROR.TYPE([.A13])=2" office:value-type="boolean" office:boolean-value="true" calcext:value-type="boolean">
<text:p>TRUE</text:p>
</table:table-cell>
<table:table-cell table:style-name="ce21" table:formula="of:=FORMULA([.A13])" office:value-type="string" office:string-value="=KURT(I1,J1,J2)" calcext:value-type="string">
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 02242d9745bc..ed2dc48f8f7c 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -2868,8 +2868,10 @@ void ScInterpreter::ScKurt()
if ( !CalculateSkew(fSum,fCount,vSum,values) )
return;
- if (fCount == 0.0)
+ // ODF 1.2 constraints: # of numbers >= 4
+ if (fCount < 4.0)
{
+ // for interoperability with Excel
PushError( FormulaError::DivisionByZero);
return;
}
More information about the Libreoffice-commits
mailing list