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

AltGraph mode

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65162 954022d7-b5bf-4e40-9824-e11837661b57
parent fec3e1eb
......@@ -1842,7 +1842,7 @@ function CEditorPage(api)
global_keyboardEvent.AltKey = false;
global_keyboardEvent.CtrlKey = false;
global_keyboardEvent.ShiftKey = false;
global_keyboardEvent.AltGr = false;
}
this.onKeyDown = function(e)
......
......@@ -2039,15 +2039,15 @@ CPresentation.prototype =
bRetValue = keydownresult_PreventKeyPress;
}
}
else if ( e.KeyCode == 49 && false === editor.isViewMode && true === e.CtrlKey && true === e.AltKey ) // Alt + Ctrl + Num1 - применяем стиль Heading1
else if ( e.KeyCode == 49 && false === editor.isViewMode && true === e.AltKey && !e.AltGr ) // Alt + Ctrl + Num1 - применяем стиль Heading1
{
bRetValue = keydownresult_PreventAll;
}
else if ( e.KeyCode == 50 && false === editor.isViewMode && true === e.CtrlKey && true === e.AltKey ) // Alt + Ctrl + Num2 - применяем стиль Heading2
else if ( e.KeyCode == 50 && false === editor.isViewMode && true === e.AltKey && !e.AltGr ) // Alt + Ctrl + Num2 - применяем стиль Heading2
{
bRetValue = keydownresult_PreventAll;
}
else if ( e.KeyCode == 51 && false === editor.isViewMode && true === e.CtrlKey && true === e.AltKey ) // Alt + Ctrl + Num3 - применяем стиль Heading3
else if ( e.KeyCode == 51 && false === editor.isViewMode && true === e.AltKey && !e.AltGr ) // Alt + Ctrl + Num3 - применяем стиль Heading3
{
bRetValue = keydownresult_PreventAll;
}
......@@ -2450,11 +2450,6 @@ CPresentation.prototype =
if ( true === editor.isViewMode )
return false;
//Ctrl и Atl только для команд, word не водит текста с зажатыми Ctrl или Atl
//команды полностью обрабатываются в keypress
if(e.CtrlKey || e.AltKey)
return false;
var Code;
if (null != e.Which)
Code = e.Which;
......
......@@ -2541,6 +2541,7 @@ function CEditorPage(api)
global_keyboardEvent.AltKey = false;
global_keyboardEvent.CtrlKey = false;
global_keyboardEvent.ShiftKey = false;
global_keyboardEvent.AltGr = false;
}
this.onKeyPress = function(e)
{
......
......@@ -111,6 +111,7 @@ function CKeyboardEvent()
this.AltKey = false; // ������ �� ������ alt
this.CtrlKey = false; // ������ �� ������ ctrl
this.ShiftKey = false; // ������ �� ������ shift
this.AltGr = false;
this.Sender = null; // �� ������ html �������� ������ �����
......@@ -129,6 +130,11 @@ function check_KeyboardEvent(e)
global_keyboardEvent.CtrlKey = e.ctrlKey || e.metaKey;
else
global_keyboardEvent.CtrlKey = e.ctrlKey;
global_keyboardEvent.AltGr = (global_keyboardEvent.CtrlKey && global_keyboardEvent.AltKey) ? true : false;
if (global_keyboardEvent.CtrlKey && global_keyboardEvent.AltKey)
global_keyboardEvent.CtrlKey = false;
global_keyboardEvent.ShiftKey = e.shiftKey;
......@@ -148,6 +154,11 @@ function check_KeyboardEvent2(e)
global_keyboardEvent.CtrlKey = e.ctrlKey;
global_keyboardEvent.ShiftKey = e.shiftKey;
global_keyboardEvent.AltGr = (global_keyboardEvent.CtrlKey && global_keyboardEvent.AltKey) ? true : false;
if (global_keyboardEvent.CtrlKey && global_keyboardEvent.AltKey)
global_keyboardEvent.CtrlKey = false;
}
function check_MouseMoveEvent(e)
......
......@@ -9978,7 +9978,7 @@ CDocument.prototype =
bRetValue = keydownresult_PreventKeyPress;
}
}
else if ( e.KeyCode == 49 && false === editor.isViewMode && true === e.CtrlKey && true === e.AltKey ) // Alt + Ctrl + Num1 - применяем стиль Heading1
else if ( e.KeyCode == 49 && false === editor.isViewMode && true === e.AltKey && !e.AltGr ) // Alt + Ctrl + Num1 - применяем стиль Heading1
{
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Properties) )
{
......@@ -9988,7 +9988,7 @@ CDocument.prototype =
}
bRetValue = keydownresult_PreventAll;
}
else if ( e.KeyCode == 50 && false === editor.isViewMode && true === e.CtrlKey && true === e.AltKey ) // Alt + Ctrl + Num2 - применяем стиль Heading2
else if ( e.KeyCode == 50 && false === editor.isViewMode && true === e.AltKey && !e.AltGr) // Alt + Ctrl + Num2 - применяем стиль Heading2
{
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Properties) )
{
......@@ -9998,7 +9998,7 @@ CDocument.prototype =
}
bRetValue = keydownresult_PreventAll;
}
else if ( e.KeyCode == 51 && false === editor.isViewMode && true === e.CtrlKey && true === e.AltKey ) // Alt + Ctrl + Num3 - применяем стиль Heading3
else if ( e.KeyCode == 51 && false === editor.isViewMode && true === e.AltKey && !e.AltGr ) // Alt + Ctrl + Num3 - применяем стиль Heading3
{
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Properties) )
{
......@@ -10343,7 +10343,7 @@ CDocument.prototype =
bRetValue = keydownresult_PreventAll;
}
}
else if (true === e.AltKey) // Alt + =
else if (true === e.AltKey && !e.AltGr) // Alt + =
{
var oSelectedInfo = this.Get_SelectedElementsInfo();
var oMath = oSelectedInfo.Get_Math();
......
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