Commit a8f12ac5 authored by Ilya Kirillov's avatar Ilya Kirillov

Fix bug #32849 Fixed bug with adding chars to math run in complex input.

parent 77e11731
...@@ -11130,15 +11130,25 @@ CDocument.prototype.private_AddCompositeText = function(nCharCode) ...@@ -11130,15 +11130,25 @@ CDocument.prototype.private_AddCompositeText = function(nCharCode)
var oRun = this.CompositeInput.Run; var oRun = this.CompositeInput.Run;
var nPos = this.CompositeInput.Pos + this.CompositeInput.Length; var nPos = this.CompositeInput.Pos + this.CompositeInput.Length;
var oChar; var oChar;
if (32 == nCharCode || 12288 == nCharCode)
if (para_Math_Run === oRun.Type)
{ {
oChar = new ParaSpace(); oChar = new CMathText();
oChar.add(nCharCode);
} }
else else
{ {
oChar = new ParaText(); if (32 == nCharCode || 12288 == nCharCode)
oChar.Set_CharCode(nCharCode); {
oChar = new ParaSpace();
}
else
{
oChar = new ParaText();
oChar.Set_CharCode(nCharCode);
}
} }
oRun.Add_ToContent(nPos, oChar, true); oRun.Add_ToContent(nPos, oChar, true);
this.CompositeInput.Length++; this.CompositeInput.Length++;
......
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