Commit f3cd6792 authored by Ilya Kirillov's avatar Ilya Kirillov

Reworked getting a text properties for Math element. Fixed bug # 33532.

parent 1ea0dd9c
...@@ -936,14 +936,24 @@ CMathBase.prototype.Get_TextPr = function(ContentPos, Depth) ...@@ -936,14 +936,24 @@ CMathBase.prototype.Get_TextPr = function(ContentPos, Depth)
}; };
CMathBase.prototype.Get_CompiledTextPr = function(Copy) CMathBase.prototype.Get_CompiledTextPr = function(Copy)
{ {
var TextPr = this.Content[0].Get_CompiledTextPr(true, true); var TextPr = null;
for(var i = 1; i < this.Content.length; i++) var nStartPos = 0;
var nCount = this.Content.length;
while (null === TextPr && nStartPos < nCount)
{
if (this.Is_ContentUse(this.Content[nStartPos]))
TextPr = this.Content[nStartPos].Get_CompiledTextPr(true, true);
nStartPos++;
}
for (var nPos = nStartPos; nPos < nCount; ++nPos)
{ {
var CurTextPr = this.Content[i].Get_CompiledTextPr(false, true); var CurTextPr = this.Content[nPos].Get_CompiledTextPr(false, true);
if ( null !== CurTextPr ) if (null !== CurTextPr)
TextPr = TextPr.Compare( CurTextPr ); TextPr = TextPr.Compare(CurTextPr);
} }
return TextPr; return TextPr;
......
...@@ -2465,6 +2465,8 @@ CMathContent.prototype.Load_FromMenu = function(Type, Paragraph) ...@@ -2465,6 +2465,8 @@ CMathContent.prototype.Load_FromMenu = function(Type, Paragraph)
this.Paragraph = Paragraph; this.Paragraph = Paragraph;
var Pr = {ctrPrp: new CTextPr()}; var Pr = {ctrPrp: new CTextPr()};
Pr.ctrPrp.Italic = true;
Pr.ctrPrp.RFonts.Set_All("Cambria Math", -1);
var MainType = Type >> 24; var MainType = Type >> 24;
......
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