Commit eee6f8ca authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

горячая клавиша для евро по аналогии с редактором документов

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52597 954022d7-b5bf-4e40-9824-e11837661b57
parent 880129bf
...@@ -3119,11 +3119,8 @@ CPresentation.prototype = ...@@ -3119,11 +3119,8 @@ CPresentation.prototype =
} }
case STATES_ID_TEXT_ADD: case STATES_ID_TEXT_ADD:
case STATES_ID_TEXT_ADD_IN_GROUP: case STATES_ID_TEXT_ADD_IN_GROUP:
{
if(this.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{ {
this.Paragraph_Add(new ParaTab()); this.Paragraph_Add(new ParaTab());
}
break; break;
} }
} }
...@@ -3143,10 +3140,6 @@ CPresentation.prototype = ...@@ -3143,10 +3140,6 @@ CPresentation.prototype =
} }
else else
{ {
var CheckType = ( e.ShiftKey || e.CtrlKey ? changestype_Paragraph_Content : changestype_Document_Content_Add );
if ( false === this.Document_Is_SelectionLocked(CheckType) )
{
this.Create_NewHistoryPoint();
if ( e.ShiftKey ) if ( e.ShiftKey )
{ {
this.Paragraph_Add( new ParaNewLine( break_Line ) ); this.Paragraph_Add( new ParaNewLine( break_Line ) );
...@@ -3160,7 +3153,6 @@ CPresentation.prototype = ...@@ -3160,7 +3153,6 @@ CPresentation.prototype =
this.Add_NewParagraph(); this.Add_NewParagraph();
} }
} }
}
bRetValue = true; bRetValue = true;
} }
...@@ -3182,9 +3174,6 @@ CPresentation.prototype = ...@@ -3182,9 +3174,6 @@ CPresentation.prototype =
} }
else if ( e.KeyCode == 32 && false === editor.isViewMode ) // Space else if ( e.KeyCode == 32 && false === editor.isViewMode ) // Space
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.Create_NewHistoryPoint();
if ( true === e.ShiftKey && true === e.CtrlKey ) if ( true === e.ShiftKey && true === e.CtrlKey )
{ {
this.DrawingDocument.TargetStart(); this.DrawingDocument.TargetStart();
...@@ -3203,7 +3192,6 @@ CPresentation.prototype = ...@@ -3203,7 +3192,6 @@ CPresentation.prototype =
this.Paragraph_Add( new ParaSpace( 1 ) ); this.Paragraph_Add( new ParaSpace( 1 ) );
} }
}
bRetValue = true; bRetValue = true;
} }
...@@ -3560,12 +3548,8 @@ CPresentation.prototype = ...@@ -3560,12 +3548,8 @@ CPresentation.prototype =
var TextPr = this.Get_Paragraph_TextPr(); var TextPr = this.Get_Paragraph_TextPr();
if ( null != TextPr ) if ( null != TextPr )
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.Create_NewHistoryPoint();
this.Paragraph_Add( new ParaTextPr( { Bold : TextPr.Bold === true ? false : true } ) ); this.Paragraph_Add( new ParaTextPr( { Bold : TextPr.Bold === true ? false : true } ) );
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
}
bRetValue = true; bRetValue = true;
} }
} }
...@@ -3583,16 +3567,22 @@ CPresentation.prototype = ...@@ -3583,16 +3567,22 @@ CPresentation.prototype =
} }
} }
else if ( e.KeyCode == 69 && false === editor.isViewMode && true === e.CtrlKey ) // Ctrl + E - переключение прилегания параграфа между center и left else if ( e.KeyCode == 69 && false === editor.isViewMode && true === e.CtrlKey ) // Ctrl + E - переключение прилегания параграфа между center и left
{
if ( true !== e.AltKey ) // Ctrl + E - переключение прилегания параграфа между center и left
{ {
var ParaPr = this.Get_Paragraph_ParaPr(); var ParaPr = this.Get_Paragraph_ParaPr();
if ( null != ParaPr ) if ( null != ParaPr )
{
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Properties) )
{ {
this.Create_NewHistoryPoint(); this.Create_NewHistoryPoint();
this.Set_ParagraphAlign( ParaPr.Jc === align_Center ? align_Left : align_Center ); this.Set_ParagraphAlign( ParaPr.Jc === align_Center ? align_Left : align_Center );
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
bRetValue = true;
} }
}
else // Ctrl + Alt + E - добавляем знак евро €
{
this.Paragraph_Add( new ParaText( "" ) );
bRetValue = true; bRetValue = true;
} }
} }
...@@ -3601,12 +3591,7 @@ CPresentation.prototype = ...@@ -3601,12 +3591,7 @@ CPresentation.prototype =
var TextPr = this.Get_Paragraph_TextPr(); var TextPr = this.Get_Paragraph_TextPr();
if ( null != TextPr ) if ( null != TextPr )
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.Create_NewHistoryPoint();
this.Paragraph_Add( new ParaTextPr( { Italic : TextPr.Italic === true ? false : true } ) ); this.Paragraph_Add( new ParaTextPr( { Italic : TextPr.Italic === true ? false : true } ) );
this.Document_UpdateInterfaceState();
}
bRetValue = true; bRetValue = true;
} }
} }
...@@ -3635,7 +3620,7 @@ CPresentation.prototype = ...@@ -3635,7 +3620,7 @@ CPresentation.prototype =
{ {
if ( true === e.ShiftKey ) // Ctrl + Shift + L - добавляем список к данному параграфу if ( true === e.ShiftKey ) // Ctrl + Shift + L - добавляем список к данному параграфу
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) ) if ( false === this.Document_Is_SelectionLocked(changestype_Drawing_Props) )
{ {
this.Create_NewHistoryPoint(); this.Create_NewHistoryPoint();
this.Set_ParagraphNumbering( { Type : 0, SubType : 1 } ); this.Set_ParagraphNumbering( { Type : 0, SubType : 1 } );
...@@ -3669,11 +3654,7 @@ CPresentation.prototype = ...@@ -3669,11 +3654,7 @@ CPresentation.prototype =
{ {
if ( true === e.ShiftKey && false === editor.isViewMode ) // Ctrl + Shift + P - добавляем номер страницы в текущую позицию if ( true === e.ShiftKey && false === editor.isViewMode ) // Ctrl + Shift + P - добавляем номер страницы в текущую позицию
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.Create_NewHistoryPoint();
this.Paragraph_Add( new ParaPageNum() ); this.Paragraph_Add( new ParaPageNum() );
}
bRetValue = true; bRetValue = true;
} }
else // Ctrl + P - print else // Ctrl + P - print
...@@ -3706,12 +3687,7 @@ CPresentation.prototype = ...@@ -3706,12 +3687,7 @@ CPresentation.prototype =
var TextPr = this.Get_Paragraph_TextPr(); var TextPr = this.Get_Paragraph_TextPr();
if ( null != TextPr ) if ( null != TextPr )
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.Create_NewHistoryPoint();
this.Paragraph_Add( new ParaTextPr( { Underline : TextPr.Underline === true ? false : true } ) ); this.Paragraph_Add( new ParaTextPr( { Underline : TextPr.Underline === true ? false : true } ) );
this.Document_UpdateInterfaceState();
}
bRetValue = true; bRetValue = true;
} }
} }
...@@ -3760,7 +3736,7 @@ CPresentation.prototype = ...@@ -3760,7 +3736,7 @@ CPresentation.prototype =
} }
else if ( e.KeyCode == 88 && false === editor.isViewMode && true === e.CtrlKey ) // Ctrl + X - cut else if ( e.KeyCode == 88 && false === editor.isViewMode && true === e.CtrlKey ) // Ctrl + X - cut
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) ) if ( false === this.Document_Is_SelectionLocked(changestype_Drawing_Props) )
{ {
this.Create_NewHistoryPoint(); this.Create_NewHistoryPoint();
Editor_Copy(this.DrawingDocument.m_oWordControl.m_oApi, true); Editor_Copy(this.DrawingDocument.m_oWordControl.m_oApi, true);
...@@ -3862,15 +3838,10 @@ CPresentation.prototype = ...@@ -3862,15 +3838,10 @@ CPresentation.prototype =
var TextPr = this.Get_Paragraph_TextPr(); var TextPr = this.Get_Paragraph_TextPr();
if ( null != TextPr ) if ( null != TextPr )
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.Create_NewHistoryPoint();
if ( true === e.ShiftKey ) if ( true === e.ShiftKey )
this.Paragraph_Add( new ParaTextPr( { VertAlign : TextPr.VertAlign === vertalign_SuperScript ? vertalign_Baseline : vertalign_SuperScript } ) ); this.Paragraph_Add( new ParaTextPr( { VertAlign : TextPr.VertAlign === vertalign_SuperScript ? vertalign_Baseline : vertalign_SuperScript } ) );
else else
this.Paragraph_Add( new ParaTextPr( { VertAlign : TextPr.VertAlign === vertalign_SubScript ? vertalign_Baseline : vertalign_SubScript } ) ); this.Paragraph_Add( new ParaTextPr( { VertAlign : TextPr.VertAlign === vertalign_SubScript ? vertalign_Baseline : vertalign_SubScript } ) );
this.Document_UpdateInterfaceState();
}
bRetValue = true; bRetValue = true;
} }
} }
...@@ -3879,21 +3850,12 @@ CPresentation.prototype = ...@@ -3879,21 +3850,12 @@ CPresentation.prototype =
var TextPr = this.Get_Paragraph_TextPr(); var TextPr = this.Get_Paragraph_TextPr();
if ( null != TextPr ) if ( null != TextPr )
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.Create_NewHistoryPoint();
this.Paragraph_Add( new ParaTextPr( { VertAlign : TextPr.VertAlign === vertalign_SuperScript ? vertalign_Baseline : vertalign_SuperScript } ) ); this.Paragraph_Add( new ParaTextPr( { VertAlign : TextPr.VertAlign === vertalign_SuperScript ? vertalign_Baseline : vertalign_SuperScript } ) );
this.Document_UpdateInterfaceState();
}
bRetValue = true; bRetValue = true;
} }
} }
else if ( e.KeyCode == 189 && false === editor.isViewMode ) // Клавиша Num- else if ( e.KeyCode == 189 && false === editor.isViewMode ) // Клавиша Num-
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.Create_NewHistoryPoint();
this.DrawingDocument.TargetStart(); this.DrawingDocument.TargetStart();
this.DrawingDocument.TargetShow(); this.DrawingDocument.TargetShow();
...@@ -3909,7 +3871,6 @@ CPresentation.prototype = ...@@ -3909,7 +3871,6 @@ CPresentation.prototype =
Item = new ParaText( "-" ); Item = new ParaText( "-" );
this.Paragraph_Add( Item ); this.Paragraph_Add( Item );
}
bRetValue = true; bRetValue = true;
} }
else if ( e.KeyCode == 190 && true === e.CtrlKey ) // Ctrl + . else if ( e.KeyCode == 190 && true === e.CtrlKey ) // Ctrl + .
...@@ -3917,12 +3878,8 @@ CPresentation.prototype = ...@@ -3917,12 +3878,8 @@ CPresentation.prototype =
var TextPr = this.Get_Paragraph_TextPr(); var TextPr = this.Get_Paragraph_TextPr();
if ( null != TextPr ) if ( null != TextPr )
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.Create_NewHistoryPoint();
this.Paragraph_Add( new ParaTextPr( { VertAlign : TextPr.VertAlign === vertalign_SubScript ? vertalign_Baseline : vertalign_SubScript } ) ); this.Paragraph_Add( new ParaTextPr( { VertAlign : TextPr.VertAlign === vertalign_SubScript ? vertalign_Baseline : vertalign_SubScript } ) );
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
}
bRetValue = true; bRetValue = true;
} }
} }
...@@ -3977,7 +3934,7 @@ CPresentation.prototype = ...@@ -3977,7 +3934,7 @@ CPresentation.prototype =
} }
else*/ if ( Code > 0x20 ) else*/ if ( Code > 0x20 )
{ {
//if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) ) //if ( false === this.Document_Is_SelectionLocked(changestype_Drawing_Props) )
{ {
//this.Create_NewHistoryPoint(); //this.Create_NewHistoryPoint();
...@@ -7117,10 +7074,6 @@ CPresentation.prototype = ...@@ -7117,10 +7074,6 @@ CPresentation.prototype =
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
TextBox_Put : function(sText) TextBox_Put : function(sText)
{ {
if ( false === this.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.Create_NewHistoryPoint();
// Отключаем пересчет, включим перед последним добавлением. Поскольку, // Отключаем пересчет, включим перед последним добавлением. Поскольку,
// у нас все добавляется в 1 параграф, так можно делать. // у нас все добавляется в 1 параграф, так можно делать.
this.TurnOffRecalc = true; this.TurnOffRecalc = true;
...@@ -7136,8 +7089,6 @@ CPresentation.prototype = ...@@ -7136,8 +7089,6 @@ CPresentation.prototype =
this.Paragraph_Add( new ParaSpace(1) ); this.Paragraph_Add( new ParaSpace(1) );
else else
this.Paragraph_Add( new ParaText(_char) ); this.Paragraph_Add( new ParaText(_char) );
}
// На случай, если Count = 0 // На случай, если Count = 0
this.TurnOffRecalc = false; this.TurnOffRecalc = false;
} }
......
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