Commit b3b8fefa authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

UniNvPr при добавлении объектов на слайд.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59140 954022d7-b5bf-4e40-9824-e11837661b57
parent 9af29bce
......@@ -383,6 +383,8 @@ SlideLayout.prototype =
shapeAdd: function(pos, item)
{
this.checkDrawingUniNvPr(item);
History.Add(this, {Type: historyitem_SlideLayoutAddToSpTree, Pos: pos, Item: item});
this.cSld.spTree.splice(pos, 0, item);
},
......@@ -396,6 +398,7 @@ SlideLayout.prototype =
},
changeSize: Slide.prototype.changeSize,
checkDrawingUniNvPr: Slide.prototype.checkDrawingUniNvPr,
Get_Id: function()
{
......
......@@ -776,11 +776,58 @@ Slide.prototype =
shapeAdd: function(pos, item)
{
this.checkDrawingUniNvPr(item);
var _pos = isRealNumber(pos) ? pos : this.cSld.spTree.length;
History.Add(this, {Type: historyitem_SlideAddToSpTree, Pos: _pos, Item: item});
this.cSld.spTree.splice(_pos, 0, item);
},
checkDrawingUniNvPr: function(drawing)
{
return;
var nv_sp_pr;
if(drawing)
{
switch (drawing.getObjectType())
{
case historyitem_type_ChartSpace:
{
break;
}
case historyitem_type_GroupShape:
{
if(!drawing.nvGrpSpPr)
{
nv_sp_pr = new UniNvPr();
nv_sp_pr.cNvPr.setId(++this.maxId);
drawing.setNvSpPr(nv_sp_pr);
}
break;
}
case historyitem_type_ImageShape:
{
if(!drawing.nvPicPr)
{
nv_sp_pr = new UniNvPr();
nv_sp_pr.cNvPr.setId(++this.maxId);
drawing.setNvSpPr(nv_sp_pr);
}
break;
}
case historyitem_type_Shape:
{
if(!drawing.nvSpPr)
{
nv_sp_pr = new UniNvPr();
nv_sp_pr.cNvPr.setId(++this.maxId);
drawing.setNvSpPr(nv_sp_pr);
}
break;
}
}
}
},
removeFromSpTreeById: function(id)
{
var sp_tree = this.cSld.spTree;
......
......@@ -574,6 +574,7 @@ MasterSlide.prototype =
},
checkSlideSize: Slide.prototype.checkSlideSize,
checkDrawingUniNvPr: Slide.prototype.checkDrawingUniNvPr,
checkSlideColorScheme: function()
{
this.recalcInfo.recalculateSpTree = true;
......@@ -605,6 +606,7 @@ MasterSlide.prototype =
shapeAdd: function(pos, item)
{
this.checkDrawingUniNvPr(item);
History.Add(this, {Type: historyitem_SlideMasterAddToSpTree, Pos: pos, Item: item});
this.cSld.spTree.splice(pos, 0, item);
},
......
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