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

Bug 28281 - Не применяется Vertical Align для данных таблицы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64231 954022d7-b5bf-4e40-9824-e11837661b57
parent 2f5e8176
...@@ -1836,6 +1836,34 @@ DrawingObjectsController.prototype = ...@@ -1836,6 +1836,34 @@ DrawingObjectsController.prototype =
{ {
objects_by_type.groups[i].setVerticalAlign(props.verticalTextAlign); objects_by_type.groups[i].setVerticalAlign(props.verticalTextAlign);
} }
if(objects_by_type.tables.length == 1)
{
var props2 = new CTableProp();
if(props.verticalTextAlign === VERTICAL_ANCHOR_TYPE_BOTTOM)
{
props2.put_CellsVAlign(vertalignjc_Bottom);
}
else if(props.verticalTextAlign === VERTICAL_ANCHOR_TYPE_CENTER)
{
props2.put_CellsVAlign(vertalignjc_Center);
}
else
{
props2.put_CellsVAlign(vertalignjc_Top);
}
var target_text_object = getTargetTextObject(this);
if(target_text_object === objects_by_type.tables[0])
{
objects_by_type.tables[0].graphicObject.Set_Props(props2);
}
else
{
objects_by_type.tables[0].graphicObject.Select_All();
objects_by_type.tables[0].graphicObject.Set_Props(props2);
objects_by_type.tables[0].graphicObject.Selection_Remove();
}
editor.WordControl.m_oLogicDocument.Check_GraphicFrameRowHeight(objects_by_type.tables[0]);
}
} }
if(isRealNumber(props.vert)) if(isRealNumber(props.vert))
{ {
......
...@@ -594,17 +594,16 @@ CTable.prototype.Selection_Draw_Page = function(Page_abs) ...@@ -594,17 +594,16 @@ CTable.prototype.Selection_Draw_Page = function(Page_abs)
continue; continue;
var Bounds = Cell.Content_Get_PageBounds( Cell_PageRel ); var Bounds = Cell.Content_Get_PageBounds( Cell_PageRel );
var Y_offset = Cell.Temp.Y_VAlign_offset[Cell_PageRel];
if ( 0 != Cell_PageRel ) if ( 0 != Cell_PageRel )
{ {
// мы должны определить ряд, на котором случился перенос на новую страницу // мы должны определить ряд, на котором случился перенос на новую страницу
var TempRowIndex = this.Pages[CurPage].FirstRow; var TempRowIndex = this.Pages[CurPage].FirstRow;
this.DrawingDocument.AddPageSelection( Page_abs, X_start, this.RowsInfo[TempRowIndex].Y[CurPage] + this.RowsInfo[TempRowIndex].TopDy[CurPage] + Y_offset, X_end - X_start, this.RowsInfo[TempRowIndex].H[CurPage] ); this.DrawingDocument.AddPageSelection( Page_abs, X_start, this.RowsInfo[TempRowIndex].Y[CurPage] + this.RowsInfo[TempRowIndex].TopDy[CurPage], X_end - X_start, this.RowsInfo[TempRowIndex].H[CurPage] );
} }
else else
{ {
this.DrawingDocument.AddPageSelection( Page_abs, X_start, this.RowsInfo[Pos.Row].Y[CurPage] + this.RowsInfo[Pos.Row].TopDy[CurPage] + Y_offset, X_end - X_start, this.RowsInfo[Pos.Row].H[CurPage] ); this.DrawingDocument.AddPageSelection( Page_abs, X_start, this.RowsInfo[Pos.Row].Y[CurPage] + this.RowsInfo[Pos.Row].TopDy[CurPage], X_end - X_start, this.RowsInfo[Pos.Row].H[CurPage] );
} }
} }
break; break;
......
...@@ -2905,11 +2905,25 @@ CPresentation.prototype = ...@@ -2905,11 +2905,25 @@ CPresentation.prototype =
editor.sync_ImgPropCallback(drawing_props.chartProps); editor.sync_ImgPropCallback(drawing_props.chartProps);
} }
if(drawing_props.tableProps) if(drawing_props.tableProps)
{ {
this.CheckTableStyles(this.Slides[this.CurPage], drawing_props.tableProps.TableLook); this.CheckTableStyles(this.Slides[this.CurPage], drawing_props.tableProps.TableLook);
editor.sync_TblPropCallback(drawing_props.tableProps); editor.sync_TblPropCallback(drawing_props.tableProps);
if(!drawing_props.shapeProps)
{
if(drawing_props.tableProps.CellsVAlign === vertalignjc_Bottom)
{
editor.sync_VerticalTextAlign(VERTICAL_ANCHOR_TYPE_BOTTOM);
}
else if(drawing_props.tableProps.CellsVAlign === vertalignjc_Center)
{
editor.sync_VerticalTextAlign(VERTICAL_ANCHOR_TYPE_CENTER);
}
else
{
editor.sync_VerticalTextAlign(VERTICAL_ANCHOR_TYPE_TOP);
}
}
} }
if(target_content) if(target_content)
{ {
......
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