Commit e0a55e1f authored by Ilya Kirillov's avatar Ilya Kirillov

Implemented creating a font map for footnotes.

parent 261c4600
...@@ -8082,20 +8082,12 @@ CDocument.prototype.Document_CreateFontMap = function() ...@@ -8082,20 +8082,12 @@ CDocument.prototype.Document_CreateFontMap = function()
var FontMap = {}; var FontMap = {};
this.SectionsInfo.Document_CreateFontMap(FontMap); this.SectionsInfo.Document_CreateFontMap(FontMap);
var CurPage = 0;
this.DrawingObjects.documentCreateFontMap(CurPage, FontMap);
var Count = this.Content.length; var Count = this.Content.length;
for (var Index = 0; Index < Count; Index++) for (var Index = 0; Index < Count; Index++)
{ {
var Element = this.Content[Index]; var Element = this.Content[Index];
Element.Document_CreateFontMap(FontMap); Element.Document_CreateFontMap(FontMap);
if (Element.Pages.length > 1)
{
for (var TempIndex = 1; TempIndex < Element.Pages.length - 1; TempIndex++)
this.DrawingObjects.documentCreateFontMap(++CurPage, FontMap);
}
} }
AscFormat.checkThemeFonts(FontMap, this.theme.themeElements.fontScheme); AscFormat.checkThemeFonts(FontMap, this.theme.themeElements.fontScheme);
return FontMap; return FontMap;
......
...@@ -1732,6 +1732,11 @@ ParaFootnoteReference.prototype.GetCustomText = function() ...@@ -1732,6 +1732,11 @@ ParaFootnoteReference.prototype.GetCustomText = function()
{ {
return this.CustomMark; return this.CustomMark;
}; };
ParaFootnoteReference.prototype.CreateDocumentFontMap = function(FontMap)
{
if (this.Footnote)
this.Footnote.Document_CreateFontMap(FontMap);
};
/** /**
* Класс представляющий номер сноски внутри сноски. * Класс представляющий номер сноски внутри сноски.
......
...@@ -2035,8 +2035,10 @@ ParaRun.prototype.Create_FontMap = function(Map) ...@@ -2035,8 +2035,10 @@ ParaRun.prototype.Create_FontMap = function(Map)
{ {
var Item = this.Content[Index]; var Item = this.Content[Index];
if ( para_Drawing === Item.Type ) if (para_Drawing === Item.Type)
Item.documentCreateFontMap( Map ); Item.documentCreateFontMap(Map);
else if (para_FootnoteReference === Item.Type)
Item.CreateDocumentFontMap(Map);
} }
if(this.Type === para_Math_Run) if(this.Type === para_Math_Run)
......
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