Commit 7d10600b authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 33802

parent 5738cfd8
...@@ -6855,7 +6855,20 @@ CTextStyles.prototype = ...@@ -6855,7 +6855,20 @@ CTextStyles.prototype =
{ {
this.otherStyle = null; this.otherStyle = null;
} }
},
Document_Get_AllFontNames: function(AllFonts){
if(this.titleStyle){
this.titleStyle.Document_Get_AllFontNames(AllFonts);
}
if(this.bodyStyle){
this.bodyStyle.Document_Get_AllFontNames(AllFonts);
}
if(this.otherStyle){
this.otherStyle.Document_Get_AllFontNames(AllFonts);
}
} }
}; };
//--------------------------- //---------------------------
...@@ -8621,6 +8634,15 @@ TextListStyle.prototype = ...@@ -8621,6 +8634,15 @@ TextListStyle.prototype =
this.levels[i] = null; this.levels[i] = null;
} }
} }
},
Document_Get_AllFontNames: function(AllFonts){
for(var i = 0; i < 10; ++i){
if(this.levels[i] && this.levels[i].DefaultRunPr){
this.levels[i].DefaultRunPr.Document_Get_AllFontNames(AllFonts);
}
}
} }
}; };
......
...@@ -1089,6 +1089,9 @@ CShape.prototype.getAllImages = function (images) { ...@@ -1089,6 +1089,9 @@ CShape.prototype.getAllImages = function (images) {
CShape.prototype.getAllFonts = function (fonts) { CShape.prototype.getAllFonts = function (fonts) {
if (this.txBody) { if (this.txBody) {
this.txBody.content.Document_Get_AllFontNames(fonts); this.txBody.content.Document_Get_AllFontNames(fonts);
if(this.txBody && this.txBody.lstStyle){
this.txBody.lstStyle.Document_Get_AllFontNames(fonts);
}
delete fonts["+mj-lt"]; delete fonts["+mj-lt"];
delete fonts["+mn-lt"]; delete fonts["+mn-lt"];
delete fonts["+mj-ea"]; delete fonts["+mj-ea"];
......
...@@ -3438,11 +3438,25 @@ CPresentation.prototype = ...@@ -3438,11 +3438,25 @@ CPresentation.prototype =
Document_Get_AllFontNames : function() Document_Get_AllFontNames : function()
{ {
var AllFonts = {}; var AllFonts = {}, i;
for(var i =0 ; i < this.Slides.length; ++i) for(i =0 ; i < this.Slides.length; ++i)
{ {
this.Slides[i].getAllFonts(AllFonts) this.Slides[i].getAllFonts(AllFonts)
} }
for(i = 0; i < this.slideMasters.length; ++i)
{
this.slideMasters[i].getAllFonts(AllFonts);
}
if(this.globalTableStyles)
{
this.globalTableStyles.Document_Get_AllFontNames(AllFonts);
}
delete AllFonts["+mj-lt"];
delete AllFonts["+mn-lt"];
delete AllFonts["+mj-ea"];
delete AllFonts["+mn-ea"];
delete AllFonts["+mj-cs"];
delete AllFonts["+mn-cs"];
return AllFonts; return AllFonts;
}, },
......
...@@ -495,7 +495,20 @@ MasterSlide.prototype = ...@@ -495,7 +495,20 @@ MasterSlide.prototype =
getAllFonts: function(fonts) getAllFonts: function(fonts)
{ {
for(var i = 0; i < this.cSld.spTree.length; ++i) var i;
if(this.Theme){
this.Theme.Document_Get_AllFontNames(fonts);
}
if(this.txStyles){
this.txStyles.Document_Get_AllFontNames(fonts);
}
for(i = 0; i < this.sldLayoutLst.length; ++i){
this.sldLayoutLst[i].getAllFonts(fonts);
}
for(i = 0; i < this.cSld.spTree.length; ++i)
{ {
if(typeof this.cSld.spTree[i].getAllFonts === "function") if(typeof this.cSld.spTree[i].getAllFonts === "function")
this.cSld.spTree[i].getAllFonts(fonts); this.cSld.spTree[i].getAllFonts(fonts);
......
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