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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55633 954022d7-b5bf-4e40-9824-e11837661b57
parent 6b5277cc
......@@ -57,7 +57,7 @@ function handleSelectedObjects(drawingObjectsController, e, x, y, group, pageInd
}
if(selected_objects[i].hitInBoundingRect(x, y))
{
if(bWord && selected_objects[i].parent.Is_Inline())
if(bWord && selected_objects[i].parent && selected_objects[i].parent.Is_Inline())
return handleInlineHitNoText(selected_objects[i], drawingObjectsController, e, x, y, pageIndex);
else
return drawingObjectsController.handleMoveHit(selected_objects[i], e, x, y, group, true, selected_objects[i].selectStartPage, true);
......
......@@ -3964,7 +3964,7 @@ CShape.prototype =
this.bounds.x = this.bounds.l;
this.bounds.y = this.bounds.t;
this.bounds.w = this.bounds.r - this.bounds.r;
this.bounds.w = this.bounds.r - this.bounds.l;
this.bounds.h = this.bounds.b - this.bounds.t;
}
};
......
......@@ -348,6 +348,11 @@ CShape.prototype.recalculateWrapPolygon = function()
var wrapping_polygon = this.parent.wrappingPolygon;
if(!wrapping_polygon.edited)
{
if(this.spTree)
{
for(var i = 0; i < this.spTree.length; ++i)
this.spTree[i].recalculate();
}
wrapping_polygon.calculate(this);
}
else
......@@ -359,10 +364,26 @@ CShape.prototype.recalculateWrapPolygon = function()
CShape.prototype.getArrayWrapPolygons = function()
{
if(this.spPr.geometry)
return this.spPr.geometry.getArrayPolygons();
return [];
var ret;
if(this.spPr.geometry)
ret = this.spPr.geometry.getArrayPolygons();
else
ret = [];
var t = this.localTransform;
for(var i = 0; i < ret.length; ++i)
{
var polygon = ret[i];
for(var j = 0; j < polygon.length; ++j)
{
var p = polygon[j];
var x = t.TransformPointX(p.x, p.y);
var y = t.TransformPointY(p.x, p.y);
p.x = x;
p.y = y;
}
}
return ret;
};
CShape.prototype.recalculateContent = function()
......
......@@ -478,7 +478,8 @@ function CPPTXContentLoader()
shape.setParent(this.TempMainObject == null ? this.ParaDrawing : null);
this.TempGroupObject = shape;
var arrGraphicObjects = shape.arrGraphicObjects;
var oldParaDrawing = this.ParaDrawing;
this.ParaDrawing = null;
var _rec_start = s.cur;
var _end_rec = _rec_start + s.GetULong() + 4;
......@@ -568,6 +569,7 @@ function CPPTXContentLoader()
}
}
this.ParaDrawing = oldParaDrawing;
s.Seek2(_end_rec);
this.TempGroupObject = null;
return shape;
......
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