Commit 3cf6b3bc authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Различные баги

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57018 954022d7-b5bf-4e40-9824-e11837661b57
parent 254a417c
......@@ -2757,6 +2757,7 @@ DrawingObjectsController.prototype =
this.drawingObjects.drawingDocument.SelectClear();
this.drawingObjects.drawingDocument.SelectShow();
}
this.updateOverlay();
},
remove: function(dir)
......@@ -3174,8 +3175,7 @@ DrawingObjectsController.prototype =
onKeyDown: function(e)
{
// TODO!!! var ctrlKey = e.metaKey || e.ctrlKey
e.ctrlKey = e.metaKey || e.ctrlKey;
var drawingObjectsController = this;
var bRetValue = false;
var state = drawingObjectsController.curState;
......@@ -4182,9 +4182,9 @@ DrawingObjectsController.prototype =
{
chart_props.severalChartTypes = (chart_props.type !== group_drawing_props.chartProps.type);
}
if(chart_props.w != null && chart_props.w !== new_chart_props.w)
if(chart_props.w != null && chart_props.w !== group_drawing_props.chartProps.w)
chart_props.w = null;
if(chart_props.h != null && chart_props.h !== new_chart_props.h)
if(chart_props.h != null && chart_props.h !== group_drawing_props.chartProps.h)
chart_props.h = null;
}
}
......
......@@ -4012,6 +4012,11 @@ CCatAx.prototype =
this.parent && this.parent.parent && this.parent.parent.Refresh_RecalcData2(pageIndex, object);
},
getDrawingDocument: function()
{
return this.parent && this.parent.parent && this.parent.parent.getDrawingDocument && this.parent.parent.getDrawingDocument();
},
createDuplicate: function()
{
var c = new CCatAx();
......@@ -5251,6 +5256,11 @@ CDateAx.prototype =
{
this.parent && this.parent.parent && this.parent.parent.Refresh_RecalcData2(pageIndex, object);
},
getDrawingDocument: function()
{
return this.parent && this.parent.parent && this.parent.parent.getDrawingDocument && this.parent.parent.getDrawingDocument();
},
Refresh_RecalcData: function(pageIndex, object)
{
if(this.parent && this.parent.parent && this.parent.parent.parent)
......@@ -6376,6 +6386,11 @@ CSerAx.prototype =
{
this.parent && this.parent.parent && this.parent.parent.Refresh_RecalcData2(pageIndex, object);
},
getDrawingDocument: function()
{
return this.parent && this.parent.parent && this.parent.parent.getDrawingDocument && this.parent.parent.getDrawingDocument();
},
Refresh_RecalcData: function(pageIndex, object)
{
if(this.parent && this.parent.parent && this.parent.parent.parent)
......@@ -7288,6 +7303,10 @@ CValAx.prototype =
{
this.parent && this.parent.parent && this.parent.parent.Refresh_RecalcData2(pageIndex, object);
},
getDrawingDocument: function()
{
return this.parent && this.parent.parent && this.parent.parent.getDrawingDocument && this.parent.parent.getDrawingDocument();
},
createDuplicate: function()
{
......@@ -21622,6 +21641,7 @@ CTitle.prototype =
this.parent && this.parent.Refresh_RecalcData2 && this.parent.Refresh_RecalcData2(pageIndex, this);
},
Search : function(Str, Props, SearchEngine, Type)
{
var content = this.getDocContent();
......@@ -21850,7 +21870,9 @@ CTitle.prototype =
},
getDrawingDocument: function()
{
return this.chart && this.chart.getDrawingDocument();
if(this.chart && this.chart.getDrawingDocument)
return this.chart && this.chart.getDrawingDocument();
return this.parent && this.parent.getDrawingDocument && this.parent.getDrawingDocument();
},
draw: function(graphics)
{
......@@ -23077,6 +23099,11 @@ CChart.prototype =
this.parent && this.parent.Refresh_RecalcData2 && this.parent.Refresh_RecalcData2(pageIndex, object);
},
getDrawingDocument: function()
{
return this.parent && this.parent && this.parent.getDrawingDocument && this.parent.getDrawingDocument();
},
setAutoTitleDeleted: function(autoTitleDeleted)
{
History.Add(this, {Type: historyitem_Chart_SetAutoTitleDeleted, oldAutoTitleDeleted: this.autoTitleDeleted, newAutoTitleDeleted: autoTitleDeleted});
......
......@@ -195,6 +195,7 @@ CGroupShape.prototype =
}
else
{
this.recalcInfo.recalculateArrGraphicObjects = true;
this.group.handleUpdateSpTree();
this.recalcBounds();
}
......
......@@ -252,47 +252,84 @@ RotateState.prototype =
var group = this.group;
var drawingObjects = this.drawingObjects;
var oThis = this;
this.drawingObjects.checkSelectedObjectsAndCallback(
function()
if(e.CtrlKey && this instanceof MoveState)
{
var i, copy;
this.drawingObjects.resetSelection();
for(i = 0; i < tracks.length; ++i)
{
var i;
for(i = 0; i < tracks.length; ++i)
{
tracks[i].trackEnd(false);
}
if(group)
{
group.updateCoordinatesAfterInternalResize();
}
//drawingObjects.recalculate();
var arr_x = [], arr_y = [], transform, min_x, min_y, drawing;
for(i = 0; i < oThis.drawingObjects.selectedObjects.length; ++i)
History.Create_NewPoint();
copy = tracks[i].originalObject.copy();
copy.setWorksheet(this.drawingObjects.drawingObjects.getWorksheetModel());
copy.addToDrawingObjects();
tracks[i].originalObject = copy;
tracks[i].trackEnd(false);
this.drawingObjects.selectObject(copy, 0);
ExecuteNoHistory(function(){drawingObjects.checkSelectedObjectsAndCallback(function(){}, []);}, this, []);
}
}
else
{
this.drawingObjects.checkSelectedObjectsAndCallback(
function()
{
arr_x.length = 0;
arr_y.length = 0;
drawing = oThis.drawingObjects.selectedObjects[i];
transform = drawing.transform;
arr_x.push(transform.TransformPointX(0, 0));
arr_y.push(transform.TransformPointY(0, 0));
arr_x.push(transform.TransformPointX(drawing.spPr.xfrm.extX, 0));
arr_y.push(transform.TransformPointY(drawing.spPr.xfrm.extX, 0));
arr_x.push(transform.TransformPointX(drawing.spPr.xfrm.extX, drawing.spPr.xfrm.extY));
arr_y.push(transform.TransformPointY(drawing.spPr.xfrm.extX, drawing.spPr.xfrm.extY));
arr_x.push(transform.TransformPointX(0, drawing.spPr.xfrm.extY));
arr_y.push(transform.TransformPointY(0, drawing.spPr.xfrm.extY));
min_x = Math.min.apply(Math, arr_x);
min_y = Math.min.apply(Math, arr_y);
if(min_x < 0)
var i;
if(e.CtrlKey && oThis instanceof MoveInGroupState)
{
group.resetSelection();
for(i = 0; i < tracks.length; ++i)
{
var copy = tracks[i].originalObject.copy();
copy.setWorksheet(oThis.drawingObjects.drawingObjects.getWorksheetModel());
copy.setGroup(tracks[i].originalObject.group);
copy.group.addToSpTree(copy.group.length, copy);
tracks[i].originalObject = copy;
tracks[i].trackEnd(false);
group.selectObject(copy, 0);
}
}
else
{
drawing.spPr.xfrm.setOffX(drawing.spPr.xfrm.offX - min_x);
for(i = 0; i < tracks.length; ++i)
{
tracks[i].trackEnd(false);
}
}
if(min_y < 0)
if(group)
{
drawing.spPr.xfrm.setOffY(drawing.spPr.xfrm.offY - min_y);
group.updateCoordinatesAfterInternalResize();
}
}
}, []
)
//drawingObjects.recalculate();
var arr_x = [], arr_y = [], transform, min_x, min_y, drawing;
for(i = 0; i < oThis.drawingObjects.selectedObjects.length; ++i)
{
arr_x.length = 0;
arr_y.length = 0;
drawing = oThis.drawingObjects.selectedObjects[i];
transform = drawing.transform;
arr_x.push(transform.TransformPointX(0, 0));
arr_y.push(transform.TransformPointY(0, 0));
arr_x.push(transform.TransformPointX(drawing.spPr.xfrm.extX, 0));
arr_y.push(transform.TransformPointY(drawing.spPr.xfrm.extX, 0));
arr_x.push(transform.TransformPointX(drawing.spPr.xfrm.extX, drawing.spPr.xfrm.extY));
arr_y.push(transform.TransformPointY(drawing.spPr.xfrm.extX, drawing.spPr.xfrm.extY));
arr_x.push(transform.TransformPointX(0, drawing.spPr.xfrm.extY));
arr_y.push(transform.TransformPointY(0, drawing.spPr.xfrm.extY));
min_x = Math.min.apply(Math, arr_x);
min_y = Math.min.apply(Math, arr_y);
if(min_x < 0)
{
drawing.spPr.xfrm.setOffX(drawing.spPr.xfrm.offX - min_x);
}
if(min_y < 0)
{
drawing.spPr.xfrm.setOffY(drawing.spPr.xfrm.offY - min_y);
}
}
}, []
)
}
}
this.drawingObjects.changeCurrentState(new NullState(this.drawingObjects));
......
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