Commit 73271f42 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

Bug 26820 - В пустой презентации слайд создается с дефолтным layout

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59769 954022d7-b5bf-4e40-9824-e11837661b57
parent b6cb0b99
......@@ -3307,10 +3307,10 @@ CPresentation.prototype =
addNextSlide: function(layoutIndex)
{
History.Create_NewPoint();
if(!(this.CurPage === -1))
var new_slide, layout;
if(this.Slides[this.CurPage])
{
var cur_slide = this.Slides[this.CurPage];
var new_slide, layout;
layout = isRealNumber(layoutIndex) ? (cur_slide.Layout.Master.sldLayoutLst[layoutIndex] ? cur_slide.Layout.Master.sldLayoutLst[layoutIndex]: cur_slide.Layout) : cur_slide.Layout.Master.getMatchingLayout(cur_slide.Layout.type, cur_slide.Layout.matchingName, cur_slide.Layout.cSld.name);
new_slide = new Slide(this, layout, this.CurPage + 1);
......@@ -3341,8 +3341,11 @@ CPresentation.prototype =
else
{
var master = this.slideMasters[0];
var layout = master.sldLayoutLst[0];
var new_slide = new Slide(this, layout, this.CurPage + 1);
layout = isRealNumber(layoutIndex) ? (master.sldLayoutLst[layoutIndex] ? master.sldLayoutLst[layoutIndex]: master.sldLayoutLst[0]) : master.sldLayoutLst[0];
new_slide = new Slide(this, layout, this.CurPage + 1);
for(var i = 0; i < layout.cSld.spTree.length; ++i)
{
if(layout.cSld.spTree[i].isPlaceholder())
......
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