Commit 1fbdcd9a authored by Alexander.Trofimov's avatar Alexander.Trofimov

Flush Text Measurer

parent 2845a504
......@@ -5735,15 +5735,7 @@ function OfflineEditor () {
this.offline_afteInit = function () {window.AscAlwaysSaveAspectOnResizeTrack = true;};
this.flushTextMeasurer = function () {
AscCommon.g_oTextMeasurer.m_oFont = null;
AscCommon.g_oTextMeasurer.m_oTextPr = null;
AscCommon.g_oTextMeasurer.m_oGrFonts = new CGrRFonts();
AscCommon.g_oTextMeasurer.m_oLastFont = new CFontSetup();
AscCommon.g_oTextMeasurer.LastFontOriginInfo = { Name : "", Replace : null };
AscCommon.g_oTextMeasurer.Ascender = 0;
AscCommon.g_oTextMeasurer.Descender = 0;
AscCommon.g_oTextMeasurer.Height = 0;
AscCommon.g_oTextMeasurer.UnitsPerEm = 0;
AscCommon.g_oTextMeasurer.Flush();
};
}
var _s = new OfflineEditor();
......
......@@ -40,7 +40,7 @@ function CTextMeasurerWrapper()
this.Descender = 0;
this.Height = 0;
this.UnitsPerEm = 0;
};
}
CTextMeasurerWrapper.prototype =
{
......@@ -245,6 +245,19 @@ CTextMeasurerWrapper.prototype =
GetHeight : function()
{
return this.Height;
},
Flush : function()
{
this.m_oFont = null;
this.m_oTextPr = null;
this.m_oGrFonts = new CGrRFonts();
this.m_oLastFont = new CFontSetup();
this.LastFontOriginInfo = { Name : "", Replace : null };
this.Ascender = 0;
this.Descender = 0;
this.Height = 0;
this.UnitsPerEm = 0;
}
};
......@@ -391,7 +404,7 @@ function GetLoadInfoForMeasurer(info, lStyle)
SrcBold : bSrcBold,
SrcItalic : bSrcItalic
};
};
}
CTextMeasurerWrapper.prototype["Init"] = CTextMeasurerWrapper.prototype.Init;
......
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