Commit 580721c5 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Добавлена функция в апи для добавления формул. Исправлен баг с Remove в параграфе.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@52716 954022d7-b5bf-4e40-9824-e11837661b57
parent 2ad3ac48
...@@ -5372,6 +5372,8 @@ Paragraph.prototype = ...@@ -5372,6 +5372,8 @@ Paragraph.prototype =
StartPos2 = Temp2; StartPos2 = Temp2;
} }
this.Selection_Remove();
if ( EndPos >= this.Content.length - 1 ) if ( EndPos >= this.Content.length - 1 )
{ {
var CurPos2 = -1; var CurPos2 = -1;
......
...@@ -7568,6 +7568,10 @@ ParaMath.prototype = ...@@ -7568,6 +7568,10 @@ ParaMath.prototype =
this.Math.AddLetter( Item.Value.charCodeAt(0) ); this.Math.AddLetter( Item.Value.charCodeAt(0) );
else if ( para_Space === Type ) else if ( para_Space === Type )
this.Math.AddLetter( 0x0020 ); this.Math.AddLetter( 0x0020 );
else if ( para_Math === Type )
{
// TODO: реализовать
}
}, },
Remove : function(Order, bOnAddText) Remove : function(Order, bOnAddText)
......
...@@ -7300,3 +7300,17 @@ asc_docs_api.prototype.asc_setDrawCollaborationMarks = function (bDraw) ...@@ -7300,3 +7300,17 @@ asc_docs_api.prototype.asc_setDrawCollaborationMarks = function (bDraw)
this.WordControl.m_oDrawingDocument.FirePaint(); this.WordControl.m_oDrawingDocument.FirePaint();
} }
} }
asc_docs_api.prototype.asc_AddMath = function(Type)
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Content) )
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
var MathElement = new ParaMath();
// TODO: в зависимости от типа Type сделать заполнение MathElement
this.WordControl.m_oLogicDocument.Paragraph_Add( MathElement );
}
}
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