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

Исправлен баг с переносом плавающих автофигур (баг 21483).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50924 954022d7-b5bf-4e40-9824-e11837661b57
parent addf5e1a
......@@ -3201,6 +3201,7 @@ Paragraph.prototype =
if ( true === Item.Is_Inline() || true === this.Parent.Is_DrawingShape() )
{
Item.Update_Position( X, Y , this.Get_StartPage_Absolute() + CurPage, 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, this.Pages[CurPage].Y, PageLimits );
Item.Reset_SavedPosition();
bFirstLineItem = false;
X += Item.WidthVisible;
......@@ -3237,6 +3238,7 @@ Paragraph.prototype =
{
// Все нормально, можно продолжить пересчет
LDRecalcInfo.Reset();
Item.Reset_SavedPosition();
}
else if ( true === this.Parent.Is_TableCellContent() )
{
......@@ -3268,6 +3270,7 @@ Paragraph.prototype =
{
// Картинка ложится на или под текст, в данном случае пересчет можно спокойно продолжать
Item.Update_Position( X, Y , this.Get_StartPage_Absolute() + CurPage, 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, this.Pages[CurPage].Y, PageLimits);
Item.Reset_SavedPosition();
continue;
}
}
......
......@@ -3901,6 +3901,20 @@ ParaDrawing.prototype =
},
Update_Position : function(X, Y, PageNum, LastItemW, ColumnStartX, ColumnEndX, Left_Margin, Right_Margin, Page_W, Top_Margin, Bottom_Margin, Page_H, MarginH, MarginV, LineTop, ParagraphTop, PageLimits)
{
if ( undefined != this.PositionH_Old )
{
this.PositionH.RelativeFrom = this.PositionH_Old.RelativeFrom2;
this.PositionH.Align = this.PositionH_Old.Align2;
this.PositionH.Value = this.PositionH_Old.Value2;
}
if ( undefined != this.PositionV_Old )
{
this.PositionV.RelativeFrom = this.PositionV_Old.RelativeFrom2;
this.PositionV.Align = this.PositionV_Old.Align2;
this.PositionV.Value = this.PositionV_Old.Value2;
}
this.DocumentContent = this.Parent.Parent;
var OtherFlowObjects = this.mainGraphicObjects.getAllFloatObjectsOnPage( PageNum, this.Parent.Parent );
......@@ -3947,8 +3961,6 @@ ParaDrawing.prototype =
this.Set_PositionH( this.PositionH_Old.RelativeFrom, false, Value );
// На всякий случай пересчитаем заново координату
this.X = this.Internal_Position.Calculate_X(bInline, this.PositionH.RelativeFrom, this.PositionH.Align, this.PositionH.Value);
this.PositionH_Old = undefined;
}
if ( undefined != this.PositionV_Old )
......@@ -3963,13 +3975,17 @@ ParaDrawing.prototype =
this.Set_PositionV( this.PositionV_Old.RelativeFrom, false, Value );
// На всякий случай пересчитаем заново координату
this.Y = this.Internal_Position.Calculate_Y(bInline, this.PositionV.RelativeFrom, this.PositionV.Align, this.PositionV.Value);
this.PositionV_Old = undefined;
}
this.updatePosition3( this.PageNum, this.X, this.Y );
},
Reset_SavedPosition : function()
{
this.PositionV_Old = undefined;
this.PositionH_Old = undefined;
},
setParagraphBorders: function(val)
{
if(isRealObject(this.GraphicObj) && typeof this.GraphicObj.setParagraphBorders === "function")
......@@ -4250,14 +4266,22 @@ ParaDrawing.prototype =
{
RelativeFrom : this.PositionH.RelativeFrom,
Align : this.PositionH.Align,
Value : this.PositionH.Value
Value : this.PositionH.Value,
RelativeFrom2 : c_oAscRelativeFromH.Page,
Align2 : false,
Value2 : X
};
this.PositionV_Old =
{
RelativeFrom : this.PositionV.RelativeFrom,
Align : this.PositionV.Align,
Value : this.PositionV.Value
Value : this.PositionV.Value,
RelativeFrom2 : c_oAscRelativeFromV.Page,
Align2 : false,
Value2 : Y
};
this.PositionH.RelativeFrom = c_oAscRelativeFromH.Page;
......@@ -4342,14 +4366,22 @@ ParaDrawing.prototype =
{
RelativeFrom : this.PositionH.RelativeFrom,
Align : this.PositionH.Align,
Value : this.PositionH.Value
Value : this.PositionH.Value,
RelativeFrom2 : c_oAscRelativeFromH.Page,
Align2 : false,
Value2 : X
};
this.PositionV_Old =
{
RelativeFrom : this.PositionV.RelativeFrom,
Align : this.PositionV.Align,
Value : this.PositionV.Value
Value : this.PositionV.Value,
RelativeFrom2 : c_oAscRelativeFromV.Page,
Align2 : false,
Value2 : Y
};
this.PositionH.RelativeFrom = c_oAscRelativeFromH.Page;
......
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