Commit 7568dadc authored by Sergey Luzyanin's avatar Sergey Luzyanin

remove creating history point in edit ole-object

parent 84209cec
......@@ -423,7 +423,6 @@ DrawingObjectsController.prototype.addImageFromParams = function(rasterImageId,
};
DrawingObjectsController.prototype.addOleObjectFromParams = function(fPosX, fPosY, fWidth, fHeight, nWidthPix, nHeightPix, sLocalUrl, sData, sApplicationId){
History.Create_NewPoint();
var oOleObject = this.createOleObject(sData, sApplicationId, sLocalUrl, fPosX, fPosY, fWidth, fHeight, nWidthPix, nHeightPix);
this.resetSelection();
oOleObject.setWorksheet(this.drawingObjects.getWorksheetModel());
......@@ -436,9 +435,6 @@ DrawingObjectsController.prototype.addOleObjectFromParams = function(fPosX, fPos
};
DrawingObjectsController.prototype.editOleObjectFromParams = function(oOleObject, sData, sImageUrl, nPixWidth, nPixHeight, bResize){
if(!bResize){
History.Create_NewPoint();
}
oOleObject.setData(sData);
var _blipFill = new AscFormat.CBlipFill();
_blipFill.RasterImageId = sImageUrl;
......
......@@ -729,7 +729,7 @@ CImageShape.prototype.Undo = function(data)
}
case AscDFH.historyitem_ImageShapeSetApplicationId:
{
this.m_sData = data.oldId;
this.m_sApplicationId = data.oldId;
break;
}
case AscDFH.historyitem_ImageShapeSetPixSizes:
......@@ -853,7 +853,7 @@ CImageShape.prototype.Redo = function(data)
}
case AscDFH.historyitem_ImageShapeSetApplicationId:
{
this.m_sData = data.newId;
this.m_sApplicationId = data.newId;
break;
}
......
......@@ -3701,11 +3701,7 @@ background-repeat: no-repeat;\
var _image = this.ImageLoader.LoadImage(AscCommon.getFullImageSrc2(sLocalUrl), 1);
if (null != _image)//картинка уже должна быть загружена
{
if (false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(AscCommon.changestype_Drawing_Props))
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(AscDFH.historydescription_Document_AddOleObject);
this.WordControl.m_oLogicDocument.Add_OleObject(fWidth, fHeight, nWidthPix, nHeightPix, sLocalUrl, sData, sApplicationId);
}
this.WordControl.m_oLogicDocument.Add_OleObject(fWidth, fHeight, nWidthPix, nHeightPix, sLocalUrl, sData, sApplicationId);
}
};
......@@ -3713,17 +3709,8 @@ background-repeat: no-repeat;\
{
if (oOleObject)
{
if (!bResize)
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(AscDFH.historydescription_Document_EditOleObject);
this.WordControl.m_oLogicDocument.Edit_OleObject(oOleObject, sData, sImageUrl, nPixWidth, nPixHeight);
this.WordControl.m_oLogicDocument.Recalculate();
}
else
{
this.WordControl.m_oLogicDocument.Edit_OleObject(oOleObject, sData, sImageUrl, nPixWidth, nPixHeight);
this.WordControl.m_oLogicDocument.Recalculate();
}
this.WordControl.m_oLogicDocument.Edit_OleObject(oOleObject, sData, sImageUrl, nPixWidth, nPixHeight);
this.WordControl.m_oLogicDocument.Recalculate();
}
};
......
......@@ -5580,11 +5580,7 @@ background-repeat: no-repeat;\
var _image = this.ImageLoader.LoadImage(AscCommon.getFullImageSrc2(sLocalUrl), 1);
if (null != _image)//картинка уже должна быть загружена
{
if (false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content))
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(AscDFH.historydescription_Document_AddOleObject);
this.WordControl.m_oLogicDocument.Add_OleObject(fWidth, fHeight, nWidthPix, nHeightPix, sLocalUrl, sData, sApplicationId);
}
this.WordControl.m_oLogicDocument.Add_OleObject(fWidth, fHeight, nWidthPix, nHeightPix, sLocalUrl, sData, sApplicationId);
}
};
......@@ -5592,22 +5588,9 @@ background-repeat: no-repeat;\
{
if (oOleObject)
{
if (!bResize)
{
if (false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content))
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint(AscDFH.historydescription_Document_EditOleObject);
this.WordControl.m_oLogicDocument.Edit_OleObject(oOleObject, sData, sImageUrl, nPixWidth, nPixHeight);
this.WordControl.m_oLogicDocument.Recalculate();
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
}
}
else
{
this.WordControl.m_oLogicDocument.Edit_OleObject(oOleObject, sData, sImageUrl, nPixWidth, nPixHeight);
this.WordControl.m_oLogicDocument.Recalculate();
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
}
this.WordControl.m_oLogicDocument.Edit_OleObject(oOleObject, sData, sImageUrl, nPixWidth, nPixHeight);
this.WordControl.m_oLogicDocument.Recalculate();
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
}
};
//-----------------------------------------------------------------
......
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