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

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

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