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,6 +1166,8 @@ CShape.prototype.getHierarchy = function() ...@@ -1165,6 +1166,8 @@ CShape.prototype.getHierarchy = function()
//if(this.recalcInfo.recalculateShapeHierarchy) //if(this.recalcInfo.recalculateShapeHierarchy)
{ {
this.compiledHierarchy = []; this.compiledHierarchy = [];
if(this.parent)
{
var hierarchy = this.compiledHierarchy; var hierarchy = this.compiledHierarchy;
if(this.isPlaceholder()) if(this.isPlaceholder())
{ {
...@@ -1189,6 +1192,7 @@ CShape.prototype.getHierarchy = function() ...@@ -1189,6 +1192,7 @@ CShape.prototype.getHierarchy = function()
} }
this.recalcInfo.recalculateShapeHierarchy = true; this.recalcInfo.recalculateShapeHierarchy = true;
} }
}
return this.compiledHierarchy; return this.compiledHierarchy;
}; };
...@@ -2322,12 +2326,21 @@ CShape.prototype.recalculateTextStyles = function (level) { ...@@ -2322,12 +2326,21 @@ 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])) {
if(isRealObject(parent_objects.presentation.defaultTextStyle.levels[9]))
{
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]; var default_ppt_style = parent_objects.presentation.defaultTextStyle.levels[level];
default_style.ParaPr.Merge(default_ppt_style.Copy()); default_style.ParaPr.Merge(default_ppt_style.Copy());
default_ppt_style.DefaultRunPr && default_style.TextPr.Merge(default_ppt_style.DefaultRunPr.Copy()); default_ppt_style.DefaultRunPr && default_style.TextPr.Merge(default_ppt_style.DefaultRunPr.Copy());
} }
}
var master_style; var master_style;
if (isRealObject(parent_objects.master) && isRealObject(parent_objects.master.txStyles)) { if (isRealObject(parent_objects.master) && isRealObject(parent_objects.master.txStyles)) {
......
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