Commit 94bfa264 authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 33543

parent 675336be
...@@ -635,10 +635,10 @@ CWrapPolygon.prototype = ...@@ -635,10 +635,10 @@ CWrapPolygon.prototype =
if(this.relativeArrPoints.length === 0) if(this.relativeArrPoints.length === 0)
{ {
this.arrPoints.length = 0; this.arrPoints.length = 0;
this.localLeft = bounds.l - oDistance.L - AscFormat.getValOrDefault(oEffectExtent.L, 0); this.localLeft = -oDistance.L - AscFormat.getValOrDefault(oEffectExtent.L, 0);
this.localRight = bounds.r + oDistance.R + AscFormat.getValOrDefault(oEffectExtent.R, 0); this.localRight = drawing.parent.Extent.W + oDistance.R + AscFormat.getValOrDefault(oEffectExtent.R, 0);
this.localTop = bounds.t - oDistance.T - AscFormat.getValOrDefault(oEffectExtent.T, 0); this.localTop = -oDistance.T - AscFormat.getValOrDefault(oEffectExtent.T, 0);
this.localBottom = bounds.b + oDistance.B + AscFormat.getValOrDefault(oEffectExtent.B, 0); this.localBottom = drawing.parent.Extent.H + oDistance.B + AscFormat.getValOrDefault(oEffectExtent.B, 0);
return; return;
} }
var relArr = this.relativeArrPoints; var relArr = this.relativeArrPoints;
......
...@@ -829,7 +829,7 @@ ParaDrawing.prototype.CheckWH = function() ...@@ -829,7 +829,7 @@ ParaDrawing.prototype.CheckWH = function()
{ {
if (!this.GraphicObj) if (!this.GraphicObj)
return; return;
var dW, dH, bInline = this.Is_Inline(); var dW, dH;
this.GraphicObj.recalculate(); this.GraphicObj.recalculate();
var extX, extY; var extX, extY;
if (this.GraphicObj.spPr.xfrm && AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX) && AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY)) if (this.GraphicObj.spPr.xfrm && AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extX) && AscFormat.isRealNumber(this.GraphicObj.spPr.xfrm.extY))
...@@ -862,10 +862,10 @@ ParaDrawing.prototype.CheckWH = function() ...@@ -862,10 +862,10 @@ ParaDrawing.prototype.CheckWH = function()
LineCorrect = (this.GraphicObj.pen.w == null) ? 12700 : parseInt(this.GraphicObj.pen.w); LineCorrect = (this.GraphicObj.pen.w == null) ? 12700 : parseInt(this.GraphicObj.pen.w);
LineCorrect /= 72000.0; LineCorrect /= 72000.0;
} }
var EEL = (xc - dW / 2) - oBounds.l - LineCorrect; var EEL = (xc - this.Extent.W / 2) - oBounds.l - LineCorrect;
var EET = (yc - dH / 2) - oBounds.t - LineCorrect; var EET = (yc - this.Extent.H / 2) - oBounds.t - LineCorrect;
var EER = oBounds.r + LineCorrect - (xc + dW / 2); var EER = oBounds.r + LineCorrect - (xc + this.Extent.W / 2);
var EEB = oBounds.b + LineCorrect - (yc + dH / 2); var EEB = oBounds.b + LineCorrect - (yc + this.Extent.H / 2);
this.setEffectExtent(EEL > 0 ? EEL : 0, EET > 0 ? EET : 0, EER > 0 ? EER : 0, EEB > 0 ? EEB : 0); this.setEffectExtent(EEL > 0 ? EEL : 0, EET > 0 ? EET : 0, EER > 0 ? EER : 0, EEB > 0 ? EEB : 0);
this.Check_WrapPolygon(); this.Check_WrapPolygon();
}; };
......
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