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

Сделано, чтобы при добавлении новой колонки в таблице копировались настройки текста (баг 22495).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55063 954022d7-b5bf-4e40-9824-e11837661b57
parent 088e0b93
......@@ -221,6 +221,14 @@ Paragraph.prototype =
return Para;
},
Get_FirstRunPr : function()
{
if ( this.Content.length <= 0 || para_Run !== this.Content[0].Type )
return this.TextPr.Value.Copy();
return this.Content[0].Pr.Copy();
},
Get_AllDrawingObjects : function(DrawingObjs)
{
if ( undefined === DrawingObjs )
......@@ -13799,6 +13807,8 @@ Paragraph.prototype =
EndPos = this.Selection.StartPos;
}
var EndPos = Math.min( this.Content.length - 1, EndPos );
for ( var CurPos = StartPos; CurPos <= EndPos; CurPos++ )
{
this.Content[CurPos].Selection_Remove();
......
......@@ -11852,6 +11852,13 @@ CTable.prototype =
var NextCell = ( Add_info[CurRow] >= Row.Get_CellsCount() - 1 ? Row.Get_Cell( Add_info[CurRow] - 1 ) : Row.Get_Cell( Add_info[CurRow] + 1 ) );
NewCell.Copy_Pr(NextCell.Pr, true);
// Скопируем текстовые настройки
var FirstPara = NextCell.Content.Get_FirstParagraph();
var TextPr = FirstPara.Get_FirstRunPr();
NewCell.Content.Set_ApplyToAll( true );
NewCell.Content.Paragraph_Add( new ParaTextPr( TextPr ) );
NewCell.Content.Set_ApplyToAll( false );
if ( false === bBefore2 )
Rows_info[CurRow].splice( Add_info[CurRow], 0, { W : Width, Type : 0, GridSpan : 1 } );
else
......@@ -11918,6 +11925,14 @@ CTable.prototype =
var NextCell = ( Add_info[CurRow] + 1 >= Row.Get_CellsCount() - 1 ? Row.Get_Cell( Add_info[CurRow] ) : Row.Get_Cell( Add_info[CurRow] + 2 ) );
NewCell.Copy_Pr(NextCell.Pr, true);
// Скопируем текстовые настройки
var FirstPara = NextCell.Content.Get_FirstParagraph();
var TextPr = FirstPara.Get_FirstRunPr();
NewCell.Content.Set_ApplyToAll( true );
NewCell.Content.Paragraph_Add( new ParaTextPr( TextPr ) );
NewCell.Content.Set_ApplyToAll( false );
if ( false === bBefore2 )
Rows_info[CurRow].splice( Add_info[CurRow] + 1, 0, { W : Width, Type : 0, GridSpan : 1 } );
else
......
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