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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49655 954022d7-b5bf-4e40-9824-e11837661b57
parent 532fa43d
......@@ -93,6 +93,12 @@ var historyitem_Drawing_BehindDoc = 10; // Изменяем положе
var historyitem_Drawing_SetZIndex = 11;
var historyitem_Drawing_SetGraphicObject = 12;
var historyitem_CalculateAfterPaste = 13;
var historyitem_SetSimplePos = 14;
var historyitem_SetExtent = 15;
var historyitem_SetWrapPolygon = 16;
// Типы изменений в классе CDrawingObjects
......
......@@ -4552,6 +4552,26 @@ ParaDrawing.prototype =
}
if(isRealObject(this.GraphicObj))
this.GraphicObj.parent = this;
break;
}
case historyitem_SetSimplePos:
{
this.SimplePos.Use = Data.oldUse;
this.SimplePos.X = Data.oldX;
this.SimplePos.Y = Data.oldY;
break;
}
case historyitem_SetExtent:
{
this.Extent.W = Data.oldW;
this.Extent.H = Data.oldH;
break;
}
case historyitem_SetWrapPolygon:
{
this.wrappingPolygon = Data.oldW;
break;
}
}
},
......@@ -4675,6 +4695,26 @@ ParaDrawing.prototype =
}
if(isRealObject(this.GraphicObj))
this.GraphicObj.parent = this;
break;
}
case historyitem_SetSimplePos:
{
this.SimplePos.Use = Data.newUse;
this.SimplePos.X = Data.newX;
this.SimplePos.Y = Data.newY;
break;
}
case historyitem_SetExtent:
{
this.Extent.W = Data.newW;
this.Extent.H = Data.newH;
break;
}
case historyitem_SetWrapPolygon:
{
this.wrappingPolygon = Data.newW;
break;
}
}
},
......@@ -5042,6 +5082,45 @@ ParaDrawing.prototype =
{
Writer.WriteString2(Data.newId);
}
break;
}
case historyitem_SetSimplePos:
{
Writer.WriteBool(Data.newUse);
Writer.WriteBool(typeof Data.newX === "number");
if(typeof Data.newX === "number")
{
Writer.WriteDouble(Data.newX);
}
Writer.WriteBool(typeof Data.newY === "number");
if(typeof Data.newY === "number")
{
Writer.WriteDouble(Data.newY);
}
break;
}
case historyitem_SetExtent:
{
Writer.WriteBool(typeof Data.newW === "number");
if(typeof Data.newW === "number")
{
Writer.WriteDouble(Data.newW);
}
Writer.WriteBool(typeof Data.newH === "number");
if(typeof Data.newH === "number")
{
Writer.WriteDouble(Data.newH);
}
break;
}
case historyitem_SetWrapPolygon:
{
Writer.WriteBool(Data.newW !== null && typeof Data.newW === "object");
if(Data.newW !== null && typeof Data.newW === "object")
{
Writer.WriteString2(Data.newW);
}
break;
}
}
......@@ -5247,6 +5326,43 @@ ParaDrawing.prototype =
}
break;
}
case historyitem_SetSimplePos:
{
this.SimplePos.Use = Reader.GetBool();
if(Reader.GetBool())
{
this.SimplePos.X = Reader.GetDouble();
}
if(Reader.GetBool())
{
this.SimplePos.Y = Reader.GetDouble();
}
break;
}
case historyitem_SetExtent:
{
if(Reader.GetBool())
{
this.Extent.W = Reader.GetDouble();
}
if(Reader.GetBool())
{
this.Extent.H = Reader.GetDouble();
}
break;
}
case historyitem_SetWrapPolygon:
{
if(Reader.GetBool())
{
this.wrappingPolygon = g_oTableId.Get_ById(Reader.GetString2());
}
else
{
this.wrapPolygon = null;
}
break;
}
}
},
//-----------------------------------------------------------------------------------
......@@ -6421,6 +6537,27 @@ ParaDrawing.prototype =
}
},
setSimplePos: function(use, x, y)
{
History.Add(this, {Type: historyitem_SetSimplePos, oldX: this.SimplePos.X, oldY: this.SimplePos.Y, oldUse: this.SimplePos.Use, newX:x, newY: y, newUse: use});
this.SimplePos.Use = use;
this.SimplePos.X = x;
this.SimplePos.Y = y;
},
setExtent: function(extX, extY)
{
History.Add(this, {Type: historyitem_SetExtent, oldW: this.Extent.W, oldH: this.Extent.H, newW: extX, newH: extY});
this.Extent.W = extX;
this.Extent.H = extY;
},
addWrapPolygon: function(wrapPolygon)
{
History.Add(this, {Type: historyitem_SetExtent, oldW: this.wrappingPolygon, newW: wrapPolygon});
this.wrappingPolygon = wrapPolygon;
},
copy: function()
{
var c = new ParaDrawing(this.W, this.H, null, editor.WordControl.m_oLogicDocument.DrawingDocument, null, null);
......
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