Commit c7ade749 authored by Sergey Luzyanin's avatar Sergey Luzyanin

methods for mobile version

parent fd900ba1
......@@ -5330,6 +5330,46 @@ CPresentation.prototype =
this.Document_UpdateUndoRedoState();
},
AddShapeOnCurrentPage: function (sPreset) {
if(!this.Slides[this.CurPage]){
return;
}
var oDrawingObjects = this.Slides[this.CurPage].graphicObjects;
oDrawingObjects.changeCurrentState(new AscFormat.StartAddNewShape(oDrawingObjects, sPreset));
this.OnMouseDown({}, this.Width/4, this.Height/4, this.CurPage);
this.OnMouseUp({}, this.Width/4, this.Height/4, this.CurPage);
this.Document_UpdateInterfaceState();
this.Document_UpdateRulersState();
this.Document_UpdateSelectionState();
},
Can_CopyCut: function()
{
if(!this.Slides[this.CurPage]){
return false;
}
var oDrawingObjects = this.Slides[this.CurPage].graphicObjects;
var oTargetContent = oDrawingObjects.getTargetDocContent();
if (oTargetContent)
{
if (true === oTargetContent.Is_SelectionUse() && true !== oTargetContent.Selection_IsEmpty(true))
{
if (oTargetContent.Selection.StartPos !== oTargetContent.Selection.EndPos || type_Paragraph === oTargetContent.Content[oTargetContent.Selection.StartPos].Get_Type())
return true;
else
return oTargetContent.Content[oTargetContent.Selection.StartPos].Can_CopyCut();
}
return false;
}
else{
return oDrawingObjects.selectedObjects.length > 0;
}
},
StartAddShape: function(preset, _is_apply)
{
if(this.Slides[this.CurPage])
......
......@@ -4162,6 +4162,20 @@ background-repeat: no-repeat;\
this.WordControl.OnScroll();
};
asc_docs_api.prototype.AddShapeOnCurrentPage = function(sPreset){
if(!this.WordControl.m_oLogicDocument){
return;
}
this.WordControl.m_oLogicDocument.AddShapeOnCurrentPage(sPreset);
}
asc_docs_api.prototype.can_CopyCut = function(){
if(!this.WordControl.m_oLogicDocument){
return false;
}
return this.WordControl.m_oLogicDocument.Can_CopyCut();
}
/*----------------------------------------------------------------*/
/*functions for working with zoom & navigation*/
asc_docs_api.prototype.zoomIn = function()
......@@ -6910,6 +6924,9 @@ background-repeat: no-repeat;\
// mobile
asc_docs_api.prototype["asc_GetDefaultTableStyles"] = asc_docs_api.prototype.asc_GetDefaultTableStyles;
asc_docs_api.prototype["asc_Remove"] = asc_docs_api.prototype.asc_Remove;
asc_docs_api.prototype["AddShapeOnCurrentPage"] = asc_docs_api.prototype.AddShapeOnCurrentPage;
asc_docs_api.prototype["can_CopyCut"] = asc_docs_api.prototype.can_CopyCut;
window['Asc']['asc_CCommentData'] = window['Asc'].asc_CCommentData = asc_CCommentData;
asc_CCommentData.prototype['asc_getText'] = asc_CCommentData.prototype.asc_getText;
......
......@@ -2509,6 +2509,9 @@ background-repeat: no-repeat;\
if (!this.WordControl.m_oLogicDocument)
return;
this.WordControl.m_oDrawingDocument.StartTableStylesCheck();
this.WordControl.m_oDrawingDocument.TableStylesСheckLook = new Asc.CTablePropLook();
this.WordControl.m_oDrawingDocument.TableStylesСheckLook.FirstCol = true;
......
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