Commit bbd2ac55 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Убрал добавление в историю изменений, в классах без Id. Отключаем таблицу Id в...

Убрал добавление в историю изменений, в классах без Id. Отключаем таблицу Id в методе Get_SelectedContent.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60935 954022d7-b5bf-4e40-9824-e11837661b57
parent 13f3d790
......@@ -3276,13 +3276,13 @@ CGs.prototype =
setColor: function(color)
{
History.Add(this, {Type: historyitem_Gs_SetColor, oldColor: this.color, newColor: color});
//History.Add(this, {Type: historyitem_Gs_SetColor, oldColor: this.color, newColor: color});
this.color = color;
},
setPos: function(pos)
{
History.Add(this, {Type: historyitem_Gs_SetPos, oldPos: this.pos, newPos: pos});
//History.Add(this, {Type: historyitem_Gs_SetPos, oldPos: this.pos, newPos: pos});
this.pos = pos;
},
......@@ -3460,13 +3460,11 @@ GradLin.prototype =
setAngle: function(angle)
{
History.Add(this, {Type: historyitem_GradLin_SetAngle, oldAngle: this.angle, newAngle: angle});
this.angle = angle;
},
setScale: function(scale)
{
History.Add(this, {Type: historyitem_GradLin_SetScale, oldScale: this.scale, newScale: scale});
this.scale = scale;
},
......@@ -3634,13 +3632,11 @@ GradPath.prototype =
setPath: function(path)
{
History.Add(this, {Type: historyitem_GradPath_SetPath, oldPath: this.path, newPath: path});
this.path = path;
},
setRect: function(rect)
{
History.Add(this, {Type: historyitem_GradPath_SetRect, oldRect: this.rect, newRect: rect});
this.rect = rect;
},
......@@ -5226,8 +5222,39 @@ function EndArrow()
this.len = null;
this.w = null;
}
var LineJoinType = {
Empty : 0,
Round : 1,
Bevel : 2,
Miter : 3
};
this.compare = function(end_arrow)
EndArrow.prototype =
{
Get_Id: function()
{
return this.Id;
},
Refresh_RecalcData: function()
{},
Write_ToBinary2: function (w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Id);
},
Read_FromBinary2: function (r)
{
this.Id = r.GetString2();
},
compare: function(end_arrow)
{
if(end_arrow == null)
{
......@@ -5247,23 +5274,23 @@ function EndArrow()
_ret.w = this.w;
}
return _ret;
};
},
this.createDuplicate = function()
createDuplicate: function()
{
var duplicate = new EndArrow();
duplicate.type = this.type;
duplicate.len = this.len;
duplicate.w = this.w;
return duplicate;
};
},
this.IsIdentical= function(arrow)
IsIdentical: function(arrow)
{
return arrow && arrow.type == this.type && arrow.len == this.len && arrow.w == this.w;
};
},
this.GetWidth = function(size)
GetWidth: function(size)
{
if (null == this.w)
return size * 3;
......@@ -5277,8 +5304,8 @@ function EndArrow()
break;
}
return 3 * size;
};
this.GetLen = function(size)
},
GetLen: function(size)
{
if (null == this.len)
return size * 3;
......@@ -5292,36 +5319,6 @@ function EndArrow()
break;
}
return 3 * size;
};
}
var LineJoinType = {
Empty : 0,
Round : 1,
Bevel : 2,
Miter : 3
};
EndArrow.prototype =
{
Get_Id: function()
{
return this.Id;
},
Refresh_RecalcData: function()
{},
Write_ToBinary2: function (w)
{
w.WriteLong(this.getObjectType());
w.WriteString2(this.Id);
},
Read_FromBinary2: function (r)
{
this.Id = r.GetString2();
},
getObjectType: function()
......@@ -5331,20 +5328,17 @@ EndArrow.prototype =
setType: function(type)
{
History.Add(this, {Type:historyitem_EndArrow_SetType, oldType: this.type, newType: type});
this.type = type;
},
setLen: function(len)
{
History.Add(this, {Type:historyitem_EndArrow_SetLen, oldLen: this.len, newLen: len});
this.len = len;
},
setW: function(w)
{
History.Add(this, {Type:historyitem_EndArrow_SetW, oldW: this.w, newW: w});
this.w = w;
},
......@@ -5509,15 +5503,6 @@ function LineJoin()
{
this.type = null;
this.limit = null;
this.createDuplicate = function()
{
var duplicate = new LineJoin();
duplicate.type = this.type;
duplicate.limit = this.limit;
return duplicate;
}
}
LineJoin.prototype =
......@@ -5534,15 +5519,21 @@ LineJoin.prototype =
return historyitem_type_LineJoin;
},
createDuplicate: function()
{
var duplicate = new LineJoin();
duplicate.type = this.type;
duplicate.limit = this.limit;
return duplicate;
},
setType: function(type)
{
History.Add(this, {Type:historyitem_LineJoin_SetType, oldType: this.type, newType: type});
this.type = type;
},
setLimit: function(limit)
{
History.Add(this, {Type:historyitem_LineJoin_SetLimit, oldLimit: this.limit, newLimit: limit});
this.limit = limit;
},
......@@ -10998,8 +10989,6 @@ function CBg()
this.bwMode = null;
this.bgPr = null;
this.bgRef = null;
}
CBg.prototype =
......@@ -11014,17 +11003,17 @@ CBg.prototype =
setBwMode: function(pr)
{
History.Add(this, {Type: historyitem_BgSetBwMode, oldPr: this.bwMode, newPr: pr});
//History.Add(this, {Type: historyitem_BgSetBwMode, oldPr: this.bwMode, newPr: pr});
this.bwMode = pr;
},
setBgPr: function(pr)
{
History.Add(this, {Type: historyitem_BgSetBgPr, oldPr: this.bgPr, newPr: pr});
//History.Add(this, {Type: historyitem_BgSetBgPr, oldPr: this.bgPr, newPr: pr});
this.bgPr = pr;
},
setBgRef: function(pr)
{
History.Add(this, {Type: historyitem_BgSetBgRef, oldPr: this.bgRef, newPr: pr});
//History.Add(this, {Type: historyitem_BgSetBgRef, oldPr: this.bgRef, newPr: pr});
this.bgRef = pr;
},
......
......@@ -8719,9 +8719,17 @@ CDocument.prototype =
Get_SelectedContent : function(bUseHistory)
{
var bNeedTurnOffHistory = (History.Is_On() && true !== bUseHistory);
var bNeedTurnOffTableId = g_oTableId.m_bTurnOff === false && true !== bUseHistory;
if (bNeedTurnOffHistory)
{
History.TurnOff();
}
if(bNeedTurnOffTableId)
{
g_oTableId.m_bTurnOff = true;
}
var SelectedContent = new CSelectedContent();
// Заполняем выделенный контент
......@@ -8736,6 +8744,10 @@ CDocument.prototype =
if (bNeedTurnOffHistory)
History.TurnOn();
if(bNeedTurnOffTableId)
{
g_oTableId.m_bTurnOff = false;
}
return null;
}
......@@ -8758,6 +8770,11 @@ CDocument.prototype =
if (bNeedTurnOffHistory)
History.TurnOn();
if(bNeedTurnOffTableId)
{
g_oTableId.m_bTurnOff = false;
}
return SelectedContent;
},
......
......@@ -5411,8 +5411,6 @@ asc_docs_api.prototype.ImgApply = function(obj)
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
}, this, []);
}
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
}
}
};
......
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