Commit 0133999d 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@58627 954022d7-b5bf-4e40-9824-e11837661b57
parent 8648b2a2
......@@ -1670,8 +1670,13 @@ function DrawingObjects() {
// Constructor
//-----------------------------------------------------------------------------------
_this.createDrawingObject = function() {
return new DrawingBase(worksheet);
_this.createDrawingObject = function(type) {
var drawingBase = new DrawingBase(worksheet);
if(isRealNumber(type))
{
drawingBase.Type = type;
}
return drawingBase;
};
_this.cloneDrawingObject = function(object) {
......
......@@ -44,7 +44,7 @@ CShape.prototype.getDrawingObjectsController = function()
};
function addToDrawings(worksheet, graphic, position, lockByDefault)
function addToDrawings(worksheet, graphic, position, lockByDefault, anchor)
{
var drawingObjects;
......@@ -62,7 +62,7 @@ function addToDrawings(worksheet, graphic, position, lockByDefault)
drawingObjects = new DrawingObjects();
}
var drawingObject = drawingObjects.createDrawingObject();
var drawingObject = drawingObjects.createDrawingObject(anchor);
drawingObject.graphicObject = graphic;
graphic.setDrawingBase(drawingObject);
if(!worksheet)
......@@ -107,7 +107,7 @@ function deleteDrawingBase(aObjects, graphicId)
CShape.prototype.addToDrawingObjects = function(pos)
{
var controller = this.getDrawingObjectsController();
var position = addToDrawings(this.worksheet, this, pos, /*lockByDefault*/undefined);
var position = addToDrawings(this.worksheet, this, pos, /*lockByDefault*/undefined, c_oAscCellAnchorType.cellanchorAbsolute);
var data = {Type: historyitem_AutoShapes_AddToDrawingObjects, Pos: position};
History.Add(this, data);
this.worksheet.addContentChanges(new CContentChangesElement(contentchanges_Add, data.Pos, 1, data));
......
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