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 = ...@@ -234,7 +234,9 @@ CShape.prototype =
for(var i = 0; i < paragraphs.length; ++i) for(var i = 0; i < paragraphs.length; ++i)
{ {
var cur_par = paragraphs[i]; var cur_par = paragraphs[i];
cur_par.bFromDocument = true;
var new_paragraph = cur_par.Copy(new_content); var new_paragraph = cur_par.Copy(new_content);
cur_par.bFromDocument = false;
new_content.Internal_Content_Add( i, new_paragraph, false ); new_content.Internal_Content_Add( i, new_paragraph, false );
/*var bullet = cur_par.Pr.Bullet; /*var bullet = cur_par.Pr.Bullet;
if(bullet && bullet.bulletType && bullet.bulletType.type !== BULLET_TYPE_BULLET_NONE) if(bullet && bullet.bulletType && bullet.bulletType.type !== BULLET_TYPE_BULLET_NONE)
......
...@@ -374,7 +374,7 @@ MoveInlineObject.prototype = ...@@ -374,7 +374,7 @@ MoveInlineObject.prototype =
var drawing = this.majorObject.copy(); var drawing = this.majorObject.copy();
drawing.setParent(new_para_drawing); drawing.setParent(new_para_drawing);
new_para_drawing.Set_GraphicObject(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.resetSelection();
this.drawingObjects.selectObject(drawing, pageIndex); this.drawingObjects.selectObject(drawing, pageIndex);
this.drawingObjects.document.Recalculate(); this.drawingObjects.document.Recalculate();
......
...@@ -162,10 +162,7 @@ CChartSpace.prototype.handleUpdateExtents = function() ...@@ -162,10 +162,7 @@ CChartSpace.prototype.handleUpdateExtents = function()
}; };
CChartSpace.prototype.handleUpdateFlip = function() CChartSpace.prototype.handleUpdateFlip = function()
{ {
this.recalcTransform(); this.handleUpdateExtents();
this.recalcWrapPolygon();
this.setRecalculateInfo();
this.addToRecalculate();
}; };
CChartSpace.prototype.handleUpdateChart = function() CChartSpace.prototype.handleUpdateChart = function()
{ {
......
...@@ -867,3 +867,18 @@ CShape.prototype.setRecalcObject = function(object) ...@@ -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 = ...@@ -1811,24 +1811,8 @@ CGraphicObjects.prototype =
if(objects_for_grouping.length < 2) if(objects_for_grouping.length < 2)
return; return;
var check_paragraphs = []; var i;
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 common_bounds = this.checkCommonBounds(objects_for_grouping); var common_bounds = this.checkCommonBounds(objects_for_grouping);
History.Create_NewPoint(); 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); 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); para_drawing.Set_WrappingType(WRAPPING_TYPE_NONE);
...@@ -1842,17 +1826,8 @@ CGraphicObjects.prototype = ...@@ -1842,17 +1826,8 @@ CGraphicObjects.prototype =
var page_index = objects_for_grouping[0].parent.pageIndex; var page_index = objects_for_grouping[0].parent.pageIndex;
var first_paragraph = objects_for_grouping[0].parent.Get_ParentParagraph(); 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); 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) for(i = 0; i < objects_for_grouping.length; ++i)
{ {
objects_for_grouping[i].parent.Remove_FromDocument(false); objects_for_grouping[i].parent.Remove_FromDocument(false);
...@@ -1863,11 +1838,7 @@ CGraphicObjects.prototype = ...@@ -1863,11 +1838,7 @@ CGraphicObjects.prototype =
this.resetSelection(); this.resetSelection();
this.selectObject(group, page_index); this.selectObject(group, page_index);
this.document.Recalculate(); this.document.Recalculate();
}
// else
// {
// this.document.Document_Undo();
// }
}, },
getParentParagraphsFromArr: function(drawings) getParentParagraphsFromArr: function(drawings)
......
...@@ -259,7 +259,7 @@ CGraphicPage.prototype = ...@@ -259,7 +259,7 @@ CGraphicPage.prototype =
if(Array.isArray(drawing_array)) if(Array.isArray(drawing_array))
{ {
for(var index = 0; index < drawing_array.length; ++index) 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); return drawing_array.splice(index, 1);
} }
} }
...@@ -267,22 +267,22 @@ CGraphicPage.prototype = ...@@ -267,22 +267,22 @@ CGraphicPage.prototype =
{ {
drawing_array = this.beforeTextObjects; drawing_array = this.beforeTextObjects;
for(index = 0; index < drawing_array.length; ++index) 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 drawing_array.splice(index, 1);
drawing_array = this.behindDocObjects; drawing_array = this.behindDocObjects;
for(index = 0; index < drawing_array.length; ++index) 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 drawing_array.splice(index, 1);
drawing_array = this.inlineObjects; drawing_array = this.inlineObjects;
for(index = 0; index < drawing_array.length; ++index) 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 drawing_array.splice(index, 1);
drawing_array = this.wrappingObjects; drawing_array = this.wrappingObjects;
for(index = 0; index < drawing_array.length; ++index) 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 drawing_array.splice(index, 1);
} }
return null; 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