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

Для каждого отдельного символа в зависимости от его кода и fontSlot...

Для каждого отдельного символа в зависимости от его кода и fontSlot выставляется font (если это необходимо). 
В Ворде в зависимости от кода симола и/или соответсвующего ему шрифта (определяем по fontslot) могут быть по-разному выставлены текстовые настройки на пересчет/отрисовку символов.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@59981 954022d7-b5bf-4e40-9824-e11837661b57
parent 7378819c
...@@ -3319,13 +3319,17 @@ ParaRun.prototype.Draw_Elements = function(PDSE) ...@@ -3319,13 +3319,17 @@ ParaRun.prototype.Draw_Elements = function(PDSE)
var CurTextPr = this.Get_CompiledPr( false ); var CurTextPr = this.Get_CompiledPr( false );
pGraphics.SetTextPr( CurTextPr, Theme ); pGraphics.SetTextPr( CurTextPr, Theme );
var NewMathTextPr; var InfoMathText ;
if(this.Type == para_Math_Run) if(this.Type == para_Math_Run)
{ {
Y += this.size.ascent; Y += this.size.ascent;
NewMathTextPr = GetMathModifiedFont(MathFont_ForMathText, CurTextPr, this); var ArgSize = this.Parent.Compiled_ArgSz.value,
pGraphics.SetTextPr( NewMathTextPr, Theme ); bNormalText = this.IsNormalText();
InfoMathText = new CMathInfoTextPr(CurTextPr, ArgSize, bNormalText, Theme);
//NewMathTextPr = GetMathModifiedFont(MathFont_ForMathText, CurTextPr, this);
//pGraphics.SetTextPr( NewMathTextPr, Theme );
} }
if ( undefined !== CurTextPr.Shd && shd_Nil !== CurTextPr.Shd.Value ) if ( undefined !== CurTextPr.Shd && shd_Nil !== CurTextPr.Shd.Value )
...@@ -3490,7 +3494,7 @@ ParaRun.prototype.Draw_Elements = function(PDSE) ...@@ -3490,7 +3494,7 @@ ParaRun.prototype.Draw_Elements = function(PDSE)
case para_Math_Text: case para_Math_Text:
case para_Math_Placeholder: case para_Math_Placeholder:
{ {
Item.draw(X, Y, pGraphics, NewMathTextPr); Item.draw(X, Y, pGraphics, InfoMathText);
break; break;
} }
...@@ -7862,9 +7866,15 @@ ParaRun.prototype.Math_Recalculate = function(oMeasure, RPI, WidthPoints) ...@@ -7862,9 +7866,15 @@ ParaRun.prototype.Math_Recalculate = function(oMeasure, RPI, WidthPoints)
{ {
var oWPrp = this.Get_CompiledPr(false); var oWPrp = this.Get_CompiledPr(false);
//var Theme = this.Paragraph.Get_Theme();
//var NewMathTextPr = GetMathModifiedFont(MathFont_ForMathText, oWPrp, this);
//g_oTextMeasurer.SetTextPr( NewMathTextPr, Theme );
var ArgSize = this.Parent.Compiled_ArgSz.value,
bNormalText = this.IsNormalText();
var Theme = this.Paragraph.Get_Theme(); var Theme = this.Paragraph.Get_Theme();
var NewMathTextPr = GetMathModifiedFont(MathFont_ForMathText, oWPrp, this);
g_oTextMeasurer.SetTextPr( NewMathTextPr, Theme ); var InfoMathText = new CMathInfoTextPr(oWPrp, ArgSize, bNormalText, Theme);
this.bEqqArray = RPI.bEqqArray; this.bEqqArray = RPI.bEqqArray;
...@@ -7878,7 +7888,7 @@ ParaRun.prototype.Math_Recalculate = function(oMeasure, RPI, WidthPoints) ...@@ -7878,7 +7888,7 @@ ParaRun.prototype.Math_Recalculate = function(oMeasure, RPI, WidthPoints)
for (var i = 0 ; i < Lng; i++) for (var i = 0 ; i < Lng; i++)
{ {
this.Content[i].Resize(oMeasure, RPI, NewMathTextPr); this.Content[i].Resize(oMeasure, RPI, InfoMathText);
var oSize = this.Content[i].size; var oSize = this.Content[i].size;
......
This diff is collapsed.
...@@ -190,7 +190,7 @@ CMathMatrixPr.prototype.Read_FromBinary = function(Reader) ...@@ -190,7 +190,7 @@ CMathMatrixPr.prototype.Read_FromBinary = function(Reader)
this.baseJc = Reader.GetLong(); this.baseJc = Reader.GetLong();
this.plcHide = Reader.GetBool(); this.plcHide = Reader.GetBool();
var nMcsCount = Reader.GetLong();; var nMcsCount = Reader.GetLong();
this.mcs.length = nMcsCount; this.mcs.length = nMcsCount;
for (var nIndex = 0; nIndex < nMcsCount; nIndex++) for (var nIndex = 0; nIndex < nMcsCount; nIndex++)
{ {
......
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