[Libreoffice-commits] core.git: sc/qa sc/source
Winfried Donkers
winfrieddonkers at libreoffice.org
Wed May 9 15:04:40 UTC 2018
sc/qa/unit/data/functions/statistical/fods/countif.fods | 22 ++++++++++++----
sc/source/core/data/dociter.cxx | 2 -
2 files changed, 18 insertions(+), 6 deletions(-)
New commits:
commit 1a8febcaa4f932124d417877a3b08bd059c0362d
Author: Winfried Donkers <winfrieddonkers at libreoffice.org>
Date: Wed May 9 10:40:03 2018 +0200
tdf#117433 count empty cells properly with COUNTIF.
All empty columns after the first column of the range were skipped.
When the query contains an 'cell is empty' expression, skipping is omitted.
Change-Id: I0d5b0d24c2d08bad88479cd5b356529a0a709156
Reviewed-on: https://gerrit.libreoffice.org/54021
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Eike Rathke <erack at redhat.com>
diff --git a/sc/qa/unit/data/functions/statistical/fods/countif.fods b/sc/qa/unit/data/functions/statistical/fods/countif.fods
index 557e70b2044f..8625ebe7aeff 100644
--- a/sc/qa/unit/data/functions/statistical/fods/countif.fods
+++ b/sc/qa/unit/data/functions/statistical/fods/countif.fods
@@ -3865,10 +3865,22 @@
<table:table-cell table:style-name="ce58"/>
</table:table-row>
<table:table-row table:style-name="ro6">
- <table:table-cell table:number-columns-repeated="2"/>
- <table:table-cell table:style-name="ce28"/>
- <table:table-cell table:style-name="ce34"/>
- <table:table-cell table:number-columns-repeated="2"/>
+ <table:table-cell table:formula="of:=COUNTIF([.P20:.R23];"")" office:value-type="float" office:value="12" calcext:value-type="float">
+ <text:p>12</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="float" office:value="12" calcext:value-type="float">
+ <text:p>12</text:p>
+ </table:table-cell>
+ <table:table-cell table:style-name="ce64" table:formula="of:=ROUND([.A32];12)=ROUND([.B32];12)" 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="ce34" table:formula="of:=FORMULA([.A32])" office:value-type="string" office:string-value="=COUNTIF(P20:R23,"")" calcext:value-type="string">
+ <text:p>=COUNTIF(P20:R23,"")</text:p>
+ </table:table-cell>
+ <table:table-cell office:value-type="string" calcext:value-type="string">
+ <text:p>tdf#117433</text:p>
+ </table:table-cell>
+ <table:table-cell/>
<table:table-cell table:style-name="ce39"/>
<table:table-cell/>
<table:table-cell office:value-type="float" office:value="3" calcext:value-type="float">
@@ -4469,4 +4481,4 @@
</table:named-expressions>
</office:spreadsheet>
</office:body>
-</office:document>
\ No newline at end of file
+</office:document>
diff --git a/sc/source/core/data/dociter.cxx b/sc/source/core/data/dociter.cxx
index b09c4413301b..0c74233f4c90 100644
--- a/sc/source/core/data/dociter.cxx
+++ b/sc/source/core/data/dociter.cxx
@@ -1144,7 +1144,7 @@ bool ScQueryCellIterator::GetThis()
}
pCol = &(pDoc->maTabs[nTab])->aCol[nCol];
}
- while (pCol->IsEmptyData());
+ while (!rItem.mbMatchEmpty && pCol->IsEmptyData());
InitPos();
More information about the Libreoffice-commits
mailing list