Commit fc5e6450 authored by Alexander.Trofimov's avatar Alexander.Trofimov

Flush Text Measurer

parent ece15bba
......@@ -5711,15 +5711,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();
......
......@@ -16,7 +16,7 @@ function CTextMeasurerWrapper()
this.Descender = 0;
this.Height = 0;
this.UnitsPerEm = 0;
};
}
CTextMeasurerWrapper.prototype =
{
......@@ -221,6 +221,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;
}
};
......@@ -367,7 +380,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