Commit 4ace8707 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

Убрана возможность поворота диаграмм и групп в которых находятся диаграммы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47478 954022d7-b5bf-4e40-9824-e11837661b57
parent 45757373
...@@ -2881,6 +2881,16 @@ WordGroupShapes.prototype = ...@@ -2881,6 +2881,16 @@ WordGroupShapes.prototype =
this.selectStartPage = pageIndex; this.selectStartPage = pageIndex;
}, },
canRotate: function()
{
for(var i = 0; i < this.spTree.length; ++i)
{
if(!this.spTree[i].canRotate())
return false;
}
return true;
},
deselect: function() deselect: function()
{ {
this.selected = false; this.selected = false;
......
...@@ -1590,6 +1590,12 @@ WordImage.prototype = ...@@ -1590,6 +1590,12 @@ WordImage.prototype =
}; };
}, },
canRotate: function()
{
return !isRealObject(this.chart);
},
hit: function(x, y) hit: function(x, y)
{ {
if(isRealObject(this.parent) && isRealObject(this.parent.Parent) && isRealObject(this.parent.Parent.Parent) if(isRealObject(this.parent) && isRealObject(this.parent.Parent) && isRealObject(this.parent.Parent.Parent)
......
...@@ -5414,6 +5414,11 @@ WordShape.prototype = ...@@ -5414,6 +5414,11 @@ WordShape.prototype =
return c; return c;
}, },
canRotate: function()
{
return true;
},
Read_FromBinary2 : function(reader, noReadId) Read_FromBinary2 : function(reader, noReadId)
{ {
if(noReadId === true) if(noReadId === true)
......
...@@ -130,8 +130,18 @@ function NullState(graphicObjects) ...@@ -130,8 +130,18 @@ function NullState(graphicObjects)
} }
else else
{ {
if(!_cur_selected_gr_object.canRotate())
return;
for(_selected_index = 0; _selected_index < _common_selection_array.length; ++_selected_index)
{
if(_common_selection_array[_selected_index].canRotate())
break;
}
if(_selected_index === _common_selection_array.length)
return;
for(_selected_index = 0; _selected_index < _common_selection_array.length; ++_selected_index) for(_selected_index = 0; _selected_index < _common_selection_array.length; ++_selected_index)
{ {
if(_common_selection_array[_selected_index].canRotate())
this.graphicObjects.arrPreTrackObjects.push(new CTrackRotateObject(_common_selection_array[_selected_index], _common_selection_array[_selected_index].pageIndex)); this.graphicObjects.arrPreTrackObjects.push(new CTrackRotateObject(_common_selection_array[_selected_index], _common_selection_array[_selected_index].pageIndex));
} }
this.graphicObjects.changeCurrentState(new PreRotateState(this.graphicObjects)); this.graphicObjects.changeCurrentState(new PreRotateState(this.graphicObjects));
...@@ -1591,6 +1601,15 @@ function NullStateHeaderFooter(graphicObjects) ...@@ -1591,6 +1601,15 @@ function NullStateHeaderFooter(graphicObjects)
} }
else else
{ {
if(!_cur_selected_gr_object.canRotate())
return;
for(_selected_index = 0; _selected_index < _common_selection_array.length; ++_selected_index)
{
if(_common_selection_array[_selected_index].canRotate())
break;
}
if(_selected_index === _common_selection_array.length)
return;
for(_selected_index = 0; _selected_index < _common_selection_array.length; ++_selected_index) for(_selected_index = 0; _selected_index < _common_selection_array.length; ++_selected_index)
{ {
this.graphicObjects.arrPreTrackObjects.push(new CTrackRotateObject(_common_selection_array[_selected_index], _common_selection_array[_selected_index].GraphicObj.selectStartPage)); this.graphicObjects.arrPreTrackObjects.push(new CTrackRotateObject(_common_selection_array[_selected_index], _common_selection_array[_selected_index].GraphicObj.selectStartPage));
...@@ -4854,6 +4873,16 @@ function GroupState(graphicObjects, group) ...@@ -4854,6 +4873,16 @@ function GroupState(graphicObjects, group)
} }
else else
{ {
if(!s_arr[i].canRotate())
return;
for(var _selected_index = 0; _selected_index < s_arr.length; ++_selected_index)
{
if(s_arr[_selected_index].canRotate())
break;
}
if(_selected_index === s_arr.length)
return;
for(j = 0; j < s_arr.length; ++j) for(j = 0; j < s_arr.length; ++j)
{ {
...@@ -4890,6 +4919,8 @@ function GroupState(graphicObjects, group) ...@@ -4890,6 +4919,8 @@ function GroupState(graphicObjects, group)
} }
else else
{ {
if(!this.group.canRotate())
return;
this.graphicObjects.arrPreTrackObjects.push(new CTrackRotateObject(this.group.parent, this.group.pageIndex)); this.graphicObjects.arrPreTrackObjects.push(new CTrackRotateObject(this.group.parent, this.group.pageIndex));
this.graphicObjects.changeCurrentState(new PreRotateState(this.graphicObjects)); this.graphicObjects.changeCurrentState(new PreRotateState(this.graphicObjects));
} }
......
...@@ -925,7 +925,6 @@ function MoveTrackInGroup(original) ...@@ -925,7 +925,6 @@ function MoveTrackInGroup(original)
copy.setXfrm(this.x, this.y, null, null, null, null, null); copy.setXfrm(this.x, this.y, null, null, null, null, null);
copy.setAbsoluteTransform(this.x, this.y, null, null, null, null, null); copy.setAbsoluteTransform(this.x, this.y, null, null, null, null, null);
para_drawing.Set_GraphicObject(copy); para_drawing.Set_GraphicObject(copy);
} }
else else
{ {
......
...@@ -2942,6 +2942,12 @@ function ParaDrawing(W, H, GraphicObj, DrawingDocument, DocumentContent, Parent) ...@@ -2942,6 +2942,12 @@ function ParaDrawing(W, H, GraphicObj, DrawingDocument, DocumentContent, Parent)
ParaDrawing.prototype = ParaDrawing.prototype =
{ {
canRotate: function()
{
return isRealObject(this.GraphicObj) && typeof this.GraphicObj.canRotate == "function" && this.GraphicObj.canRotate();
},
Get_Props : function(OtherProps) Get_Props : function(OtherProps)
{ {
// Сначала заполняем свойства // Сначала заполняем свойства
......
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