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

Bug 25251 - [CoEdit] Ошибка в консоли при повторном изменении размера шрифта в заголовке диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57169 954022d7-b5bf-4e40-9824-e11837661b57
parent 38ee0825
...@@ -396,6 +396,9 @@ CTextBody.prototype = ...@@ -396,6 +396,9 @@ CTextBody.prototype =
{ {
this.parent.recalcInfo.recalcContent = true; this.parent.recalcInfo.recalcContent = true;
this.parent.recalcInfo.recalcTransformText = true; this.parent.recalcInfo.recalcTransformText = true;
this.parent.recalcInfo.recalculateContent = true;
this.parent.recalcInfo.recalculateTransformText = true;
if(this.parent.addToRecalculate) if(this.parent.addToRecalculate)
{ {
this.parent.addToRecalculate(); this.parent.addToRecalculate();
......
...@@ -11,6 +11,13 @@ CChartSpace.prototype.recalculateTransform = function() ...@@ -11,6 +11,13 @@ CChartSpace.prototype.recalculateTransform = function()
CShape.prototype.recalculateTransform.call(this); CShape.prototype.recalculateTransform.call(this);
this.localTransform.Reset(); this.localTransform.Reset();
}; };
CChartSpace.prototype.recalcText = function()
{
this.recalcInfo.recalculateAxisLabels = true;
this.recalcTitles2();
this.handleUpdateInternalChart();
};
CChartSpace.prototype.recalculateBounds = CShape.prototype.recalculateBounds; CChartSpace.prototype.recalculateBounds = CShape.prototype.recalculateBounds;
CChartSpace.prototype.deselect = CShape.prototype.deselect; CChartSpace.prototype.deselect = CShape.prototype.deselect;
CChartSpace.prototype.hitToHandles = CShape.prototype.hitToHandles; CChartSpace.prototype.hitToHandles = CShape.prototype.hitToHandles;
......
...@@ -25,6 +25,20 @@ CGroupShape.prototype.handleUpdateLn = function() ...@@ -25,6 +25,20 @@ CGroupShape.prototype.handleUpdateLn = function()
this.addToRecalculate(); this.addToRecalculate();
}; };
CGroupShape.prototype.recalcText = function()
{
if(this.spTree)
{
for(var i = 0; i < this.spTree.length; ++i)
{
if(this.spTree[i].recalcText)
{
this.spTree[i].recalcText();
}
}
}
};
CGroupShape.prototype.setRecalculateInfo = function() CGroupShape.prototype.setRecalculateInfo = function()
{ {
......
...@@ -149,7 +149,7 @@ CShape.prototype.setRecalculateInfo = function() ...@@ -149,7 +149,7 @@ CShape.prototype.setRecalculateInfo = function()
}; };
CShape.prototype.recalcContent = function() CShape.prototype.recalcContent = function()
{ {
this.recalcInfo.recalcContent = true; this.recalcInfo.recalculateContent = true;
}; };
CShape.prototype.getDrawingDocument = function() CShape.prototype.getDrawingDocument = function()
...@@ -226,6 +226,7 @@ CShape.prototype.handleUpdateExtents = function() ...@@ -226,6 +226,7 @@ CShape.prototype.handleUpdateExtents = function()
this.recalcGeometry(); this.recalcGeometry();
this.recalcBounds(); this.recalcBounds();
this.recalcTransform(); this.recalcTransform();
this.recalcContent();
this.addToRecalculate(); this.addToRecalculate();
}; };
CShape.prototype.handleUpdateRot = function() CShape.prototype.handleUpdateRot = function()
...@@ -287,6 +288,12 @@ CShape.prototype.getParentObjects = function () ...@@ -287,6 +288,12 @@ CShape.prototype.getParentObjects = function ()
return { slide: null, layout: null, master: null, theme: window["Asc"]["editor"].wbModel.theme}; return { slide: null, layout: null, master: null, theme: window["Asc"]["editor"].wbModel.theme};
}; };
CShape.prototype.recalcText = function()
{
this.recalcInfo.recalculateContent = true;
this.recalcInfo.recalculateTransformText = true;
};
CShape.prototype.recalculate = function () CShape.prototype.recalculate = function ()
{ {
ExecuteNoHistory(function(){ ExecuteNoHistory(function(){
...@@ -315,6 +322,7 @@ CShape.prototype.recalculate = function () ...@@ -315,6 +322,7 @@ CShape.prototype.recalculate = function ()
if (this.txBody) if (this.txBody)
this.txBody.recalcInfo.recalculateContent2 = true; this.txBody.recalcInfo.recalculateContent2 = true;
this.recalculateContent(); this.recalculateContent();
this.recalcInfo.recalculateContent = false;
} }
if (this.recalcInfo.recalculateTransformText) { if (this.recalcInfo.recalculateTransformText) {
......
...@@ -97,6 +97,8 @@ function CContentChanges() ...@@ -97,6 +97,8 @@ function CContentChanges()
{ {
this.m_aChanges = []; this.m_aChanges = [];
this.Add = function(Changes) this.Add = function(Changes)
{ {
this.m_aChanges.push( Changes ); this.m_aChanges.push( Changes );
...@@ -205,6 +207,10 @@ DrawingObjectsController.prototype.recalculate = function(bAll, Point) ...@@ -205,6 +207,10 @@ DrawingObjectsController.prototype.recalculate = function(bAll, Point)
var drawings = this.getDrawingObjects(); var drawings = this.getDrawingObjects();
for(var i = 0; i < drawings.length; ++i) for(var i = 0; i < drawings.length; ++i)
{ {
if(drawings[i].recalcText)
{
drawings[i].recalcText();
}
drawings[i].recalculate(); drawings[i].recalculate();
} }
} }
...@@ -443,7 +449,6 @@ DrawingObjectsController.prototype.onKeyPress = function(e) ...@@ -443,7 +449,6 @@ DrawingObjectsController.prototype.onKeyPress = function(e)
this.checkSelectedObjectsAndCallback(function() this.checkSelectedObjectsAndCallback(function()
{ {
this.paragraphAdd( new ParaText( String.fromCharCode( Code ) ) ); this.paragraphAdd( new ParaText( String.fromCharCode( Code ) ) );
this.startRecalculate();
}, []); }, []);
bRetValue = true; bRetValue = true;
} }
......
...@@ -36,7 +36,15 @@ CShape.prototype.setRecalculateInfo = function() ...@@ -36,7 +36,15 @@ CShape.prototype.setRecalculateInfo = function()
CShape.prototype.recalcContent = function() CShape.prototype.recalcContent = function()
{ {
this.recalcInfo.recalcContent = true; if(this.bWordShape)
{
this.recalcInfo.recalculateTxBoxContent = true;
}
else
{
this.recalcInfo.recalculateContent = true;
}
}; };
CShape.prototype.getDrawingDocument = function() CShape.prototype.getDrawingDocument = function()
......
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