Commit 2688eda2 authored by Sergey Luzyanin's avatar Sergey Luzyanin

копирование OleObject; исправлено падение при dblClick по OleObject в презентациях и таблицах

parent 8d20c9f8
......@@ -879,7 +879,7 @@ DrawingObjectsController.prototype =
if (object.getObjectType() === AscDFH.historyitem_type_ChartSpace && this.handleChartDoubleClick)
this.handleChartDoubleClick(drawing, object, e, x, y, pageIndex);
if (object.getObjectType() === AscDFH.historyitem_type_OleObject && this.handleChartDoubleClick){
if (object.getObjectType() === AscDFH.historyitem_type_OleObject && this.handleOleObjectDoubleClick){
this.handleOleObjectDoubleClick(drawing, object, e, x, y, pageIndex);
}
else if (2 == e.ClickCount && drawing instanceof ParaDrawing && drawing.Is_MathEquation())
......
......@@ -38,6 +38,40 @@ function (window, undefined) {
this.m_nPixWidth = nPixWidth;
this.m_nPixHeight = nPixHeight;
};
COleObject.prototype.copy = function()
{
var copy = new COleObject();
if(this.nvPicPr)
{
copy.setNvPicPr(this.nvPicPr.createDuplicate());
}
if(this.spPr)
{
copy.setSpPr(this.spPr.createDuplicate());
copy.spPr.setParent(copy);
}
if(this.blipFill)
{
copy.setBlipFill(this.blipFill.createDuplicate());
}
if(this.style)
{
copy.setStyle(this.style.createDuplicate());
}
copy.setBDeleted(this.bDeleted);
if(this.fromSerialize)
{
copy.setBFromSerialize(true);
}
copy.setData(this.m_sData);
copy.setApplicationId(this.m_sApplicationId);
copy.setPixSizes(this.m_nPixWidth, this.m_nPixHeight);
copy.cachedImage = this.getBase64Img();
copy.cachedPixH = this.cachedPixH;
copy.cachedPixW = this.cachedPixW;
return copy;
};
window['AscFormat'] = window['AscFormat'] || {};
window['AscFormat'].COleObject = COleObject;
})(window);
\ No newline at end of file
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