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

26910 - [Autosave] Графический объект на скопированном листе при переоткрытии...

26910 - [Autosave] Графический объект на скопированном листе при переоткрытии книги смещается в левый верхний угол 

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58936 954022d7-b5bf-4e40-9824-e11837661b57
parent 4829cb65
......@@ -333,6 +333,7 @@ CChartSpace.prototype =
checkHitToBounds: CShape.prototype.checkHitToBounds,
calculateSnapArrays: CShape.prototype.calculateSnapArrays,
checkDrawingBaseCoords: CShape.prototype.checkDrawingBaseCoords,
setDrawingBaseCoords: CShape.prototype.setDrawingBaseCoords,
recalculateTextPr: function()
......
......@@ -1440,6 +1440,7 @@ CGroupShape.prototype =
recalculateCurPos: DrawingObjectsController.prototype.recalculateCurPos,
checkHitToBounds: CShape.prototype.checkHitToBounds,
checkDrawingBaseCoords: CShape.prototype.checkDrawingBaseCoords,
setDrawingBaseCoords: CShape.prototype.setDrawingBaseCoords,
calculateSnapArrays: function(snapArrayX, snapArrayY)
{
......
......@@ -146,6 +146,7 @@ CImageShape.prototype =
checkHitToBounds: CShape.prototype.checkHitToBounds,
calculateSnapArrays: CShape.prototype.calculateSnapArrays,
checkDrawingBaseCoords: CShape.prototype.checkDrawingBaseCoords,
setDrawingBaseCoords: CShape.prototype.setDrawingBaseCoords,
sendMouseData: function()
{
......
......@@ -2184,6 +2184,32 @@ CShape.prototype =
}
},
setDrawingBaseCoords: function(fromCol, fromColOff, fromRow, fromRowOff, toCol, toColOff, toRow, toRowOff)
{
if(this.drawingBase)
{
this.drawingBase.from.col = fromCol;
this.drawingBase.from.colOff = fromColOff;
this.drawingBase.from.row = fromRow;
this.drawingBase.from.rowOff = fromRowOff;
this.drawingBase.to.col = toCol;
this.drawingBase.to.colOff = toColOff;
this.drawingBase.to.row = toRow;
this.drawingBase.to.rowOff = toRowOff;
History.Add(this, {Type: historyitem_AutoShapes_SetDrawingBaseCoors,
fromCol: fromCol,
fromColOff: fromColOff,
fromRow : fromRow,
fromRowOff: fromRowOff,
toCol: toCol,
toColOff: toColOff,
toRow : toRow,
toRowOff: toRowOff
});
}
},
getTransformMatrix: function ()
{
return this.transform;
......
......@@ -2156,6 +2156,7 @@ Woorksheet.prototype.copyDrawingObjects=function(oNewWs, wsFrom)
{
var drawingObject = drawingObjects.cloneDrawingObject(this.Drawings[i]);
drawingObject.graphicObject = this.Drawings[i].graphicObject.copy();
drawingObject.graphicObject.setDrawingBaseCoords(this.Drawings[i].from.col, this.Drawings[i].from.colOff, this.Drawings[i].from.row, this.Drawings[i].from.rowOff, this.Drawings[i].to.col, this.Drawings[i].to.colOff, this.Drawings[i].to.row, this.Drawings[i].to.rowOff)
drawingObject.graphicObject.setWorksheet(oNewWs);
drawingObject.graphicObject.addToDrawingObjects();
oNewWs.Drawings[oNewWs.Drawings.length - 1] = drawingObject;
......
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