Commit b3898421 authored by Sergey Luzyanin's avatar Sergey Luzyanin

generate layout at opening empty presentation

parent e9b4abe1
......@@ -8830,8 +8830,9 @@ function GenerateDefaultMasterSlide(theme)
function GenerateDefaultSlideLayout(master)
{
var layout = new SlideLayout(master);
var layout = new SlideLayout();
layout.Theme = master.Theme;
layout.Master = master;
return layout;
}
......@@ -10444,6 +10445,7 @@ function CorrectUniColor(asc_color, unicolor, flag)
window['AscFormat'].TextListStyle = TextListStyle;
window['AscFormat'].GenerateDefaultTheme = GenerateDefaultTheme;
window['AscFormat'].GenerateDefaultMasterSlide = GenerateDefaultMasterSlide;
window['AscFormat'].GenerateDefaultSlideLayout = GenerateDefaultSlideLayout;
window['AscFormat'].GenerateDefaultSlide = GenerateDefaultSlide;
window['AscFormat'].CreateDefaultTextRectStyle = CreateDefaultTextRectStyle;
window['AscFormat'].GenerateDefaultColorMap = GenerateDefaultColorMap;
......
......@@ -684,6 +684,11 @@ function BinaryPPTYLoader()
this.presentation.slideMasters[0] = AscFormat.GenerateDefaultMasterSlide(this.presentation.themes[0]);
this.presentation.slideLayouts[0] = this.presentation.slideMasters[0].sldLayoutLst[0];
}
if(this.presentation.slideMasters[0].sldLayoutLst.length === 0){
this.presentation.slideMasters[0].sldLayoutLst[0] = AscFormat.GenerateDefaultSlideLayout(this.presentation.slideMasters[0]);
this.presentation.slideLayouts[0] = this.presentation.slideMasters[0].sldLayoutLst[0];
}
if (this.presentation.Slides.length == 0)
{
this.presentation.Slides[0] = AscFormat.GenerateDefaultSlide(this.presentation.slideLayouts[0]);
......
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