Commit 0f616f5f authored by Ilya Kirillov's avatar Ilya Kirillov

Added hotkeys for testing purpose the work of a content controls.

parent 0ff82352
......@@ -6879,7 +6879,63 @@ CDocument.prototype.OnKeyDown = function(e)
bUpdateSelection = false;
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode == 121 && true === e.ShiftKey) // Shift + F10 - контекстное меню
else if (e.KeyCode === 112 && true === e.ShiftKey)
{
this.Api.asc_AddContentControl(AscCommonWord.sdttype_InlineLevel);
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode === 113 && true === e.ShiftKey)
{
this.Api.asc_AddContentControl(AscCommonWord.sdttype_BlockLevel);
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode === 114 && true === e.ShiftKey)
{
this.Api.asc_RemoveContentControl();
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode === 115 && true === e.ShiftKey)
{
this.Api.asc_RemoveContentControlWrapper();
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode === 116 && true === e.ShiftKey)
{
var oContentControlPr = new AscCommonWord.CContentControlPr();
oContentControlPr.put_Lock(AscCommonWord.sdtlock_Unlocked);
this.Api.asc_SetContentControlProperties(oContentControlPr);
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode === 117 && true === e.ShiftKey)
{
var oContentControlPr = new AscCommonWord.CContentControlPr();
oContentControlPr.put_Lock(AscCommonWord.sdtlock_ContentLocked);
this.Api.asc_SetContentControlProperties(oContentControlPr);
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode === 118 && true === e.ShiftKey)
{
var oContentControlPr = new AscCommonWord.CContentControlPr();
oContentControlPr.put_Lock(AscCommonWord.sdtlock_SdtLocked);
this.Api.asc_SetContentControlProperties(oContentControlPr);
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode === 119 && true === e.ShiftKey)
{
var oContentControlPr = new AscCommonWord.CContentControlPr();
oContentControlPr.put_Lock(AscCommonWord.sdtlock_SdtContentLocked);
this.Api.asc_SetContentControlProperties(oContentControlPr);
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode === 120 && true === e.ShiftKey)
{
if (true !== e.CtrlKey)
this.Api.restrictions = Asc.c_oAscRestrictionType.OnlyForms;
else
this.Api.restrictions = Asc.c_oAscRestrictionType.None;
bRetValue = keydownresult_PreventAll;
}
else if (e.KeyCode == 121 && true === e.ShiftKey) // Shift + F10 - контекстное меню
{
var X_abs, Y_abs, oPosition, ConvertedPos;
if (this.DrawingObjects.selectedObjects.length > 0)
......
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