Commit f3cd6792 authored by Ilya Kirillov's avatar Ilya Kirillov

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

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