Commit 8a4eca2b authored by Sergey.Tsarkov's avatar Sergey.Tsarkov Committed by Alexander.Trofimov

вставка текста в формулу

чтение и вставка пробелов для формул

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55412 954022d7-b5bf-4e40-9824-e11837661b57
parent 91120c4f
......@@ -89,19 +89,27 @@ ParaMath.prototype =
Add : function(Item)
{
var Type = Item.Type;
var Type = Item.Type;
var oPos = this.GetSelectContent();
if ( para_Text === Type )
this.Math.AddLetter( Item.Value.charCodeAt(0) );
else if ( para_Space === Type )
this.Math.AddLetter( 0x0020 );
else if ( para_Math === Type )
{
var rPr = this.Math.GetCurrentRunPrp();
Item.Math.Root.setRPrp(rPr);
this.Math.AddToComposition(Item.Math.Root);
}
},
if ( para_Text === Type)
{
var oText = new CMathText();
oText.addTxt(Item.Value);
oPos.Content.content[oPos.Start].Add(oText);
}
else if ( para_Space === Type )
{
var oSpace = new ParaSpace(1);
oPos.Content.content[oPos.Start].Add(oSpace);
}
else if ( para_Math === Type )
{
var rPr = this.Math.GetCurrentRunPrp();
Item.Math.Root.setRPrp(rPr);
this.Math.AddToComposition(Item.Math.Root);
}
},
AddText : function(oElem, sText, props)
{
......
......@@ -10158,6 +10158,8 @@ function Binary_oMathReader(stream)
oMRun.Content.splice( i, 0, oText );
}
}
else if (text[i] == ' ')
oMRun.Content.splice(oMRun.Content.length, 0, new ParaSpace(1));
}
oParent.addElementToContent(oMRun);
}
......
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