Commit 8caf9127 authored by SergeyLuzyanin's avatar SergeyLuzyanin

Clear lang property

parent 0df78311
...@@ -957,6 +957,7 @@ CShape.prototype.clearContent = function () { ...@@ -957,6 +957,7 @@ CShape.prototype.clearContent = function () {
if (content) { if (content) {
content.Set_ApplyToAll(true); content.Set_ApplyToAll(true);
content.Remove(-1); content.Remove(-1);
content.AddToParagraph(new AscCommonWord.ParaTextPr({Lang : {Val : undefined}}), false);
content.Set_ApplyToAll(false); content.Set_ApplyToAll(false);
} }
}; };
...@@ -1165,29 +1166,32 @@ CShape.prototype.getHierarchy = function() ...@@ -1165,29 +1166,32 @@ CShape.prototype.getHierarchy = function()
//if(this.recalcInfo.recalculateShapeHierarchy) //if(this.recalcInfo.recalculateShapeHierarchy)
{ {
this.compiledHierarchy = []; this.compiledHierarchy = [];
var hierarchy = this.compiledHierarchy; if(this.parent)
if(this.isPlaceholder())
{ {
var ph_type = this.getPlaceholderType(); var hierarchy = this.compiledHierarchy;
var ph_index = this.getPlaceholderIndex(); if(this.isPlaceholder())
var b_is_single_body = this.getIsSingleBody && this.getIsSingleBody();
switch (this.parent.kind)
{ {
case AscFormat.TYPE_KIND.SLIDE: var ph_type = this.getPlaceholderType();
var ph_index = this.getPlaceholderIndex();
var b_is_single_body = this.getIsSingleBody && this.getIsSingleBody();
switch (this.parent.kind)
{ {
hierarchy.push(this.parent.Layout.getMatchingShape(ph_type, ph_index, b_is_single_body)); case AscFormat.TYPE_KIND.SLIDE:
hierarchy.push(this.parent.Layout.Master.getMatchingShape(ph_type, ph_index, b_is_single_body)); {
break; hierarchy.push(this.parent.Layout.getMatchingShape(ph_type, ph_index, b_is_single_body));
} hierarchy.push(this.parent.Layout.Master.getMatchingShape(ph_type, ph_index, b_is_single_body));
break;
}
case AscFormat.TYPE_KIND.LAYOUT: case AscFormat.TYPE_KIND.LAYOUT:
{ {
hierarchy.push(this.parent.Master.getMatchingShape(ph_type, ph_index, b_is_single_body)); hierarchy.push(this.parent.Master.getMatchingShape(ph_type, ph_index, b_is_single_body));
break; break;
}
} }
} }
this.recalcInfo.recalculateShapeHierarchy = true;
} }
this.recalcInfo.recalculateShapeHierarchy = true;
} }
return this.compiledHierarchy; return this.compiledHierarchy;
}; };
...@@ -2322,11 +2326,20 @@ CShape.prototype.recalculateTextStyles = function (level) { ...@@ -2322,11 +2326,20 @@ CShape.prototype.recalculateTextStyles = function (level) {
default_style.TextPr.RFonts.CS = {Name: "+mn-cs", Index: -1}; default_style.TextPr.RFonts.CS = {Name: "+mn-cs", Index: -1};
default_style.TextPr.RFonts.HAnsi = {Name: "+mn-lt", Index: -1}; default_style.TextPr.RFonts.HAnsi = {Name: "+mn-lt", Index: -1};
} }
if (isRealObject(parent_objects.presentation) && isRealObject(parent_objects.presentation.defaultTextStyle) if (isRealObject(parent_objects.presentation) && isRealObject(parent_objects.presentation.defaultTextStyle)) {
&& isRealObject(parent_objects.presentation.defaultTextStyle.levels[level])) {
var default_ppt_style = parent_objects.presentation.defaultTextStyle.levels[level]; if(isRealObject(parent_objects.presentation.defaultTextStyle.levels[9]))
default_style.ParaPr.Merge(default_ppt_style.Copy()); {
default_ppt_style.DefaultRunPr && default_style.TextPr.Merge(default_ppt_style.DefaultRunPr.Copy()); var default_ppt_style = parent_objects.presentation.defaultTextStyle.levels[9];
default_style.ParaPr.Merge(default_ppt_style.Copy());
default_ppt_style.DefaultRunPr && default_style.TextPr.Merge(default_ppt_style.DefaultRunPr.Copy());
}
if(isRealObject(parent_objects.presentation.defaultTextStyle.levels[level]))
{
var default_ppt_style = parent_objects.presentation.defaultTextStyle.levels[level];
default_style.ParaPr.Merge(default_ppt_style.Copy());
default_ppt_style.DefaultRunPr && default_style.TextPr.Merge(default_ppt_style.DefaultRunPr.Copy());
}
} }
var master_style; var master_style;
......
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