tdf117433 COUNIF doesn't count cells after first column in range for empty criteria

Winfried Donkers Winfried.Donkers at dekimo.com
Tue May 8 07:46:46 UTC 2018


Hi Eike,

I found what causes the problem of bug tdf117443, but I don't understand why the code is as it is now and therefore I am reluctant to change it.
In sc/source/core/data/dociter.cxx:ScQueryValueIterator::GetThis() there is a loop in lines 1132-1143 that is entered as soon as the first column of the range has been processed and a new column is started.
The loop skips empty columns, which is annoying when you want to count empty cells.

Do you know/remember if this code is only there to improve efficiency of the iterator?
Would it be a good idea to add a boolean mbDontSkipEmptyCols to ScQueryValueIterator which is only set to true for e.g. ScCountIf (ideally only when empty cell is part of the query, but I don't know if that can be achieved simply).?

Winfried

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice/attachments/20180508/2a7cc684/attachment.html>


More information about the LibreOffice mailing list