Commit f1079b9e authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

Для математической информации нужно подсчитывать колличество только не пустых...

Для математической информации нужно подсчитывать колличество только не пустых ячеек (баг http://bugzserver/show_bug.cgi?id=26270)

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58260 954022d7-b5bf-4e40-9824-e11837661b57
parent 942c0f41
......@@ -6315,19 +6315,21 @@
var oSelectionMathInfo = new asc_CSelectionMathInfo();
var sum = 0;
range._setPropertyNoEmpty(null, null, function (c) {
++oSelectionMathInfo.count;
if (CellValueType.Number === c.getType() && false === c.isEmptyTextString()) {
tmp = parseFloat(c.getValueWithoutFormat());
if (isNaN(tmp))
return;
if (0 === oSelectionMathInfo.countNumbers)
oSelectionMathInfo.min = oSelectionMathInfo.max = tmp;
else {
oSelectionMathInfo.min = Math.min(oSelectionMathInfo.min, tmp);
oSelectionMathInfo.max = Math.max(oSelectionMathInfo.max, tmp);
if (false === c.isEmptyTextString()) {
++oSelectionMathInfo.count;
if (CellValueType.Number === c.getType()) {
tmp = parseFloat(c.getValueWithoutFormat());
if (isNaN(tmp))
return;
if (0 === oSelectionMathInfo.countNumbers)
oSelectionMathInfo.min = oSelectionMathInfo.max = tmp;
else {
oSelectionMathInfo.min = Math.min(oSelectionMathInfo.min, tmp);
oSelectionMathInfo.max = Math.max(oSelectionMathInfo.max, tmp);
}
++oSelectionMathInfo.countNumbers;
sum += tmp;
}
++oSelectionMathInfo.countNumbers;
sum += tmp;
}
});
// Показываем только данные для 2-х или более ячеек (http://bugzserver/show_bug.cgi?id=24115)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment