Commit fd92de9b authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

0,001 распознавалось как число с разделителями тысячей.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56827 954022d7-b5bf-4e40-9824-e11837661b57
parent 1f9c4245
...@@ -2983,12 +2983,17 @@ FormatParser.prototype = ...@@ -2983,12 +2983,17 @@ FormatParser.prototype =
} }
if (!bError) { if (!bError) {
if (0 != nPrevIndex) { if (0 != nPrevIndex) {
val = val.replace(new RegExp(escapeRegExp(cultureInfo.NumberGroupSeparator), "g"), ''); //чтобы не распознавалось 0,001
bThouthand = true; if (nPrevIndex < val.length && parseInt(val.substr(0, val.length - nPrevIndex)) > 0) {
val = val.replace(new RegExp(escapeRegExp(cultureInfo.NumberGroupSeparator), "g"), '');
bThouthand = true;
}
}
if (Asc.isNumber(val)) {
var dNumber = parseFloat(val);
if (!isNaN(dNumber))
oRes = { number: dNumber, thouthand: bThouthand };
} }
var dNumber = parseFloat(val);
if (!isNaN(dNumber))
oRes = { number: dNumber, thouthand: bThouthand };
} }
return oRes; return oRes;
}, },
......
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