Commit 98ab32e9 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@50819 954022d7-b5bf-4e40-9824-e11837661b57
parent a67ceabf
......@@ -3363,13 +3363,17 @@ PasteProcessor.prototype =
{
if(presentation.Document_Is_SelectionLocked(changestype_Drawing_Props) === false)
{
oThis.insertInPlace2(slide.graphicObjects.State.textObject.txBody.content, shape.txBody.content.Content);
slide.graphicObjects.State.textObject.txBody.bRecalculateNumbering = true;
var content = slide.graphicObjects.State.textObject.txBody.content.Content;
for(var j = 0; j < content.length; ++j)
var content = (slide.graphicObjects.State.textObject instanceof CShape) ? slide.graphicObjects.State.textObject.txBody.content : slide.graphicObjects.State.textObject.graphicObject.CurCell.Content;
oThis.insertInPlace2(content, shape.txBody.content.Content);
if(slide.graphicObjects.State.textObject instanceof CShape)
slide.graphicObjects.State.textObject.txBody.bRecalculateNumbering = true;
else
slide.graphicObjects.State.textObject.recalcInfo.recalculateNumbering = true
var content2 = content.Content;
for(var j = 0; j < content2.length; ++j)
{
content[j].RecalcInfo.Set_Type_0(pararecalc_0_All);
content[j].Set_Parent(slide.graphicObjects.State.textObject.txBody.content);
content2[j].RecalcInfo.Set_Type_0(pararecalc_0_All);
content2[j].Set_Parent(content);
}
slide.graphicObjects.State.textObject.recalcInfo.recalculateContent = true;
slide.graphicObjects.State.textObject.recalcInfo.recalculateTransformText = true;
......@@ -3754,7 +3758,7 @@ PasteProcessor.prototype =
{
var b_add_slide = false;
if(presentation.Slids.length === 0)
if(presentation.Slides.length === 0)
{
presentation.addNextSlide();
b_add_slide = true;
......
......@@ -4715,6 +4715,7 @@ function redrawSlide(slide, presentation, arr_layouts, direction, arr_slides)
}
}
function redrawSlide2(slide, presentation, arrInd, pos, arr_layouts, direction, arr_slides)
{
var _history_is_on = History.Is_On();
......@@ -4793,13 +4794,6 @@ function recalculateSlideAfterChangeThemeColors(slide, presentation, direction,
slide.recalcAllColors();
slide.recalculate();
presentation.DrawingDocument.OnRecalculatePage(slide.num, slide);
if(presentation.CurPos.Type === docpostype_FlowObjects)
{
if(presentation.CurPage === slide.num)
{
presentation.RecalculateCurPos();
}
}
if(direction == 0)
{
......
......@@ -3680,6 +3680,7 @@ CShape.prototype =
t_y = invert_transform.TransformPointY(x, y);
var radius = this.getParentObjects().presentation.DrawingDocument.GetMMPerDot(TRACK_CIRCLE_RADIUS);
var check_line = CheckObjectLine(this);
var sqr_x = t_x*t_y, sqr_y = t_y*t_y;
if(Math.sqrt(sqr_x + sqr_y) < radius)
return 0;
......@@ -3687,18 +3688,18 @@ CShape.prototype =
var hc = this.extX*0.5;
var dist_x = t_x - hc;
sqr_x = dist_x*dist_x;
if(Math.sqrt(sqr_x + sqr_y) < radius)
if(Math.sqrt(sqr_x + sqr_y) < radius && !check_line)
return 1;
dist_x = t_x - this.extX;
sqr_x = dist_x*dist_x;
if(Math.sqrt(sqr_x + sqr_y) < radius)
if(Math.sqrt(sqr_x + sqr_y) < radius && !check_line)
return 2;
var vc = this.extY*0.5;
var dist_y = t_y - vc;
sqr_y = dist_y*dist_y;
if(Math.sqrt(sqr_x + sqr_y) < radius)
if(Math.sqrt(sqr_x + sqr_y) < radius && !check_line)
return 3;
dist_y = t_y - this.extY;
......@@ -3708,17 +3709,17 @@ CShape.prototype =
dist_x = t_x - hc;
sqr_x = dist_x*dist_x;
if(Math.sqrt(sqr_x + sqr_y) < radius)
if(Math.sqrt(sqr_x + sqr_y) < radius && !check_line)
return 5;
dist_x = t_x;
sqr_x = dist_x*dist_x;
if(Math.sqrt(sqr_x + sqr_y) < radius)
if(Math.sqrt(sqr_x + sqr_y) < radius && !check_line)
return 6;
dist_y = t_y - vc;
sqr_y = dist_y*dist_y;
if(Math.sqrt(sqr_x + sqr_y) < radius)
if(Math.sqrt(sqr_x + sqr_y) < radius && !check_line)
return 7;
var rotate_distance = this.getParentObjects().presentation.DrawingDocument.GetMMPerDot(TRACK_DISTANCE_ROTATE);;
......@@ -3726,7 +3727,7 @@ CShape.prototype =
sqr_y = dist_y*dist_y;
dist_x = t_x - hc;
sqr_x = dist_x*dist_x;
if(Math.sqrt(sqr_x + sqr_y) < radius)
if(Math.sqrt(sqr_x + sqr_y) < radius && !check_line)
return 8;
return -1;
......@@ -3774,7 +3775,7 @@ CShape.prototype =
var _hit_context = this.getParentObjects().presentation.DrawingDocument.CanvasHitContext;
return (HitInLine(_hit_context, x_t, y_t, 0, 0, this.extX, 0) ||
return !(CheckObjectLine(this))&&(HitInLine(_hit_context, x_t, y_t, 0, 0, this.extX, 0) ||
HitInLine(_hit_context, x_t, y_t, this.extX, 0, this.extX, this.extY)||
HitInLine(_hit_context, x_t, y_t, this.extX, this.extY, 0, this.extY)||
HitInLine(_hit_context, x_t, y_t, 0, this.extY, 0, 0) ||
......
......@@ -4548,12 +4548,17 @@ function AddPolyLine2State3(drawingObjectsController, drawingObjects, polyline)
};
}
function CheckObjectLine(obj)
{
return (obj instanceof CShape && obj.spPr.geometry && obj.spPr.geometry.preset === "line");
}
function DrawDefaultSelection(drawingObjectsController, drawingDocument)
{
var selected_objects = drawingObjectsController.selectedObjects;
for(var i = 0; i < selected_objects.length; ++i)
{
drawingDocument.DrawTrack(TYPE_TRACK_SHAPE, selected_objects[i].getTransformMatrix(), 0, 0, selected_objects[i].extX, selected_objects[i].extY, false, selected_objects[i].canRotate());
drawingDocument.DrawTrack(TYPE_TRACK_SHAPE, selected_objects[i].getTransformMatrix(), 0, 0, selected_objects[i].extX, selected_objects[i].extY, CheckObjectLine(selected_objects[i]), selected_objects[i].canRotate());
}
if(selected_objects.length === 1)
{
......
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