Commit 84d1ac07 authored by SergeyLuzyanin's avatar SergeyLuzyanin

fix adding OleObject

parent d0329a47
......@@ -7023,6 +7023,7 @@ DrawingObjectsController.prototype =
AscFormat.fillImage(oleObject, rasterImageId, x, y, extX, extY);
oleObject.setData(data);
oleObject.setApplicationId(sApplicationId);
oleObject.setPixSizes(extX*AscCommon.g_dKoef_pix_to_mm, extY*AscCommon.g_dKoef_pix_to_mm);
return oleObject;
},
......
......@@ -675,8 +675,8 @@ CImageShape.prototype.Undo = function(data)
}
case AscDFH.historyitem_ImageShapeSetPixSizes:
{
this.m_nPixWidth = dara.oldPr.w;
this.m_nPixHeight = dara.oldPr.h;
this.m_nPixWidth = data.oldPr.w;
this.m_nPixHeight = data.oldPr.h;
break;
}
case AscDFH.historyitem_AutoShapes_SetBFromSerialize:
......@@ -774,8 +774,8 @@ CImageShape.prototype.Redo = function(data)
case AscDFH.historyitem_ImageShapeSetPixSizes:
{
this.m_nPixWidth = dara.newPr.w;
this.m_nPixHeight = dara.newPr.h;
this.m_nPixWidth = data.newPr.w;
this.m_nPixHeight = data.newPr.h;
break;
}
case AscDFH.historyitem_AutoShapes_SetBFromSerialize:
......@@ -874,7 +874,7 @@ CImageShape.prototype.Save_Changes = function(data, w)
case AscDFH.historyitem_ImageShapeSetPixSizes:
{
AscFormat.writeLong(w, data.newPr.w);
AscFormat.writeLong(w, dara.newPr.h);
AscFormat.writeLong(w, data.newPr.h);
break;
}
case AscDFH.historyitem_AutoShapes_SetBFromSerialize:
......
......@@ -609,12 +609,12 @@ baseEditorsApi.prototype._uploadCallback = function(error, files) {
baseEditorsApi.prototype.asc_addOleObject = function(sImageUrl, sData, sApplicationId){
var oThis = this;
this.asc_checkImageUrlAndAction(sImageUrl, function(oImage){oThis.asc_addOleObjectAction(AscCommon.g_oDocumentUrls.getImageLocal(oImage.src), sData, sApplicationId, oImage.width * AscCommon.g_dKoef_pix_to_mm, oImage.height * AscCommon.g_dKoef_pix_to_mm);});
this.asc_checkImageUrlAndAction(sImageUrl, function(oImage){oThis.asc_addOleObjectAction(AscCommon.g_oDocumentUrls.getImageLocal(oImage.src), sData, sApplicationId, oImage.Image.width * AscCommon.g_dKoef_pix_to_mm, oImage.Image.height * AscCommon.g_dKoef_pix_to_mm);});
};
baseEditorsApi.prototype.asc_editOleObject = function(bResize, sImageUrl, sData){
var oThis = this;
this.asc_checkImageUrlAndAction(sImageUrl, function(oImage){oThis.asc_editOleObjectAction(bResize, AscCommon.g_oDocumentUrls.getImageLocal(oImage.src), sData, oImage.width, oImage.height);});
this.asc_checkImageUrlAndAction(sImageUrl, function(oImage){oThis.asc_editOleObjectAction(bResize, AscCommon.g_oDocumentUrls.getImageLocal(oImage.src), sData, oImage.Image.width, oImage.Image.height);});
};
baseEditorsApi.prototype.asc_addOleObjectAction = function(sLocalUrl, sData, sApplicationId, fWidth, fHeight)
......
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