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

add numtype accounting

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58749 954022d7-b5bf-4e40-9824-e11837661b57
parent 3ead16e7
...@@ -245,6 +245,7 @@ function NumFormat(bAddMinusIfNes) ...@@ -245,6 +245,7 @@ function NumFormat(bAddMinusIfNes)
this.bCurrency = false; this.bCurrency = false;
this.bNumber = false; this.bNumber = false;
this.bInteger = false; this.bInteger = false;
this.bRepeat = false;
this.Color = -1; this.Color = -1;
this.ComporationOperator = null; this.ComporationOperator = null;
...@@ -510,7 +511,7 @@ NumFormat.prototype = ...@@ -510,7 +511,7 @@ NumFormat.prototype =
if(numFormat_Bracket == oCurItem.type && null != oCurItem.color) if(numFormat_Bracket == oCurItem.type && null != oCurItem.color)
this.Color = oCurItem.color; this.Color = oCurItem.color;
} }
var bRepeat = false; this.bRepeat = false;
var nFormatLength = this.aRawFormat.length; var nFormatLength = this.aRawFormat.length;
//Группируем несколько элемнтов подряд в один спецсимвол //Группируем несколько элемнтов подряд в один спецсимвол
...@@ -520,8 +521,8 @@ NumFormat.prototype = ...@@ -520,8 +521,8 @@ NumFormat.prototype =
if(numFormat_Repeat == item.type) if(numFormat_Repeat == item.type)
{ {
//Оставляем только последний numFormat_Repeat //Оставляем только последний numFormat_Repeat
if(false == bRepeat) if(false == this.bRepeat)
bRepeat = true; this.bRepeat = true;
else else
{ {
this.aRawFormat.splice(i, 1); this.aRawFormat.splice(i, 1);
...@@ -1926,8 +1927,12 @@ NumFormat.prototype = ...@@ -1926,8 +1927,12 @@ NumFormat.prototype =
nType = c_oAscNumFormatType.Percent; nType = c_oAscNumFormatType.Percent;
else if(this.bScientific) else if(this.bScientific)
nType = c_oAscNumFormatType.Scientific; nType = c_oAscNumFormatType.Scientific;
else if(this.bCurrency) else if(this.bCurrency){
nType = c_oAscNumFormatType.Currency; if(this.bRepeat)
nType = c_oAscNumFormatType.Accounting;
else
nType = c_oAscNumFormatType.Currency;
}
else if(this.bSlash) else if(this.bSlash)
nType = c_oAscNumFormatType.Fraction; nType = c_oAscNumFormatType.Fraction;
else if(this.bNumber) else if(this.bNumber)
......
...@@ -22,7 +22,8 @@ var c_oAscNumFormatType = { ...@@ -22,7 +22,8 @@ var c_oAscNumFormatType = {
Date : 7, Date : 7,
Time : 8, Time : 8,
Percent : 9, Percent : 9,
Fraction : 10 Fraction : 10,
Accounting : 11
}; };
var c_oAscDrawingLayerType = { var c_oAscDrawingLayerType = {
......
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