Commit 35478148 authored by Ilya Kirillov's avatar Ilya Kirillov

Fixed bug #34557

parent 8bf9594d
......@@ -9199,6 +9199,15 @@ Paragraph.prototype =
Page_H = 0;
}
var PageLimitsOrigin = this.Parent.Get_PageLimits(PageRel);
if (true === this.Parent.Is_TableCellContent() && false === Drawing.Is_LayoutInCell())
{
PageLimitsOrigin = LogicDocument.Get_PageLimits(PageAbs);
var PageFieldsOrigin = LogicDocument.Get_PageFields(PageAbs);
ColumnStartX = PageFieldsOrigin.X;
ColumnEndX = PageFieldsOrigin.XLimit;
}
if ( undefined != Drawing && true != Drawing.Use_TextWrap() )
{
PageFields = LD_PageFields;
......@@ -9207,7 +9216,7 @@ Paragraph.prototype =
var ParagraphTop = (true != Drawing.Use_TextWrap() ? this.Lines[this.Pages[_CurPage].StartLine].Top + this.Pages[_CurPage].Y : this.Pages[_CurPage].Y);
var Layout = new CParagraphLayout(DrawingLayout.X, DrawingLayout.Y , this.Get_AbsolutePage(CurPage), DrawingLayout.LastW, ColumnStartX, ColumnEndX, X_Left_Margin, X_Right_Margin, Page_Width, Top_Margin, Bottom_Margin, Page_H, PageFields.X, PageFields.Y, this.Pages[CurPage].Y + this.Lines[CurLine].Y - this.Lines[CurLine].Metrics.Ascent, ParagraphTop);
return {ParagraphLayout : Layout, PageLimits : PageLimits};
return {ParagraphLayout : Layout, PageLimits : PageLimits, PageLimitsOrigin : PageLimitsOrigin};
}
}
......
......@@ -1328,9 +1328,9 @@ ParaDrawing.prototype.private_SetXYByLayout = function(X, Y, PageNum, Layout, bC
var _W = (this.PositionH.Align ? this.Extent.W : this.getXfrmExtX() );
var _H = (this.PositionV.Align ? this.Extent.H : this.getXfrmExtY() );
this.Internal_Position.Set(_W, _H, this.YOffset, Layout.ParagraphLayout, Layout.PageLimits);
this.Internal_Position.Calculate_X(false, c_oAscRelativeFromH.Page, false, X - Layout.PageLimits.X, false);
this.Internal_Position.Calculate_Y(false, c_oAscRelativeFromV.Page, false, Y - Layout.PageLimits.Y, false);
this.Internal_Position.Set(_W, _H, this.YOffset, Layout.ParagraphLayout, Layout.PageLimitsOrigin);
this.Internal_Position.Calculate_X(false, c_oAscRelativeFromH.Page, false, X - Layout.PageLimitsOrigin.X, false);
this.Internal_Position.Calculate_Y(false, c_oAscRelativeFromV.Page, false, Y - Layout.PageLimitsOrigin.Y, false);
this.Internal_Position.Correct_Values(false, Layout.PageLimits, this.AllowOverlap, this.Use_TextWrap(), []);
if (true === bChangeX)
......
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