Commit 9a830917 authored by Sergey.Konovalov's avatar Sergey.Konovalov

Bug 21561 - Форматирование ячейки с формулой NPV отображается только в режиме редактирования

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50971 954022d7-b5bf-4e40-9824-e11837661b57
parent d945cb36
...@@ -1203,6 +1203,7 @@ NumFormat.prototype = ...@@ -1203,6 +1203,7 @@ NumFormat.prototype =
else if(numFormat_DigitSpace == item.type) else if(numFormat_DigitSpace == item.type)
{ {
var oNewFont = new Font(); var oNewFont = new Font();
oNewFont.clean();
oNewFont.skip = true; oNewFont.skip = true;
this._CommitText(res, oCurText, "0", oNewFont); this._CommitText(res, oCurText, "0", oNewFont);
if(null != item.val) if(null != item.val)
...@@ -1229,7 +1230,10 @@ NumFormat.prototype = ...@@ -1229,7 +1230,10 @@ NumFormat.prototype =
if(-1 != this.Color) if(-1 != this.Color)
{ {
if(null == format) if(null == format)
{
format = new Font(); format = new Font();
format.clean();
}
format.c = new RgbColor(this.Color); format.c = new RgbColor(this.Color);
} }
if(null != prev && ((null == prev.format && null == format) || (null != prev.format && null != format && format.isEqual(prev.format)))) if(null != prev && ((null == prev.format && null == format) || (null != prev.format && null != format && format.isEqual(prev.format))))
...@@ -1324,6 +1328,7 @@ NumFormat.prototype = ...@@ -1324,6 +1328,7 @@ NumFormat.prototype =
if(this.isInvalidDateValue(number)) if(this.isInvalidDateValue(number))
{ {
var oNewFont = new Font(); var oNewFont = new Font();
oNewFont.clean();
oNewFont.repeat = true; oNewFont.repeat = true;
this._CommitText(res, null, "#", oNewFont); this._CommitText(res, null, "#", oNewFont);
return res; return res;
...@@ -1517,12 +1522,14 @@ NumFormat.prototype = ...@@ -1517,12 +1522,14 @@ NumFormat.prototype =
else if(numFormat_Repeat == item.type) else if(numFormat_Repeat == item.type)
{ {
var oNewFont = new Font(); var oNewFont = new Font();
oNewFont.clean();
oNewFont.repeat = true; oNewFont.repeat = true;
this._CommitText(res, oCurText, item.val, oNewFont); this._CommitText(res, oCurText, item.val, oNewFont);
} }
else if(numFormat_Skip == item.type) else if(numFormat_Skip == item.type)
{ {
var oNewFont = new Font(); var oNewFont = new Font();
oNewFont.clean();
oNewFont.skip = true; oNewFont.skip = true;
this._CommitText(res, oCurText, item.val, oNewFont); this._CommitText(res, oCurText, item.val, oNewFont);
} }
...@@ -2092,6 +2099,7 @@ CellFormat.prototype = ...@@ -2092,6 +2099,7 @@ CellFormat.prototype =
else if(null != this.aComporationFormats) else if(null != this.aComporationFormats)
{ {
var oNewFont = new Font(); var oNewFont = new Font();
oNewFont.clean();
oNewFont.repeat = true; oNewFont.repeat = true;
res = [{text: "#", format: oNewFont}]; res = [{text: "#", format: oNewFont}];
} }
......
...@@ -333,13 +333,27 @@ function Font(val) ...@@ -333,13 +333,27 @@ function Font(val)
this.u = val.u; this.u = val.u;
this.s = val.s; this.s = val.s;
this.c = val.c; this.c = val.c;
this.va = val.va this.va = val.va;
//skip и repeat не сохраняются в файл нужны здесь только чтобы класс Font можно было использовать в комплексных строках //skip и repeat не сохраняются в файл нужны здесь только чтобы класс Font можно было использовать в комплексных строках
this.skip = val.skip; this.skip = val.skip;
this.repeat = val.repeat; this.repeat = val.repeat;
}; };
Font.prototype = Font.prototype =
{ {
clean : function()
{
this.fn = null;
this.scheme = null;
this.fs = null;
this.b = null;
this.i = null;
this.u = null;
this.s = null;
this.c = null;
this.va = null;
this.skip = null;
this.repeat = null;
},
_mergeProperty : function(first, second, def) _mergeProperty : function(first, second, def)
{ {
if(def != first) if(def != first)
......
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