Commit 949b5db8 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@63766 954022d7-b5bf-4e40-9824-e11837661b57
parent b752282e
...@@ -5020,6 +5020,17 @@ function CompareUnifillBool(u1, u2) ...@@ -5020,6 +5020,17 @@ function CompareUnifillBool(u1, u2)
{ {
if(u1.fill.colors.length !== u2.fill.colors.length) if(u1.fill.colors.length !== u2.fill.colors.length)
return false; return false;
if(isRealObject(u1.fill.path) !== isRealObject(u2.fill.path))
return false;
if(u1.fill.path && !u1.fill.path.IsIdentical(u2.fill.path))
return false;
if(isRealObject(u1.fill.lin) !== isRealObject(u2.fill.lin))
return false;
if(u1.fill.lin && !u1.fill.lin.IsIdentical(u2.fill.lin))
return false;
for(var i = 0; i < u1.fill.colors.length; ++i) for(var i = 0; i < u1.fill.colors.length; ++i)
{ {
if(u1.fill.colors[i].pos !== u2.fill.colors[i].pos if(u1.fill.colors[i].pos !== u2.fill.colors[i].pos
......
...@@ -111,45 +111,52 @@ CDocContentStructure.prototype.checkByWarpStruct = function(oWarpStruct, dWidth, ...@@ -111,45 +111,52 @@ CDocContentStructure.prototype.checkByWarpStruct = function(oWarpStruct, dWidth,
nLastIndex = nIndex; nLastIndex = nIndex;
} }
this.checkUnionPaths(aWarpedObjects2); this.checkUnionPaths(aWarpedObjects2, typeof oWarpStruct.preset.length === "string" && oWarpStruct.preset.length.length > 0 && oWarpStruct.preset.length.length !== "textNoShape");
}; };
CDocContentStructure.prototype.checkUnionPaths = function(aWarpedObjects) CDocContentStructure.prototype.checkUnionPaths = function(aWarpedObjects)
{ {
var aWarpedObjects2; var aToCheck = [];
var aWarpedObjects2, i, j, k;
if(Array.isArray(aWarpedObjects)) if(Array.isArray(aWarpedObjects))
{ {
aWarpedObjects2 = aWarpedObjects; aToCheck.push(aWarpedObjects);
} }
else else
{ {
aWarpedObjects2 = []; for(j = 0; j < this.m_aByLines.length; ++j)
for(var j = 0; j < this.m_aByLines.length; ++j)
{ {
aWarpedObjects2 = [];
var oTemp = this.m_aByLines[j]; var oTemp = this.m_aByLines[j];
for(var t = 0; t < oTemp.length; ++t) for(var t = 0; t < oTemp.length; ++t)
{ {
oTemp[t].GetAllWarped(aWarpedObjects2); oTemp[t].GetAllWarped(aWarpedObjects2);
} }
aToCheck.push(aWarpedObjects2);
} }
} }
var oLastObjectToDraw = null, oCurObjectToDraw; for(j = 0; j < aToCheck.length; ++j)
for(i = 0; i < aWarpedObjects2.length; ++i)
{ {
if(oLastObjectToDraw === null) var aByProps = [], oCurObjectToDraw;
aWarpedObjects2 = aToCheck[j];
for(i = 0; i < aWarpedObjects2.length; ++i)
{ {
oLastObjectToDraw = aWarpedObjects2[i];
continue; oCurObjectToDraw = aWarpedObjects2[i];
} for(k = 0; k < aByProps.length; ++k)
oCurObjectToDraw = aWarpedObjects2[i]; {
if(oLastObjectToDraw && CompareBrushes(oLastObjectToDraw.brush, oCurObjectToDraw.brush) && ComparePens(oLastObjectToDraw.pen, oCurObjectToDraw.pen)) var oObjToDraw = aByProps[k];
{ if(CompareBrushes(oObjToDraw.brush, oCurObjectToDraw.brush) && ComparePens(oObjToDraw.pen, oCurObjectToDraw.pen))
oLastObjectToDraw.geometry.pathLst = oLastObjectToDraw.geometry.pathLst.concat(oCurObjectToDraw.geometry.pathLst); {
oCurObjectToDraw.geometry.pathLst.length = 0; oObjToDraw.geometry.pathLst = oObjToDraw.geometry.pathLst.concat(oCurObjectToDraw.geometry.pathLst);
} oCurObjectToDraw.geometry.pathLst.length = 0;
else break;
{ }
oLastObjectToDraw = oCurObjectToDraw; }
if(k === aByProps.length)
{
aByProps.push(oCurObjectToDraw);
}
} }
} }
}; };
......
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