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

Bug 23957 - Ошибка в консоли "Font is not defined " при открытии docx документа.

add CellFormat.formatToChart для преобразования в строку.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56274 954022d7-b5bf-4e40-9824-e11837661b57
parent c5ec0222
...@@ -736,7 +736,7 @@ CDLbl.prototype = ...@@ -736,7 +736,7 @@ CDLbl.prototype =
if(compiled_string.length > 0) if(compiled_string.length > 0)
compiled_string += separator; compiled_string += separator;
var num_format = oNumFormatCache.get(this.series.getFormatCode()); var num_format = oNumFormatCache.get(this.series.getFormatCode());
compiled_string += num_format.format(this.series.getValByIndex(this.pt.idx), CellValueType.Number, gc_nMaxDigCount, null, true)[0].text; compiled_string += num_format.formatToChart(this.series.getValByIndex(this.pt.idx));
} }
if(this.showPercent) if(this.showPercent)
{ {
......
...@@ -848,8 +848,8 @@ CChartSpace.prototype = ...@@ -848,8 +848,8 @@ CChartSpace.prototype =
for(i = 0; i < arr_val.length; ++i) for(i = 0; i < arr_val.length; ++i)
{ {
var calc_value = arr_val[i]*multiplier; var calc_value = arr_val[i]*multiplier;
var rich_value = num_format.format(calc_value, CellValueType.Number, gc_nMaxDigCount, null, true); var rich_value = num_format.formatToChart(calc_value);
arr_strings.push(rich_value[0].text); arr_strings.push(rich_value);
} }
} }
else else
...@@ -898,8 +898,8 @@ CChartSpace.prototype = ...@@ -898,8 +898,8 @@ CChartSpace.prototype =
for(i = 0; i < arr_x_val.length; ++i) for(i = 0; i < arr_x_val.length; ++i)
{ {
var calc_value = arr_x_val[i]*multiplier; var calc_value = arr_x_val[i]*multiplier;
var rich_value = num_format.format(calc_value, CellValueType.number, gc_nMaxDigCount, null, true); var rich_value = num_format.formatToChart(calc_value);
string_pts.push({val:rich_value[0].text}); string_pts.push({val:rich_value});
} }
} }
else else
...@@ -1496,8 +1496,8 @@ CChartSpace.prototype = ...@@ -1496,8 +1496,8 @@ CChartSpace.prototype =
for(i = 0; i < arr_val.length; ++i) for(i = 0; i < arr_val.length; ++i)
{ {
var calc_value = arr_val[i]*multiplier; var calc_value = arr_val[i]*multiplier;
var rich_value = num_format.format(calc_value, CellValueType.Number, gc_nMaxDigCount, null, true); var rich_value = num_format.formatToChart(calc_value);
arr_strings.push(rich_value[0].text); arr_strings.push(rich_value);
} }
} }
else else
...@@ -2519,8 +2519,8 @@ CChartSpace.prototype = ...@@ -2519,8 +2519,8 @@ CChartSpace.prototype =
for(i = 0; i < arr_val.length; ++i) for(i = 0; i < arr_val.length; ++i)
{ {
var calc_value = arr_val[i]*multiplier; var calc_value = arr_val[i]*multiplier;
var rich_value = num_format.format(calc_value, CellValueType.number, gc_nMaxDigCount, null, true); var rich_value = num_format.formatToChart(calc_value);
arr_strings.push(rich_value[0].text); arr_strings.push(rich_value);
} }
} }
else else
...@@ -4504,8 +4504,8 @@ CChartSpace.prototype = ...@@ -4504,8 +4504,8 @@ CChartSpace.prototype =
for(i = 0; i < arr_val.length; ++i) for(i = 0; i < arr_val.length; ++i)
{ {
var calc_value = arr_val[i]*multiplier; var calc_value = arr_val[i]*multiplier;
var rich_value = num_format.format(calc_value, CellValueType.number, gc_nMaxDigCount, null, true); var rich_value = num_format.formatToChart(calc_value);
arr_strings.push(rich_value[0].text); arr_strings.push(rich_value);
} }
} }
else else
......
...@@ -2291,9 +2291,17 @@ CellFormat.prototype = ...@@ -2291,9 +2291,17 @@ CellFormat.prototype =
return bRes; return bRes;
}, },
formatToMathInfo : function(number, nValType, dDigitsCount) formatToMathInfo : function(number, nValType, dDigitsCount)
{
return this._formatToText(number, nValType, dDigitsCount, false);
},
formatToChart : function(number)
{
return this._formatToText(number, CellValueType.Number, gc_nMaxDigCount, true);
},
_formatToText : function(number, nValType, dDigitsCount, bChart)
{ {
var result = ""; var result = "";
var arrFormat = this.format(number, nValType, dDigitsCount, null, false); var arrFormat = this.format(number, nValType, dDigitsCount, null, bChart);
for (var i = 0, item; i < arrFormat.length; ++i) { for (var i = 0, item; i < arrFormat.length; ++i) {
item = arrFormat[i]; item = arrFormat[i];
if (item.format) { if (item.format) {
......
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