Commit fdbb5600 authored by Oleg Korshul's avatar Oleg Korshul Committed by Alexander.Trofimov

на Ctrl+P - песылаем евент asc_onPrint

parent 66787230
......@@ -5344,7 +5344,7 @@ function CThumbnailsManager()
{
if(global_keyboardEvent.CtrlKey)
{
this.m_oWordControl.m_oApi.asc_Print();
this.m_oWordControl.m_oApi.asc_PrintKey();
}
break;
}
......
......@@ -2576,7 +2576,7 @@ CPresentation.prototype =
}
else // Ctrl + P - print
{
this.DrawingDocument.m_oWordControl.m_oApi.asc_Print();
this.DrawingDocument.m_oWordControl.m_oApi.asc_PrintKey();
bRetValue = keydownresult_PreventAll;
}
}
......
......@@ -1044,6 +1044,14 @@ asc_docs_api.prototype.asc_Print = function(bIsDownloadEvent){
var options = {downloadType: bIsDownloadEvent ? DownloadType.Print: DownloadType.None};
_downloadAs(this, c_oAscFileType.PDF, c_oAscAsyncAction.Print, options);
};
asc_docs_api.prototype.asc_PrintKey = function(){
if (window["AscDesktopEditor"])
{
this.asc_Print();
return;
}
this.asc_fireCallback("asc_onPrint");
};
asc_docs_api.prototype.Undo = function(){
this.WordControl.m_oLogicDocument.Document_Undo();
};
......
......@@ -3171,7 +3171,7 @@ function CDocMeta()
}
else if ( e.KeyCode == 80 && true === e.CtrlKey ) // Ctrl + P + ...
{
editor.asc_Print();
editor.asc_PrintKey();
bRetValue = true;
}
else if ( e.KeyCode == 83 && true === e.CtrlKey ) // Ctrl + S + ...
......
......@@ -11069,7 +11069,7 @@ CDocument.prototype =
}
else // Ctrl + P - print
{
this.DrawingDocument.m_oWordControl.m_oApi.asc_Print();
this.DrawingDocument.m_oWordControl.m_oApi.asc_PrintKey();
bRetValue = keydownresult_PreventAll;
}
}
......
......@@ -1737,6 +1737,15 @@ asc_docs_api.prototype.asc_Print = function(bIsDownloadEvent)
}
this._print(c_oAscAsyncAction.Print, bIsDownloadEvent ? DownloadType.Print: DownloadType.None);
};
asc_docs_api.prototype.asc_PrintKey = function(){
if (window["AscDesktopEditor"])
{
this.asc_Print();
return;
}
this.asc_fireCallback("asc_onPrint");
};
asc_docs_api.prototype._print = function(actionType, downloadType) {
var command;
var options = {isNoData: false, downloadType: downloadType};
......
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