Commit 0d004dc2 authored by Sergey Luzyanin's avatar Sergey Luzyanin

delete unused data in text arts after recalculate

parent af1a6dcd
......@@ -1033,7 +1033,7 @@ Geometry.prototype=
}
},
Recalculate: function(w, h)
Recalculate: function(w, h, bResetPathsInfo)
{
this.gdLst["_3cd4"]= 16200000;
this.gdLst["_3cd8"]= 8100000;
......@@ -1081,7 +1081,7 @@ Geometry.prototype=
CalculateAhXYList(this.ahXYLstInfo, this.ahXYLst, this.gdLst);
CalculateAhPolarList(this.ahPolarLstInfo, this.ahPolarLst, this.gdLst);
for(var i=0, n=this.pathLst.length; i<n; i++)
this.pathLst[i].recalculate(this.gdLst);
this.pathLst[i].recalculate(this.gdLst, bResetPathsInfo);
if(this.rectS!=undefined)
{
this.rect={};
......@@ -1108,10 +1108,17 @@ Geometry.prototype=
{
this.rect.b=parseInt(this.rectS.b);
}
}
if(bResetPathsInfo){
delete this.gdLst;
delete this.gdLstInfo;
delete this.rect;
delete this.rectS;
delete this.gdLstInfo;
delete this.cnxLstInfo;
delete this.ahXYLstInfo;
delete this.ahPolarLstInfo;
}
},
getMaxPathPolygonLength: function()
......
......@@ -464,7 +464,7 @@ Path.prototype = {
}
},
recalculate: function(gdLst)
recalculate: function(gdLst, bResetPathsInfo)
{
var ch, cw;
if(this.pathW!=undefined)
......@@ -687,6 +687,9 @@ Path.prototype = {
}
}
}
if(bResetPathsInfo){
delete this.ArrPathCommandInfo;
}
},
draw: function(shape_drawer)
......
......@@ -623,12 +623,12 @@ CTableStructure.prototype.Recalculate = function(oTheme, oColorMap, dWidth, dHei
var i;
for(i = 0; i < this.m_aContent.length; ++i)
{
this.m_aContent[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape);
this.m_aContent[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape, true);
}
for(i = 0; i < this.m_aBorders.length; ++i)
{
this.m_aBorders[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape);
this.m_aBorders[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape, true);
}
};
CTableStructure.prototype.CheckContentStructs = function(aContentStructs)
......@@ -680,23 +680,23 @@ CLineStructure.prototype.Recalculate = function(oTheme, oColorMap, dWidth, dHeig
var i;
for(i = 0; i < this.m_aContent.length; ++i)
{
this.m_aContent[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape);
this.m_aContent[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape, true);
}
for(i = 0; i < this.m_aBorders.length; ++i)
{
this.m_aBorders[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape);
this.m_aBorders[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape, true);
}
for(i = 0; i < this.m_aBackgrounds.length; ++i)
{
this.m_aBackgrounds[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape);
this.m_aBackgrounds[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape, true);
}
for(i = 0; i < this.m_aUnderlinesStrikeouts.length; ++i)
{
this.m_aUnderlinesStrikeouts[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape);
this.m_aUnderlinesStrikeouts[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape, true);
}
for(i = 0; i < this.m_aParagraphBackgrounds.length; ++i)
{
this.m_aParagraphBackgrounds[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape);
this.m_aParagraphBackgrounds[i].Recalculate(oTheme, oColorMap, dWidth, dHeight, oShape, true);
}
};
......
......@@ -237,7 +237,7 @@ ObjectToDraw.prototype =
}
},
Recalculate: function(oTheme, oColorMap, dWidth, dHeight, oShape)
Recalculate: function(oTheme, oColorMap, dWidth, dHeight, oShape, bResetPathsInfo)
{
// if(AscFormat.isRealNumber(this.x) && AscFormat.isRealNumber(this.y))
// {
......@@ -257,7 +257,7 @@ ObjectToDraw.prototype =
}
if(this.geometry)
{
this.geometry.Recalculate(dWidth, dHeight);
this.geometry.Recalculate(dWidth, dHeight, bResetPathsInfo);
}
this.parentShape = oShape;
},
......
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