Commit 496ef3a4 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

1. setCtrPrp for element

2. addToContent_2 добавление в формулы контента из другой формулы

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@53012 954022d7-b5bf-4e40-9824-e11837661b57
parent 76d7d5ba
...@@ -651,17 +651,22 @@ CMathContent.prototype = ...@@ -651,17 +651,22 @@ CMathContent.prototype =
var startContent = this.content.slice(0, curStart + 1), var startContent = this.content.slice(0, curStart + 1),
middleContent = subContent.slice(subStart), middleContent = subContent.slice(subStart),
endContent = this.content.slice(curEnd); endContent = this.content.slice(curEnd + 1);
this.content = []; this.content = [];
this.content = this.content.concat(startContent); this.content = this.content.concat(startContent);
this.content = this.content.concat(middleContent); this.content = this.content.concat(middleContent);
this.content = this.content.concat(endContent); this.content = this.content.concat(endContent);
var pos = startContent.length + middleContent.length; var pos = startContent.length + middleContent.length - 1;
this.setLogicalPositionOfCursor(pos);
var currType = this.content[pos].value.typeObj;
var nextType = pos < this.content.length - 1 ? this.content[pos + 1].value.typeObj : null;
if(currType == MATH_EMPTY && nextType == MATH_RUN_PRP)
pos++;
this.CurPos = pos;
}, },
setComposition: function(Composition) setComposition: function(Composition)
{ {
...@@ -3672,6 +3677,10 @@ CMathContent.prototype = ...@@ -3672,6 +3677,10 @@ CMathContent.prototype =
this.content.push( new mathElem( placeholder ) ); this.content.push( new mathElem( placeholder ) );
}, },
setCtrPrp: function(ctrPrp)
{
},
///////// перемещение ////////// ///////// перемещение //////////
old_old_cursor_moveRight: function() old_old_cursor_moveRight: function()
...@@ -7170,9 +7179,9 @@ function TEST_UNION_CONTENT(indef) ...@@ -7170,9 +7179,9 @@ function TEST_UNION_CONTENT(indef)
if(indef == 1) if(indef == 1)
{ {
oMathComp.AddLetter("a"); oMathComp.Root.addTxt("a");
oMathComp.CreateEquation(1); oMathComp.CreateEquation(1);
oMathComp.AddLetter("b"); oMathComp.Root.addTxt("b");
} }
else else
{ {
...@@ -7180,13 +7189,17 @@ function TEST_UNION_CONTENT(indef) ...@@ -7180,13 +7189,17 @@ function TEST_UNION_CONTENT(indef)
} }
var oCurrent = oMathComp.CurrentContent; var oCurrent = oMathComp.Root;
var rPr = MathComposition.Root.getCurrRunPrp(); var rPr = MathComposition.CurrentContent.getCurrRunPrp();
oCurrent.setRPrp(rPr); oCurrent.setRPrp(rPr);
MathComposition.Root.addToContent_2(oCurrent); MathComposition.CurrentContent.addToContent_2(oCurrent);
MathComposition.RecalculateComposition(g_oTextMeasurer); MathComposition.RecalculateComposition(g_oTextMeasurer);
MathComposition.CurrentContent.update_Cursor();
editor.WordControl.m_oLogicDocument.DrawingDocument.OnRecalculatePage(0, editor.WordControl.m_oLogicDocument.Pages[0]);
//oCurContent.verifyRPrp_MC_2(rPr); //oCurContent.verifyRPrp_MC_2(rPr);
} }
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