https://bugs.documentfoundation.org/show_bug.cgi?id=170388
Bug ID: 170388
Summary: COUNTIF strips empty cells from query range
Product: LibreOffice
Version: 26.8.0.0 alpha0+ master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Calc
Assignee: [email protected]
Reporter: [email protected]
Created attachment 205087
--> https://bugs.documentfoundation.org/attachment.cgi?id=205087&action=edit
Query range with empty cells
Open attached document.
On tab "horizontal" you see the wrong result value 1.
On tab "horizontal_2" you see the correct result value 4 for the same formulas.
The reason is, that the query range is clamped the used columns in
https://opengrok.libreoffice.org/xref/core/sc/source/core/data/queryiter.cxx
1747 maParam.nCol2 = rDoc.ClampToAllocatedColumns(nTab, maParam.nCol2);
In case the criterion is "empty cell" the range must not be clamped.
The problem exists only for horizontal count. The vertical count is always
correct, as can be seen on tab "vertical".
Tested with Version: 24.8.0.3 (X86_64) / LibreOffice Community
Build ID: 0bdf1299c94fe897b119f97f3c613e9dca6be583
CPU threads: 32; OS: Windows 11 X86_64 (10.0 build 26100); UI render:
Skia/Vulkan; VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
and with Version: 26.8.0.0.alpha0+ (X86_64)
Build ID: 680(Build:0)
CPU threads: 32; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan;
VCL: win
Locale: de-DE (de_DE); UI: en-US
Calc: threaded
This is not duplicate to bug 159544, because different code parts are the
reason.
--
You are receiving this mail because:
You are the assignee for the bug.