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

Bug 25145 - [CoEdit] Пользователь не получает изменный заголовок диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57101 954022d7-b5bf-4e40-9824-e11837661b57
parent a5034ae0
...@@ -162,8 +162,8 @@ function CDLbl() ...@@ -162,8 +162,8 @@ function CDLbl()
recalculateContent: true recalculateContent: true
}; };
this.chart = null;//������������ ��� ��������� this.chart = null;
this.series = null;//������������ ��� ��������� this.series = null;
this.x = 0; this.x = 0;
this.y = 0; this.y = 0;
...@@ -277,7 +277,9 @@ CDLbl.prototype = ...@@ -277,7 +277,9 @@ CDLbl.prototype =
recalculate: function() recalculate: function()
{ {
if(this.bDelete) if(this.bDelete)
{
return; return;
}
ExecuteNoHistory(function() ExecuteNoHistory(function()
{ {
if(this.recalcInfo.recalculateBrush) if(this.recalcInfo.recalculateBrush)
...@@ -453,12 +455,12 @@ CDLbl.prototype = ...@@ -453,12 +455,12 @@ CDLbl.prototype =
global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift); global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift);
if (_dx_lt_rb * _dy_t - _dy_lt_rb * _dx_t <= 0) { if (_dx_lt_rb * _dy_t - _dy_lt_rb * _dx_t <= 0) {
var alpha = Math.atan2(_dy_t, _dx_t); var alpha = Math.atan2(_dy_t, _dx_t);
global_MatrixTransformer.RotateRadAppend(_text_transform, -alpha - (isRealNumber(_body_pr.rot) ? _body_pr.rot : 0)); global_MatrixTransformer.RotateRadAppend(_text_transform, -alpha - (isRealNumber(_body_pr.rot) ? _body_pr.rot*cToRad2 : 0));
global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_lt, _t_y_lt); global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_lt, _t_y_lt);
} }
else { else {
alpha = Math.atan2(_dy_t, _dx_t); alpha = Math.atan2(_dy_t, _dx_t);
global_MatrixTransformer.RotateRadAppend(_text_transform, Math.PI - alpha - (isRealNumber(_body_pr.rot) ? _body_pr.rot : 0)); global_MatrixTransformer.RotateRadAppend(_text_transform, Math.PI - alpha - (isRealNumber(_body_pr.rot) ? _body_pr.rot*cToRad2 : 0));
global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_rt, _t_y_rt); global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_rt, _t_y_rt);
} }
} }
...@@ -508,21 +510,21 @@ CDLbl.prototype = ...@@ -508,21 +510,21 @@ CDLbl.prototype =
_alpha = Math.atan2(_dy_t, _dx_t); _alpha = Math.atan2(_dy_t, _dx_t);
if (_body_pr.vert === nVertTTvert) { if (_body_pr.vert === nVertTTvert) {
if (_dx_lt_rb * _dy_t - _dy_lt_rb * _dx_t <= 0) { if (_dx_lt_rb * _dy_t - _dy_lt_rb * _dx_t <= 0) {
global_MatrixTransformer.RotateRadAppend(_text_transform, -_alpha - Math.PI * 0.5 + (isRealNumber(_body_pr.rot) ? _body_pr.rot : 0)); global_MatrixTransformer.RotateRadAppend(_text_transform, -_alpha - Math.PI * 0.5 + (isRealNumber(_body_pr.rot) ? _body_pr.rot*cToRad2 : 0));
global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_rt, _t_y_rt); global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_rt, _t_y_rt);
} }
else { else {
global_MatrixTransformer.RotateRadAppend(_text_transform, Math.PI * 0.5 - _alpha + (isRealNumber(_body_pr.rot) ? _body_pr.rot : 0)); global_MatrixTransformer.RotateRadAppend(_text_transform, Math.PI * 0.5 - _alpha + (isRealNumber(_body_pr.rot) ? _body_pr.rot*cToRad2 : 0));
global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_lt, _t_y_lt); global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_lt, _t_y_lt);
} }
} }
else { else {
if (_dx_lt_rb * _dy_t - _dy_lt_rb * _dx_t <= 0) { if (_dx_lt_rb * _dy_t - _dy_lt_rb * _dx_t <= 0) {
global_MatrixTransformer.RotateRadAppend(_text_transform, -_alpha - Math.PI * 1.5 + (isRealNumber(_body_pr.rot) ? _body_pr.rot : 0)); global_MatrixTransformer.RotateRadAppend(_text_transform, -_alpha - Math.PI * 1.5 + (isRealNumber(_body_pr.rot) ? _body_pr.rot*cToRad2 : 0));
global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_lb, _t_y_lb); global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_lb, _t_y_lb);
} }
else { else {
global_MatrixTransformer.RotateRadAppend(_text_transform, -Math.PI * 0.5 - _alpha + (isRealNumber(_body_pr.rot) ? _body_pr.rot : 0)); global_MatrixTransformer.RotateRadAppend(_text_transform, -Math.PI * 0.5 - _alpha + (isRealNumber(_body_pr.rot) ? _body_pr.rot*cToRad2 : 0));
global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_rb, _t_y_rb); global_MatrixTransformer.TranslateAppend(_text_transform, _t_x_rb, _t_y_rb);
} }
} }
...@@ -966,7 +968,7 @@ CDLbl.prototype = ...@@ -966,7 +968,7 @@ CDLbl.prototype =
} }
default: default:
{ {
var _rot = isRealNumber(bodyPr.rot) ? bodyPr.rot : 0; var _rot = isRealNumber(bodyPr.rot) ? bodyPr.rot*cToRad2 : 0;
var t = new CMatrix(); var t = new CMatrix();
global_MatrixTransformer.RotateRadAppend(t, -_rot); global_MatrixTransformer.RotateRadAppend(t, -_rot);
var w, h, x0, y0, x1, y1, x2, y2, x3, y3; var w, h, x0, y0, x1, y1, x2, y2, x3, y3;
...@@ -22040,6 +22042,7 @@ CTitle.prototype = ...@@ -22040,6 +22042,7 @@ CTitle.prototype =
case historyitem_Title_SetTx: case historyitem_Title_SetTx:
{ {
this.tx = data.oldPr; this.tx = data.oldPr;
this.Refresh_RecalcData2();
break; break;
} }
case historyitem_Title_SetTxPr: case historyitem_Title_SetTxPr:
...@@ -22077,6 +22080,7 @@ CTitle.prototype = ...@@ -22077,6 +22080,7 @@ CTitle.prototype =
case historyitem_Title_SetTx: case historyitem_Title_SetTx:
{ {
this.tx = data.newPr; this.tx = data.newPr;
this.Refresh_RecalcData2();
break; break;
} }
case historyitem_Title_SetTxPr: case historyitem_Title_SetTxPr:
...@@ -22141,6 +22145,7 @@ CTitle.prototype = ...@@ -22141,6 +22145,7 @@ CTitle.prototype =
case historyitem_Title_SetTx: case historyitem_Title_SetTx:
{ {
this.tx = readObject(r); this.tx = readObject(r);
this.Refresh_RecalcData2();
break; break;
} }
case historyitem_Title_SetTxPr: case historyitem_Title_SetTxPr:
......
...@@ -12,6 +12,7 @@ var PATH_COMMAND_END = 0x102; ...@@ -12,6 +12,7 @@ var PATH_COMMAND_END = 0x102;
var cToRad = Math.PI / 10800000.0; var cToRad = Math.PI / 10800000.0;
var cToDeg = 1/cToRad; var cToDeg = 1/cToRad;
var cToRad2 = (Math.PI/60000)/180;
function Path() function Path()
{ {
......
...@@ -20,6 +20,13 @@ CShape.prototype.setWorksheet = function(worksheet) ...@@ -20,6 +20,13 @@ CShape.prototype.setWorksheet = function(worksheet)
CShape.prototype.setDrawingBase = function(drawingBase) CShape.prototype.setDrawingBase = function(drawingBase)
{ {
this.drawingBase = drawingBase; this.drawingBase = drawingBase;
if(Array.isArray(this.spTree))
{
for(var i = 0; i < this.spTree.length; ++i)
{
this.spTree[i].setDrawingBase(drawingBase);
}
}
}; };
CShape.prototype.getDrawingObjectsController = function() CShape.prototype.getDrawingObjectsController = 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