Commit a675ceb2 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

рефакторинг : CMathInfoTextPr_2 => CMathInfoTextPr


git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@62849 954022d7-b5bf-4e40-9824-e11837661b57
parent c442c56e
...@@ -1915,7 +1915,7 @@ ParaRun.prototype.Recalculate_MeasureContent = function() ...@@ -1915,7 +1915,7 @@ ParaRun.prototype.Recalculate_MeasureContent = function()
bNormalText = this.IsNormalText(), bNormalText = this.IsNormalText(),
bEqArray = this.Parent.IsEqArray(); bEqArray = this.Parent.IsEqArray();
InfoMathText = new CMathInfoTextPr_2(Pr, ArgSize, bNormalText, bEqArray); InfoMathText = new CMathInfoTextPr(Pr, ArgSize, bNormalText, bEqArray);
} }
for ( var Pos = 0; Pos < ContentLength; Pos++ ) for ( var Pos = 0; Pos < ContentLength; Pos++ )
...@@ -3950,7 +3950,7 @@ ParaRun.prototype.Draw_Elements = function(PDSE) ...@@ -3950,7 +3950,7 @@ ParaRun.prototype.Draw_Elements = function(PDSE)
var ArgSize = this.Parent.Compiled_ArgSz.value, var ArgSize = this.Parent.Compiled_ArgSz.value,
bNormalText = this.IsNormalText(); bNormalText = this.IsNormalText();
InfoMathText = new CMathInfoTextPr_2(CurTextPr, ArgSize, bNormalText, this.bEqArray); InfoMathText = new CMathInfoTextPr(CurTextPr, ArgSize, bNormalText, this.bEqArray);
} }
if ( undefined !== CurTextPr.Shd && shd_Nil !== CurTextPr.Shd.Value ) if ( undefined !== CurTextPr.Shd && shd_Nil !== CurTextPr.Shd.Value )
......
...@@ -4053,7 +4053,6 @@ CMathContent.prototype.Recalculate_Range = function(PRS, ParaPr, Depth) ...@@ -4053,7 +4053,6 @@ CMathContent.prototype.Recalculate_Range = function(PRS, ParaPr, Depth)
} }
if ( true === PRS.NewRange ) if ( true === PRS.NewRange )
{ {
RangeEndPos = Pos; RangeEndPos = Pos;
......
...@@ -1015,7 +1015,7 @@ var MathTextInfo_MathText = 1; ...@@ -1015,7 +1015,7 @@ var MathTextInfo_MathText = 1;
var MathTextInfo_SpecialOperator = 2; var MathTextInfo_SpecialOperator = 2;
var MathTextInfo_NormalText = 3; var MathTextInfo_NormalText = 3;
function CMathInfoTextPr_2(TextPr, ArgSize, bNormalText, bEqArray) function CMathInfoTextPr(TextPr, ArgSize, bNormalText, bEqArray)
{ {
this.CurrType = -1; // в первый раз Font всегда выставляем this.CurrType = -1; // в первый раз Font всегда выставляем
this.TextPr = TextPr; this.TextPr = TextPr;
...@@ -1042,7 +1042,7 @@ function CMathInfoTextPr_2(TextPr, ArgSize, bNormalText, bEqArray) ...@@ -1042,7 +1042,7 @@ function CMathInfoTextPr_2(TextPr, ArgSize, bNormalText, bEqArray)
this.RFontsCompare[fontslot_EastAsia] = undefined !== this.TextPr.RFonts.EastAsia && this.TextPr.RFonts.EastAsia.Name == "Cambria Math"; this.RFontsCompare[fontslot_EastAsia] = undefined !== this.TextPr.RFonts.EastAsia && this.TextPr.RFonts.EastAsia.Name == "Cambria Math";
} }
CMathInfoTextPr_2.prototype.NeedUpdateFont = function(code, fontSlot, IsPlaceholder) CMathInfoTextPr.prototype.NeedUpdateFont = function(code, fontSlot, IsPlaceholder)
{ {
var NeedUpdateFont = false; var NeedUpdateFont = false;
var bMathText = this.bNormalText == false || IsPlaceholder; var bMathText = this.bNormalText == false || IsPlaceholder;
...@@ -1069,13 +1069,13 @@ CMathInfoTextPr_2.prototype.NeedUpdateFont = function(code, fontSlot, IsPlacehol ...@@ -1069,13 +1069,13 @@ CMathInfoTextPr_2.prototype.NeedUpdateFont = function(code, fontSlot, IsPlacehol
return NeedUpdateFont; return NeedUpdateFont;
}; };
CMathInfoTextPr_2.prototype.GetFontKoef = function(fontSlot) CMathInfoTextPr.prototype.GetFontKoef = function(fontSlot)
{ {
var FontSize = fontSlot == fontslot_CS ? this.TextPr.FontSizeCS : this.TextPr.FontSize; var FontSize = fontSlot == fontslot_CS ? this.TextPr.FontSizeCS : this.TextPr.FontSize;
return MatGetKoeffArgSize(FontSize, this.ArgSize); return MatGetKoeffArgSize(FontSize, this.ArgSize);
}; };
CMathInfoTextPr_2.prototype.GetFontSlot = function(code) CMathInfoTextPr.prototype.GetFontSlot = function(code)
{ {
var Hint = this.TextPr.RFonts.Hint; var Hint = this.TextPr.RFonts.Hint;
var bCS = this.TextPr.CS; var bCS = this.TextPr.CS;
...@@ -1084,7 +1084,7 @@ CMathInfoTextPr_2.prototype.GetFontSlot = function(code) ...@@ -1084,7 +1084,7 @@ CMathInfoTextPr_2.prototype.GetFontSlot = function(code)
return g_font_detector.Get_FontClass(code, Hint, lcid, bCS, bRTL); return g_font_detector.Get_FontClass(code, Hint, lcid, bCS, bRTL);
}; };
CMathInfoTextPr_2.prototype.IsSpecilalOperator = function(val) CMathInfoTextPr.prototype.IsSpecilalOperator = function(val)
{ {
var bSpecialOperator = val == 0x21 || val == 0x23 || (val >= 0x28 && val <= 0x2F) || (val >= 0x3A && val <= 0x3F) || (val >=0x5B && val <= 0x5F) || (val >= 0x7B && val <= 0xA1) || val == 0xAC || val == 0xB1 || val == 0xB7 || val == 0xBF || val == 0xD7 || val == 0xF7 || (val >= 0x2010 && val <= 0x2014) || val == 0x2016 || (val >= 0x2020 && val <= 0x2022) || val == 0x2026, var bSpecialOperator = val == 0x21 || val == 0x23 || (val >= 0x28 && val <= 0x2F) || (val >= 0x3A && val <= 0x3F) || (val >=0x5B && val <= 0x5F) || (val >= 0x7B && val <= 0xA1) || val == 0xAC || val == 0xB1 || val == 0xB7 || val == 0xBF || val == 0xD7 || val == 0xF7 || (val >= 0x2010 && val <= 0x2014) || val == 0x2016 || (val >= 0x2020 && val <= 0x2022) || val == 0x2026,
bSpecialArrow = val >= 0x2190 && val <= 0x21FF, bSpecialArrow = val >= 0x2190 && val <= 0x21FF,
......
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