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