Commit e3629fdf authored by Ilya.Kirillov's avatar Ilya.Kirillov

Сделано, чтобы у новых ранов в формулах шрифт изначально стоял Cambria Math во...

Сделано, чтобы у новых ранов в формулах шрифт изначально стоял Cambria Math во всех слотах. Сделано, чтобы таб всегда рисовался черным цветом (баг 25290).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60161 954022d7-b5bf-4e40-9824-e11837661b57
parent da37d34b
...@@ -3404,6 +3404,12 @@ ParaRun.prototype.Draw_Elements = function(PDSE) ...@@ -3404,6 +3404,12 @@ ParaRun.prototype.Draw_Elements = function(PDSE)
case para_Text: case para_Text:
case para_Sym: case para_Sym:
{ {
if (para_Tab === ItemType)
{
pGraphics.p_color(0, 0, 0, 255);
pGraphics.b_color1(0, 0, 0, 255);
}
if ( para_Drawing != ItemType || drawing_Anchor != Item.DrawingType ) if ( para_Drawing != ItemType || drawing_Anchor != Item.DrawingType )
{ {
Item.Draw( X, Y - this.YOffset, pGraphics ); Item.Draw( X, Y - this.YOffset, pGraphics );
...@@ -3411,7 +3417,7 @@ ParaRun.prototype.Draw_Elements = function(PDSE) ...@@ -3411,7 +3417,7 @@ ParaRun.prototype.Draw_Elements = function(PDSE)
} }
// Внутри отрисовки инлайн-автофигур могут изменится цвета и шрифт, поэтому восстанавливаем настройки // Внутри отрисовки инлайн-автофигур могут изменится цвета и шрифт, поэтому восстанавливаем настройки
if ( para_Drawing === ItemType && drawing_Inline === Item.DrawingType ) if ((para_Drawing === ItemType && drawing_Inline === Item.DrawingType) || (para_Tab === ItemType))
{ {
pGraphics.SetTextPr( CurTextPr, Theme ); pGraphics.SetTextPr( CurTextPr, Theme );
......
...@@ -1127,6 +1127,10 @@ CMathContent.prototype = ...@@ -1127,6 +1127,10 @@ CMathContent.prototype =
if(bCurrComp && !bLeftRun) // добавление пустого Run перед мат объектом if(bCurrComp && !bLeftRun) // добавление пустого Run перед мат объектом
{ {
emptyRun = new ParaRun(null, true); emptyRun = new ParaRun(null, true);
emptyRun.Set_RFonts_Ascii("Cambria Math");
emptyRun.Set_RFonts_CS("Cambria Math");
emptyRun.Set_RFonts_EastAsia("Cambria Math");
emptyRun.Set_RFonts_HAnsi("Cambria Math");
ctrPrp = current.Get_CtrPrp(); ctrPrp = current.Get_CtrPrp();
...@@ -1172,6 +1176,10 @@ CMathContent.prototype = ...@@ -1172,6 +1176,10 @@ CMathContent.prototype =
if(len > 0 && this.Content[len - 1].Type == para_Math_Composition) if(len > 0 && this.Content[len - 1].Type == para_Math_Composition)
{ {
emptyRun = new ParaRun(null, true); emptyRun = new ParaRun(null, true);
emptyRun.Set_RFonts_Ascii("Cambria Math");
emptyRun.Set_RFonts_CS("Cambria Math");
emptyRun.Set_RFonts_EastAsia("Cambria Math");
emptyRun.Set_RFonts_HAnsi("Cambria Math");
ctrPrp = current.Get_CtrPrp(); ctrPrp = current.Get_CtrPrp();
...@@ -1230,7 +1238,12 @@ CMathContent.prototype = ...@@ -1230,7 +1238,12 @@ CMathContent.prototype =
// Если в контенте ничего нет, тогда добавляем пустой ран // Если в контенте ничего нет, тогда добавляем пустой ран
if (this.Content.length < 1) if (this.Content.length < 1)
{ {
this.Add_ToContent(0, new ParaRun(null, true)); var NewMathRun = new ParaRun(null, true);
NewMathRun.Set_RFonts_Ascii("Cambria Math");
NewMathRun.Set_RFonts_CS("Cambria Math");
NewMathRun.Set_RFonts_EastAsia("Cambria Math");
NewMathRun.Set_RFonts_HAnsi("Cambria Math");
this.Add_ToContent(0, NewMathRun);
} }
for (var nPos = 0, nCount = this.Content.length; nPos < nCount; nPos++) for (var nPos = 0, nCount = this.Content.length; nPos < nCount; nPos++)
...@@ -2737,6 +2750,11 @@ CMathContent.prototype.Add_Text = function(sText, MathStyle) ...@@ -2737,6 +2750,11 @@ CMathContent.prototype.Add_Text = function(sText, MathStyle)
MathRun.Add(oText, true); MathRun.Add(oText, true);
} }
MathRun.Set_RFonts_Ascii("Cambria Math");
MathRun.Set_RFonts_CS("Cambria Math");
MathRun.Set_RFonts_EastAsia("Cambria Math");
MathRun.Set_RFonts_HAnsi("Cambria Math");
if (undefined !== MathStyle && null !== MathStyle) if (undefined !== MathStyle && null !== MathStyle)
MathRun.Math_Apply_Style(MathStyle); MathRun.Math_Apply_Style(MathStyle);
......
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