Commit 720d5dc6 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@50877 954022d7-b5bf-4e40-9824-e11837661b57
parent c66a4fd6
......@@ -4702,6 +4702,12 @@ CTableMeasurement.prototype =
this.W = Reader.GetDouble();
this.Type = Reader.GetLong();
},
Set_FromObject : function(Obj)
{
this.W = Obj.W;
this.Type = Obj.Type;
}
}
......
......@@ -14678,7 +14678,6 @@ CTable.prototype =
this.HeaderInfo.Pages[CurPage].Draw = false;
}
var Shifted_Cell = new Object();
var bNextPage = false;
for ( var CurRow = FirstRow; CurRow < this.Content.length; CurRow++ )
{
......@@ -14850,7 +14849,6 @@ CTable.prototype =
{
bCanShift = true;
ShiftDy = -Cell.Content.Pages[0].Y + Y_content_start;
Shifted_Cell[Cell.Get_Id()] = Cell;
}
}
......@@ -14865,8 +14863,7 @@ CTable.prototype =
{
if ( true === bCanShift )
{
if ( Math.abs( ShiftDx ) > 0.001 || Math.abs( ShiftDy ) > 0.001 )
Cell.Content.Shift( 0, ShiftDx, ShiftDy );
Cell.Content.Shift( 0, ShiftDx, ShiftDy );
}
else if ( recalcresult2_NextPage === Cell.Content.Recalculate_Page( CellPageIndex, true ) )
{
......@@ -15179,27 +15176,24 @@ CTable.prototype =
Y_0 += CellMar.Top.W;
if ( undefined === Shifted_Cell[Cell.Get_Id()] )
{
var Y_1 = this.TableRowsBottom[CurRow][CurPage] - CellMar.Bottom.W;
var CellHeight = Y_1 - Y_0;
var CellContentBounds = Cell.Content.Get_PageBounds( CellPageIndex );
var ContentHeight = CellContentBounds.Bottom - CellContentBounds.Top;
var Y_1 = this.TableRowsBottom[CurRow][CurPage] - CellMar.Bottom.W;
var CellHeight = Y_1 - Y_0;
var Dy = 0;
if ( CellHeight - ContentHeight > 0.001 )
{
if ( vertalignjc_Bottom === VAlign )
Dy = CellHeight - ContentHeight;
else if ( vertalignjc_Center === VAlign )
Dy = (CellHeight - ContentHeight) / 2;
var CellContentBounds = Cell.Content.Get_PageBounds( CellPageIndex );
var ContentHeight = CellContentBounds.Bottom - CellContentBounds.Top;
Cell.Content.Shift( CellPageIndex, 0, Dy );
}
var Dy = 0;
if ( CellHeight - ContentHeight > 0.001 )
{
if ( vertalignjc_Bottom === VAlign )
Dy = CellHeight - ContentHeight;
else if ( vertalignjc_Center === VAlign )
Dy = (CellHeight - ContentHeight) / 2;
Cell.Temp.Y_VAlign_offset[CellPageIndex] = Dy;
Cell.Content.Shift( CellPageIndex, 0, Dy );
}
Cell.Temp.Y_VAlign_offset[CellPageIndex] = Dy;
}
}
......
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