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

Bug 30150 - [Formula] Не отображаются формулы в старом формате

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64541 954022d7-b5bf-4e40-9824-e11837661b57
parent 05a91c0c
......@@ -3462,7 +3462,7 @@ CShape.prototype =
},
check_bounds: function (checker) {
if (this.spPr && this.spPr.geometry) {
if (this.spPr && this.spPr.geometry && this.spPr.geometry.pathLst.length > 0) {
this.spPr.geometry.check_bounds(checker);
}
else {
......@@ -3528,7 +3528,7 @@ CShape.prototype =
var _transform_text = transformText ? transformText : this.transformText;
if (graphics.IsSlideBoundsCheckerType === true) {
graphics.transform3(_transform);
if (!this.spPr || null == this.spPr.geometry || !graphics.IsShapeNeedBounds(this.spPr.geometry.preset)) {
if (!this.spPr || null == this.spPr.geometry || this.spPr.geometry.pathLst.length === 0 || (this.spPr.geometry.pathLst.length === 1 && this.spPr.geometry.pathLst[0].ArrPathCommandInfo.length === 0) || !graphics.IsShapeNeedBounds(this.spPr.geometry.preset)) {
graphics._s();
graphics._m(0, 0);
graphics._l(this.extX, 0);
......@@ -4400,7 +4400,7 @@ CShape.prototype =
var invert_transform = this.getInvertTransform();
var x_t = invert_transform.TransformPointX(x, y);
var y_t = invert_transform.TransformPointY(x, y);
if (isRealObject(this.spPr) && isRealObject(this.spPr.geometry) && !(this.getObjectType && this.getObjectType() === historyitem_type_ChartSpace))
if (isRealObject(this.spPr) && isRealObject(this.spPr.geometry) && this.spPr.geometry.pathLst.length > 0 && !(this.getObjectType && this.getObjectType() === historyitem_type_ChartSpace))
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;
}
......
......@@ -132,7 +132,7 @@ function OverlayObject(geometry, extX, extY, brush, pen, transform )
this.check_bounds = function(boundsChecker)
{
if(this.geometry)
if(this.geometry && this.geometry.pathLst.length > 0)
{
this.geometry.check_bounds(boundsChecker);
}
......@@ -169,7 +169,7 @@ ObjectToDraw.prototype =
{
check_bounds: function(boundsChecker)
{
if(this.geometry)
if(this.geometry && this.geometry.pathLst.length > 0)
{
this.geometry.check_bounds(boundsChecker);
}
......
......@@ -479,7 +479,7 @@ CShapeDrawer.prototype =
{
this.fromShape(shape, graphics);
if (!geom)
if (!geom || geom.pathLst.length === 0)
{
this.IsRectShape = true;
}
......@@ -633,7 +633,7 @@ CShapeDrawer.prototype =
if (this.Graphics.IsSlideBoundsCheckerType)
{
// slide bounds checker
if(geom)
if(geom && geom.pathLst.length > 0)
{
geom.draw(this);
}
......@@ -657,7 +657,7 @@ CShapeDrawer.prototype =
}
this.NativeGraphics["PD_StartShapeDraw"](this.IsRectShape);
if(geom)
if(geom && geom.pathLst.length > 0)
{
geom.draw(this);
}
......@@ -693,7 +693,7 @@ CShapeDrawer.prototype =
this.Graphics.put_TextureBounds(this.min_x, this.min_y, this.max_x - this.min_x, this.max_y - this.min_y);
}
if (geom)
if (geom && geom.pathLst.length > 0)
{
geom.draw(this);
}
......
......@@ -499,7 +499,7 @@ CShapeDrawer.prototype =
{
this.fromShape(shape, graphics);
if (!geom)
if (!geom || geom.pathLst.length === 0)
{
this.IsRectShape = true;
}
......@@ -698,7 +698,7 @@ CShapeDrawer.prototype =
this.Graphics.m_oContext.globalCompositeOperation = "destination-out";
}
if(geom)
if(geom && geom.pathLst.length > 0)
{
geom.draw(this);
}
......
......@@ -500,7 +500,7 @@ CShapeDrawer.prototype =
{
this.fromShape(shape, graphics);
if (!geom)
if (!geom || geom.pathLst.length === 0)
{
this.IsRectShape = true;
}
......@@ -665,7 +665,7 @@ CShapeDrawer.prototype =
this.Graphics.put_TextureBounds(this.min_x, this.min_y, this.max_x - this.min_x, this.max_y - this.min_y);
}
if(geom)
if(geom && geom.pathLst.length > 0)
{
geom.draw(this);
}
......
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