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

"5.75%" не распознавалось как проценты.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56061 954022d7-b5bf-4e40-9824-e11837661b57
parent 6731b9fb
...@@ -2644,14 +2644,14 @@ FormatParser.prototype = ...@@ -2644,14 +2644,14 @@ FormatParser.prototype =
value = value.replace(new RegExp(String.fromCharCode(0xA0), "g")); value = value.replace(new RegExp(String.fromCharCode(0xA0), "g"));
var rx_thouthand = this.aThouthandRegexp[cultureInfo.LCID]; var rx_thouthand = this.aThouthandRegexp[cultureInfo.LCID];
if (null == rx_thouthand) { if (null == rx_thouthand) {
rx_thouthand = new RegExp("^(([ \\+\\-%\\$€£¥\\(]|" + escapeRegExp(cultureInfo.CurrencySymbol) + ")*)((\\d+(" + escapeRegExp(cultureInfo.NumberGroupSeparator) + "|\\d)*\\d+)?" + escapeRegExp(cultureInfo.NumberDecimalSeparator) + "?\\d*)(([ %\\)]|р.|" + escapeRegExp(cultureInfo.CurrencySymbol) + ")*)$"); rx_thouthand = new RegExp("^(([ \\+\\-%\\$€£¥\\(]|" + escapeRegExp(cultureInfo.CurrencySymbol) + ")*)((\\d+" + escapeRegExp(cultureInfo.NumberGroupSeparator) + "\\d+)*\\d*" + escapeRegExp(cultureInfo.NumberDecimalSeparator) + "?\\d*)(([ %\\)]|р.|" + escapeRegExp(cultureInfo.CurrencySymbol) + ")*)$");
this.aThouthandRegexp[cultureInfo.LCID] = rx_thouthand; this.aThouthandRegexp[cultureInfo.LCID] = rx_thouthand;
} }
var match = value.match(rx_thouthand); var match = value.match(rx_thouthand);
if (null != match) { if (null != match) {
var sBefore = match[1]; var sBefore = match[1];
var sVal = match[3]; var sVal = match[3];
var sAfter = match[6]; var sAfter = match[5];
var oChartCount = {}; var oChartCount = {};
if(null != sBefore) if(null != sBefore)
this._parseStringLetters(sBefore, cultureInfo.CurrencySymbol, true, oChartCount); this._parseStringLetters(sBefore, cultureInfo.CurrencySymbol, true, oChartCount);
......
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