Commit 64cdd560 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48079 954022d7-b5bf-4e40-9824-e11837661b57
parent 3817bf2c
......@@ -271,6 +271,22 @@ CAbstractNum.prototype =
}
},
// Сдвигаем все уровни на заданное значение
Change_LeftInd : function(NewLeft)
{
var OldLeft = this.Lvl[0].ParaPr.Ind.Left;
for ( var Index = 0; Index < 9; Index++ )
{
var Lvl_new = this.Internal_CopyLvl( this.Lvl[Index] );
var Lvl_old = this.Lvl[Index];
Lvl_new.ParaPr.Ind.Left = Lvl_old.ParaPr.Ind.Left - OldLeft + NewLeft;
this.Internal_SetLvl( Index, Lvl_new );
History.Add( this, { Type : historyitem_AbstractNum_LvlChange, Index : Index, Old : Lvl_old, New : Lvl_new } );
}
},
Get_LvlByStyle : function(StyleId)
{
for ( var Index = 0; Index < 9; Index++ )
......
......@@ -8156,17 +8156,14 @@ Paragraph.prototype =
if ( undefined != NumParaPr.Ind && undefined != NumParaPr.Ind.Left )
{
var Left = LeftX + NumParaPr.Ind.Left;
AbstractNum.Change_LeftInd( LeftX + NumParaPr.Ind.Left );
History.Add( this, { Type : historyitem_Paragraph_Ind_First, Old : ( undefined != this.Pr.Ind.FirstLine ? this.Pr.Ind.FirstLine : undefined ), New : undefined } );
History.Add( this, { Type : historyitem_Paragraph_Ind_Left, Old : ( undefined != this.Pr.Ind.Left ? this.Pr.Ind.Left : undefined ), New : Left } );
if ( undefined === this.Pr.Ind )
this.Pr.Ind = new CParaInd();
History.Add( this, { Type : historyitem_Paragraph_Ind_Left, Old : ( undefined != this.Pr.Ind.Left ? this.Pr.Ind.Left : undefined ), New : undefined } );
// При добавлении списка в параграф, удаляем все собственные сдвиги
this.Pr.Ind.FirstLine = undefined;
this.Pr.Ind.Left = Left;
this.Pr.Ind.Left = undefined;
}
this.Pr.NumPr = new CNumPr();
......
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