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

Исправлен баг, связанный с копированием автофигуры, содержащей таблицу (баг 19622).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49491 954022d7-b5bf-4e40-9824-e11837661b57
parent 94baafa8
...@@ -160,12 +160,17 @@ CDocumentContent.prototype = ...@@ -160,12 +160,17 @@ CDocumentContent.prototype =
{ {
if ( true === this.Parent.Is_Cell() || this.Parent instanceof WordShape ) if ( true === this.Parent.Is_Cell() || this.Parent instanceof WordShape )
{ {
var Y = this.Pages[PageIndex].Y ; if ( PageIndex < this.Pages.length && PageIndex > 0 )
var YLimit = this.Pages[PageIndex].YLimit; {
var X = this.Pages[PageIndex].X; var Y = this.Pages[PageIndex].Y ;
var XLimit = this.Pages[PageIndex].XLimit; var YLimit = this.Pages[PageIndex].YLimit;
var X = this.Pages[PageIndex].X;
var XLimit = this.Pages[PageIndex].XLimit;
return { X : X, XLimit : XLimit, Y : Y, YLimit : YLimit } return { X : X, XLimit : XLimit, Y : Y, YLimit : YLimit }
}
else
return { X : 0, XLimit : Page_Width, Y : 0, YLimit : Page_Height }
} }
else else
return { X : X_Left_Field, Y : Y_Top_Field, XLimit : X_Right_Field, YLimit : Y_Bottom_Field }; return { X : X_Left_Field, Y : Y_Top_Field, XLimit : X_Right_Field, YLimit : Y_Bottom_Field };
......
...@@ -20575,22 +20575,27 @@ CTableCell.prototype = ...@@ -20575,22 +20575,27 @@ CTableCell.prototype =
var TablePr = Table.Get_CompiledPr(false).TablePr; var TablePr = Table.Get_CompiledPr(false).TablePr;
if ( tbllayout_AutoFit === TablePr.TableLayout ) if ( tbllayout_AutoFit === TablePr.TableLayout )
{ {
// Если изменение внутри ячейки влечет за собой изменение сетки таблицы, тогда if ( this.Row.Table.Parent.Pages.length > 0 )
// пересчитывать таблицу надо с самого начала. {
var CurCol; // Если изменение внутри ячейки влечет за собой изменение сетки таблицы, тогда
var ColsCount = Table.TableGrid.length; // пересчитывать таблицу надо с самого начала.
var TableGrid_old = new Array(); var CurCol;
for ( CurCol = 0; CurCol < ColsCount; CurCol++ ) var ColsCount = Table.TableGrid.length;
TableGrid_old[CurCol] = Table.TableGrid[CurCol]; var TableGrid_old = new Array();
for ( CurCol = 0; CurCol < ColsCount; CurCol++ )
TableGrid_old[CurCol] = Table.TableGrid[CurCol];
Table.Internal_RecalculateGrid(); Table.Internal_RecalculateGrid();
var TableGrid_new = Table.TableGrid; var TableGrid_new = Table.TableGrid;
for ( CurCol = 0; CurCol < ColsCount; CurCol++ ) for ( CurCol = 0; CurCol < ColsCount; CurCol++ )
{ {
if ( Math.abs( TableGrid_old[CurCol] - TableGrid_new[CurCol] ) > 0.001 ) if ( Math.abs( TableGrid_old[CurCol] - TableGrid_new[CurCol] ) > 0.001 )
return Table.Refresh_RecalcData2( 0, 0 ); return Table.Refresh_RecalcData2( 0, 0 );
}
} }
else
return Table.Refresh_RecalcData2( 0, 0 );
} }
this.Row.Refresh_RecalcData2( this.Index, Page_Rel ); this.Row.Refresh_RecalcData2( this.Index, Page_Rel );
......
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