Commit ee13f09a authored by Oleg Korshul's avatar Oleg Korshul

add properties on AddContentControl plugin method

parent b0ec4a0b
......@@ -1344,7 +1344,7 @@ CDocumentContent.prototype.RecalculateCurPos = function()
CDocumentContent.prototype.Get_PageBounds = function(CurPage, Height, bForceCheckDrawings)
{
if (this.Pages.length <= 0)
return {Top : 0, Left : 0, Right : 0, Bottom : 0};
return new CDocumentBounds(0, 0, 0, 0);
if (CurPage < 0)
CurPage = 0;
......
......@@ -7275,6 +7275,8 @@ background-repeat: no-repeat;\
oLogicDocument.Recalculate();
oLogicDocument.Document_UpdateInterfaceState();
oLogicDocument.Document_UpdateSelectionState();
return oContentControl.GetContentControlPr();
}
}
else if (AscCommonWord.sdttype_InlineLevel === nType)
......@@ -7308,6 +7310,8 @@ background-repeat: no-repeat;\
oLogicDocument.Document_UpdateInterfaceState();
oLogicDocument.Document_UpdateSelectionState();
}
return oContentControl.GetContentControlPr();
}
}
};
......@@ -8074,9 +8078,19 @@ background-repeat: no-repeat;\
}
return _ret;
};
window["asc_docs_api"].prototype["pluginMethod_AddContentControl"] = function(type)
window["asc_docs_api"].prototype["pluginMethod_AddContentControl"] = function(type, pr)
{
return this.asc_AddContentControl(type);
var _content_control_pr;
if (pr)
{
_content_control_pr = new AscCommonWord.CContentControlPr();
_content_control_pr.Id = pr["Id"];
_content_control_pr.Tag = pr["Tag"];
_content_control_pr.Lock = pr["Lock"];
}
var _obj = this.asc_AddContentControl(type, _content_control_pr);
return {"Tag" : _obj.Tag, "Id" : _obj.Id, "Lock" : _obj.Lock, "InternalId" : _obj.InternalId};
};
window["asc_docs_api"].prototype["pluginMethod_RemoveContentControl"] = function(id)
{
......
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