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

падения из-за отсутствия spPr

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55929 954022d7-b5bf-4e40-9824-e11837661b57
parent 44f1c40b
...@@ -3620,7 +3620,7 @@ CShape.prototype = ...@@ -3620,7 +3620,7 @@ CShape.prototype =
var invert_transform = this.getInvertTransform(); var invert_transform = this.getInvertTransform();
var x_t = invert_transform.TransformPointX(x, y); var x_t = invert_transform.TransformPointX(x, y);
var y_t = invert_transform.TransformPointY(x, y); var y_t = invert_transform.TransformPointY(x, y);
if (isRealObject(this.spPr.geometry)) if (isRealObject(this.spPr) && isRealObject(this.spPr.geometry))
return this.spPr.geometry.hitInPath(this.getCanvasContext(), x_t, y_t); return this.spPr.geometry.hitInPath(this.getCanvasContext(), x_t, y_t);
else else
return this.hitInBoundingRect(x, y); return this.hitInBoundingRect(x, y);
...@@ -3633,7 +3633,7 @@ CShape.prototype = ...@@ -3633,7 +3633,7 @@ CShape.prototype =
var invert_transform = this.getInvertTransform(); var invert_transform = this.getInvertTransform();
var x_t = invert_transform.TransformPointX(x, y); var x_t = invert_transform.TransformPointX(x, y);
var y_t = invert_transform.TransformPointY(x, y); var y_t = invert_transform.TransformPointY(x, y);
if (isRealObject(this.spPr.geometry)) if (isRealObject(this.spPr) && isRealObject(this.spPr.geometry))
return this.spPr.geometry.hitInInnerArea(this.getCanvasContext(), x_t, y_t); return this.spPr.geometry.hitInInnerArea(this.getCanvasContext(), x_t, y_t);
return x_t > 0 && x_t < this.extX && y_t > 0 && y_t < this.extY; return x_t > 0 && x_t < this.extX && y_t > 0 && y_t < this.extY;
} }
......
...@@ -19,7 +19,7 @@ function MoveShapeImageTrack(originalObject) ...@@ -19,7 +19,7 @@ function MoveShapeImageTrack(originalObject)
this.brush = pen_brush.brush; this.brush = pen_brush.brush;
this.pen = pen_brush.pen; this.pen = pen_brush.pen;
} }
this.overlayObject = new OverlayObject(this.originalObject.spPr.geometry, this.originalObject.extX, this.originalObject.extY, this.brush, this.pen, this.transform); this.overlayObject = new OverlayObject(this.originalObject.spPr && this.originalObject.spPr.geometry, this.originalObject.extX, this.originalObject.extY, this.brush, this.pen, this.transform);
this.groupInvertMatrix = null; this.groupInvertMatrix = null;
if(this.originalObject.group) if(this.originalObject.group)
...@@ -164,7 +164,7 @@ function MoveShapeImageTrackInGroup(originalObject) ...@@ -164,7 +164,7 @@ function MoveShapeImageTrackInGroup(originalObject)
this.brush = pen_brush.brush; this.brush = pen_brush.brush;
this.pen = pen_brush.pen; this.pen = pen_brush.pen;
} }
this.overlayObject = new OverlayObject(this.originalObject.spPr.geometry, this.originalObject.extX, this.originalObject.extY, this.brush, this.pen, this.transform); this.overlayObject = new OverlayObject(this.originalObject.spPr && this.originalObject.spPr.geometry, this.originalObject.extX, this.originalObject.extY, this.brush, this.pen, this.transform);
this.inv = global_MatrixTransformer.Invert(originalObject.group.transform); this.inv = global_MatrixTransformer.Invert(originalObject.group.transform);
this.inv.tx = 0; this.inv.tx = 0;
this.inv.ty = 0; this.inv.ty = 0;
......
...@@ -183,7 +183,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection) ...@@ -183,7 +183,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection)
this.resizedRot = originalObject.rot; this.resizedRot = originalObject.rot;
this.transform = originalObject.transform.CreateDublicate(); this.transform = originalObject.transform.CreateDublicate();
this.geometry = originalObject.spPr.geometry ? originalObject.spPr.geometry.createDuplicate() : (function(){ var geometry = CreateGeometry("rect"); geometry.Recalculate(5, 5); return geometry})(); this.geometry = originalObject.spPr && originalObject.spPr.geometry ? originalObject.spPr.geometry.createDuplicate() : (function(){ var geometry = CreateGeometry("rect"); geometry.Recalculate(5, 5); return geometry})();
if(!originalObject.isChart()) if(!originalObject.isChart())
{ {
...@@ -198,7 +198,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection) ...@@ -198,7 +198,7 @@ function ResizeTrackShapeImage(originalObject, cardDirection)
} }
this.isLine = originalObject.spPr.geometry && originalObject.spPr.geometry.preset === "line"; this.isLine = originalObject.spPr && originalObject.spPr.geometry && originalObject.spPr.geometry.preset === "line";
this.bChangeCoef = this.translatetNumberHandle % 2 === 0 && this.originalFlipH !== this.originalFlipV; this.bChangeCoef = this.translatetNumberHandle % 2 === 0 && this.originalFlipH !== this.originalFlipV;
this.overlayObject = new OverlayObject(this.geometry, this.resizedExtX, this.resizedExtY, this.brush, this.pen, this.transform); this.overlayObject = new OverlayObject(this.geometry, this.resizedExtX, this.resizedExtY, this.brush, this.pen, this.transform);
...@@ -724,6 +724,10 @@ function ResizeTrackShapeImage(originalObject, cardDirection) ...@@ -724,6 +724,10 @@ function ResizeTrackShapeImage(originalObject, cardDirection)
this.resizedPosY = 0; this.resizedPosY = 0;
} }
} }
if(!this.originalObject.spPr)
{
this.originalObject.setSpPr(new CSpPr());
}
if(!this.originalObject.spPr.xfrm) if(!this.originalObject.spPr.xfrm)
{ {
this.originalObject.spPr.setXfrm(new CXfrm()); this.originalObject.spPr.setXfrm(new CXfrm());
...@@ -1395,6 +1399,10 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack) ...@@ -1395,6 +1399,10 @@ function ResizeTrackGroup(originalObject, cardDirection, parentTrack)
this.original.normalize(); this.original.normalize();
} }
if(!this.original.spPr)
{
this.original.setSpPr(new CSpPr());
}
if(!this.original.spPr.xfrm) if(!this.original.spPr.xfrm)
{ {
this.original.spPr.setXfrm(new CXfrm()); this.original.spPr.setXfrm(new CXfrm());
......
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