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

при изменении свойств создаются копии default стилей, а не новые обьекты.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53833 954022d7-b5bf-4e40-9824-e11837661b57
parent 5825583a
......@@ -4904,6 +4904,8 @@ Range.prototype._setCellBorder=function(bbox, cell, oNewBorder){
var oCurBorder = null;
if(null != cell.xfs && null != cell.xfs.border)
oCurBorder = cell.xfs.border.clone();
else
oCurBorder = g_oDefaultBorder.clone();
var nRow = cell.oId.getRow0();
var nCol = cell.oId.getCol0();
cell.setBorder(this._setBorderMerge(nCol == bbox.c1, nRow == bbox.r1, nCol == bbox.c2, nRow == bbox.r2, oNewBorder, oCurBorder));
......
......@@ -1470,6 +1470,7 @@ StyleManager.prototype =
this.oDefaultXfs.XfId = oDefaultXfs.XfId;
g_oDefaultXfId = oDefaultXfs.XfId;
}
this.oDefaultXfs = oDefaultXfs;
},
_prepareSetReference : function (oItemWithXfs)
{
......@@ -1493,14 +1494,14 @@ StyleManager.prototype =
{
var xfs = this._prepareSet(oItemWithXfs);
if(null == xfs.font)
xfs.font = new Font();
xfs.font = g_oDefaultFont.clone();
return xfs;
},
_prepareSetAlign : function(oItemWithXfs)
{
var xfs = this._prepareSet(oItemWithXfs);
if(null == xfs.align)
xfs.align = new Align();
xfs.align = g_oDefaultAlign.clone();
return xfs;
},
_prepareSetCellStyle : function (oItemWithXfs) {
......@@ -1545,7 +1546,7 @@ StyleManager.prototype =
{
xfs = this._prepareSet(oItemWithXfs);
if(null == xfs.num)
xfs.num = new Num();
xfs.num = g_oDefaultNum.clone();
xfs.num.f = val;
}
return oRes;
......@@ -1815,7 +1816,7 @@ StyleManager.prototype =
{
xfs = this._prepareSet(oItemWithXfs);
if(null == xfs.fill)
xfs.fill = new Fill();
xfs.fill = g_oDefaultFill.clone();
xfs.fill.bg = val;
}
return oRes;
......@@ -3195,7 +3196,7 @@ CCellValue.prototype =
var item = aVal[i];
var oNewElem = new CCellValueMultiText();
oNewElem.text = item.text;
oNewElem.format = new Font();
oNewElem.format = g_oDefaultFont.clone();
if(null != item.format)
oNewElem.format.set(item.format);
this.multiText.push(oNewElem);
......
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