Commit 1c585703 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Bug 25387 - Не выделяется вторая автофигура по Contol+Click, если клик произведен в область текста

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57277 954022d7-b5bf-4e40-9824-e11837661b57
parent 0da29985
......@@ -234,7 +234,9 @@ CShape.prototype =
for(var i = 0; i < paragraphs.length; ++i)
{
var cur_par = paragraphs[i];
cur_par.bFromDocument = true;
var new_paragraph = cur_par.Copy(new_content);
cur_par.bFromDocument = false;
new_content.Internal_Content_Add( i, new_paragraph, false );
/*var bullet = cur_par.Pr.Bullet;
if(bullet && bullet.bulletType && bullet.bulletType.type !== BULLET_TYPE_BULLET_NONE)
......
......@@ -374,7 +374,7 @@ MoveInlineObject.prototype =
var drawing = this.majorObject.copy();
drawing.setParent(new_para_drawing);
new_para_drawing.Set_GraphicObject(drawing);
new_para_drawing.Add_ToDocument(this.InlinePos);
new_para_drawing.Add_ToDocument(this.InlinePos, false);
this.drawingObjects.resetSelection();
this.drawingObjects.selectObject(drawing, pageIndex);
this.drawingObjects.document.Recalculate();
......
......@@ -162,10 +162,7 @@ CChartSpace.prototype.handleUpdateExtents = function()
};
CChartSpace.prototype.handleUpdateFlip = function()
{
this.recalcTransform();
this.recalcWrapPolygon();
this.setRecalculateInfo();
this.addToRecalculate();
this.handleUpdateExtents();
};
CChartSpace.prototype.handleUpdateChart = function()
{
......
......@@ -867,3 +867,18 @@ CShape.prototype.setRecalcObject = function(object)
}
}
};
CShape.prototype.setStartPage = function(pageIndex)
{
this.selectStartPage = pageIndex;
var content = this.getDocContent && this.getDocContent();
content && content.Set_StartPage(pageIndex);
if(Array.isArray(this.spTree))
{
for(var i = 0; i < this.spTree.length; ++i)
{
this.spTree[i].setStartPage && this.spTree[i].setStartPage(pageIndex);
}
}
};
\ No newline at end of file
......@@ -1811,24 +1811,8 @@ CGraphicObjects.prototype =
if(objects_for_grouping.length < 2)
return;
var check_paragraphs = [];
var parent_paragraph, i, j;
for(i = 0; i < objects_for_grouping.length; ++i)
{
parent_paragraph = objects_for_grouping[i].parent.Get_ParentParagraph();
for(j = 0; j < check_paragraphs.length; ++j)
{
if(check_paragraphs[j] === parent_paragraph)
break;
}
if(j === check_paragraphs.length)
check_paragraphs.push(parent_paragraph);
}
var i;
var common_bounds = this.checkCommonBounds(objects_for_grouping);
History.Create_NewPoint();
var para_drawing = new ParaDrawing(common_bounds.maxX - common_bounds.minX, common_bounds.maxY - common_bounds.minY, null, this.drawingDocument, null, null);
para_drawing.Set_WrappingType(WRAPPING_TYPE_NONE);
......@@ -1842,17 +1826,8 @@ CGraphicObjects.prototype =
var page_index = objects_for_grouping[0].parent.pageIndex;
var first_paragraph = objects_for_grouping[0].parent.Get_ParentParagraph();
var nearest_pos = this.document.Get_NearestPos(objects_for_grouping[0].parent.pageIndex, common_bounds.minX, common_bounds.minY, true, para_drawing);
parent_paragraph = nearest_pos.Paragraph;
for(j = 0; j < check_paragraphs.length; ++j)
{
if(check_paragraphs[j] === parent_paragraph)
break;
}
if(j === check_paragraphs.length)
check_paragraphs.push(parent_paragraph);
// if(false === this.document.Document_Is_SelectionLocked(changestype_Drawing_Props, {Type : changestype_2_ElementsArray_and_Type , Elements : check_paragraphs, CheckType : changestype_Paragraph_Content}))
{
for(i = 0; i < objects_for_grouping.length; ++i)
{
objects_for_grouping[i].parent.Remove_FromDocument(false);
......@@ -1863,11 +1838,7 @@ CGraphicObjects.prototype =
this.resetSelection();
this.selectObject(group, page_index);
this.document.Recalculate();
}
// else
// {
// this.document.Document_Undo();
// }
},
getParentParagraphsFromArr: function(drawings)
......
......@@ -259,7 +259,7 @@ CGraphicPage.prototype =
if(Array.isArray(drawing_array))
{
for(var index = 0; index < drawing_array.length; ++index)
if(drawing_array[index].parent.Get_Id() === id)
if(drawing_array[index].parent && drawing_array[index].parent.Get_Id() === id)
return drawing_array.splice(index, 1);
}
}
......@@ -267,22 +267,22 @@ CGraphicPage.prototype =
{
drawing_array = this.beforeTextObjects;
for(index = 0; index < drawing_array.length; ++index)
if(drawing_array[index].parent.Get_Id() === id)
if(drawing_array[index].parent && drawing_array[index].parent.Get_Id() === id)
return drawing_array.splice(index, 1);
drawing_array = this.behindDocObjects;
for(index = 0; index < drawing_array.length; ++index)
if(drawing_array[index].parent.Get_Id() === id)
if(drawing_array[index].parent && drawing_array[index].parent.Get_Id() === id)
return drawing_array.splice(index, 1);
drawing_array = this.inlineObjects;
for(index = 0; index < drawing_array.length; ++index)
if(drawing_array[index].parent.Get_Id() === id)
if(drawing_array[index].parent && drawing_array[index].parent.Get_Id() === id)
return drawing_array.splice(index, 1);
drawing_array = this.wrappingObjects;
for(index = 0; index < drawing_array.length; ++index)
if(drawing_array[index].parent.Get_Id() === id)
if(drawing_array[index].parent && drawing_array[index].parent.Get_Id() === id)
return drawing_array.splice(index, 1);
}
return null;
......
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