Commit ac60f77c authored by Sergey Luzyanin's avatar Sergey Luzyanin

asc_startEditCurrentOleObject

parent b447ebd1
......@@ -2428,6 +2428,13 @@ var editor;
};
spreadsheet_api.prototype.asc_startEditCurrentOleObject = function(){
var ws = this.wb.getWorksheet();
if(ws && ws.objectRender){
ws.objectRender.startEditCurrentOleObject();
}
};
spreadsheet_api.prototype.asc_isAddAutoshape = function() {
return this.isStartAddShape;
};
......
......@@ -3554,6 +3554,10 @@ function DrawingObjects() {
this.controller.editOleObjectFromParams(oOleObject, sData, sImageUrl, nPixWidth, nPixHeight, bResize);
};
_this.startEditCurrentOleObject = function(){
this.controller.startEditCurrentOleObject();
};
_this.groupGraphicObjects = function() {
if ( _this.controller.canGroup() ) {
......
......@@ -1008,6 +1008,34 @@ DrawingObjectsController.prototype =
}
},
startEditCurrentOleObject: function(){
var oSelector = this.selection.groupSelection ? this.selection.groupSelection : this;
var oThis = this;
if(oSelector.selectedObjects.length === 1 && oSelector.selectedObjects[0].getObjectType() === AscDFH.historyitem_type_OleObject){
var oleObject = oSelector.selectedObjects[0];
this.checkSelectedObjectsAndFireCallback(function(){
var pluginData = new Asc.CPluginData();
pluginData.setAttribute("data", oleObject.m_sData);
pluginData.setAttribute("guid", oleObject.m_sApplicationId);
pluginData.setAttribute("width", oleObject.extX);
pluginData.setAttribute("height", oleObject.extY);
pluginData.setAttribute("widthPix", oleObject.m_nPixWidth);
pluginData.setAttribute("heightPix", oleObject.m_nPixHeight);
pluginData.setAttribute("objectId", oleObject.Id);
if (window["Asc"]["editor"]) {
window["Asc"]["editor"].asc_pluginRun(oleObject.m_sApplicationId, 0, pluginData);
}
else {
if (editor){
editor.asc_pluginRun(oleObject.m_sApplicationId, 0, pluginData);
}
}
}, []);
}
},
checkSelectedObjectsForMove: function(group, pageIndex)
{
var selected_object = group ? group.selectedObjects : this.selectedObjects;
......
......@@ -905,6 +905,10 @@
{
};
baseEditorsApi.prototype.asc_startEditCurrentOleObject = function(){
};
// Version History
baseEditorsApi.prototype.asc_showRevision = function(newObj)
{
......
......@@ -3716,6 +3716,12 @@ background-repeat: no-repeat;\
}
};
asc_docs_api.prototype.asc_startEditCurrentOleObject = function(){
if(this.WordControl.m_oLogicDocument.Slides[this.WordControl.m_oLogicDocument.CurPage])
this.WordControl.m_oLogicDocument.Slides[this.WordControl.m_oLogicDocument.CurPage].graphicObjects.startEditCurrentOleObject();
};
asc_docs_api.prototype.AddTextArt = function(nStyle)
{
if (editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
......
......@@ -1262,6 +1262,7 @@ CGraphicObjects.prototype =
this.document.OnMouseUp(e, x, y, pageIndex);
},
handleOleObjectDoubleClick: function(drawing, oleObject, e, x, y, pageIndex)
{
if(drawing && drawing.ParaMath){
......@@ -1285,6 +1286,25 @@ CGraphicObjects.prototype =
this.document.OnMouseUp(e, x, y, pageIndex);
},
startEditCurrentOleObject: function(){
var oSelector = this.selection.groupSelection ? this.selection.groupSelection : this;
var oThis = this;
if(oSelector.selectedObjects.length === 1 && oSelector.selectedObjects[0].getObjectType() === AscDFH.historyitem_type_OleObject){
var oleObject = oSelector.selectedObjects[0];
if(false === this.document.Document_Is_SelectionLocked(changestype_Drawing_Props)){
var pluginData = new Asc.CPluginData();
pluginData.setAttribute("data", oleObject.m_sData);
pluginData.setAttribute("guid", oleObject.m_sApplicationId);
pluginData.setAttribute("width", oleObject.extX);
pluginData.setAttribute("height", oleObject.extY);
pluginData.setAttribute("widthPix", oleObject.m_nPixWidth);
pluginData.setAttribute("heightPix", oleObject.m_nPixHeight);
pluginData.setAttribute("objectId", oleObject.Id);
editor.asc_pluginRun(oleObject.m_sApplicationId, 0, pluginData);
}
}
},
handleMathDrawingDoubleClick : function(drawing, e, x, y, pageIndex)
{
drawing.Convert_ToMathObject();
......
......@@ -5656,6 +5656,10 @@ background-repeat: no-repeat;\
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
}
};
asc_docs_api.prototype.asc_startEditCurrentOleObject = function(){
this.WordControl.m_oLogicDocument.DrawingObjects.startEditCurrentOleObject();
};
//-----------------------------------------------------------------
// События контекстного меню
//-----------------------------------------------------------------
......
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